# Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

403 views

### Multiple NIntegrate (again)

Basically I have the same question as here: Multiple NIntegrate but since I don't have enough "reputation" I cannot comment there. I want to solve the following multiple Integral numerically at given ...
192 views

### Maximum of NDSolve output. Problem with interpolating function

I solve a NonLinear PDE and get a solution (which for other reasons I put into a vector): SolVec1[1][[2]][x,t], where x and t are the indipendent variables. Now, I would like to get a distribution ...
475 views

### Using NDSolve for three variables as function of time

I want to be able to plot z, and r. Should I be using DSolve, NDSolve or something else? I've tried to clear it up a bit Thanks, Will ...
299 views

### Integrate equations of motion when force depends on position

I'm fairly new to Mathematica. I'm trying to test my C++ implementation of a fourth order Runge Kutta method for Newton's equations of motion. I want to test my integrator when the applied force is ...
431 views

### Boundary condition is not specified on a single edge of the boundary of the domain

I am attempting to solve a PDE as prescribed in a paper I am reading; however, Mathematica doesn't seem to be happy with the way I am posing the problem. Im my case, r(t,100) is an approximation of ...
870 views

1k views

### NIntegrate::slwcon Problem

I have a problem with numerical integration of this function. Integral value is zero, but NIntegrate[] needs a lot of time to calculate this. Is there any way to ...
362 views

### How to choose MaxStepFraction for optimal speed of NDSolve

I'm trying to use NDSolve to solve a 1D Schrodinger's equation, and it seems that MaxStepFraction has huge effect on the ...
451 views

### A Bessel & Struve functions related integral

I try to numerically compute this integral and I don't figure out why on earth Mathematica is not able to do it. Is my input correct? Does it possibly have a closed form? ...
803 views

### How to use NIntegrate in a function using parameters from a list

I would like to use NIntegrate in a function with some parameters from a list. I simplified my problem for this forum. The list of parameters is as follows: ...
157 views

### ParametricNDSolve: Parameter inside UnitStep leads to longer integration times

I have found one of the most annoying issues in ParametricNDSolve. When a parameters occurs inside UnitStep (and Piecewise and If) the integration takes much longer time. I illustrate this by an easy ...
780 views

### Question on accuracy and precision of NIntegrate

As a Mathematica newbie, I was testing the accuracy/precision of NIntegrate (9.0.1.0 on Mac) and have obtained a very peculiar result. ...
238 views

### Differential equation with random variable

How can I derive analytically or compute numerically the solution to following differential equation $$dy/dt = y\cdot X\cdot (y\cdot X - g(y,X))\cdot X$$ where X is a random variable (e.g. from a ...
308 views

### NDSolve boundary query / Extracting values from solution

I have a function $O_{2}$ with boundary conditions $O_{2}(r_{o}) = p_{o}$ and $O_{2}(g) = O_{2}'(g) = 0$. I plot it using the solver code below; ...
276 views

### Slow integration of interpolating function

I have a large file with irregularly spaced data in the format: ...
299 views

### An integral with a fractional part in 3 dimensions

The evaluation with Maple suggests the triple integral is around $1$, but Mathematica tells it's $0.0958758$. When using the code ...
298 views

### Inconsistent behavior of WhenEvent[ ]

Consider the following simple example: ...
1k views

### Kramers Kronig Relation for Phase and Complex Reflectivity

I am a new user to Mathematica and I have been trying to figure out how to find $\Theta(\omega)$ from my 'experimental' values of energy and $\ln(\sqrt{R(\omega)})$ (I am just running a simulation, ...
2k views

### shooting method and stifness problem for NDSolve

I'm trying to solve numerically the following differential equation: 1/r[x]^5 + k/Sqrt[1 + r'[x]^2] - (k r[x]r''[x])/(1 + r'[x]^2)^(3/2) == 0 I can set boundary ...
256 views

### NIntegrate with an arbitrary number of variables [duplicate]

I need to evaluate NIntegrate with a variable number of variables. Here's a concrete example. I'll accept an answer that finds a way to make the example work. I ...
1k views

### Different results for integration using Mathematica and MATLAB

I have the following integration: $$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$ I get different ...
243 views

### NIntegrate using Boole doesn't work

This doesn't want to work for me - I don't know why not. It usually gives me 0, but sometimes also a different number. I know it should be a small, non-zero number. ...
175 views

### Differentiating a function that has NIntegrate within it

I am something of a novice with Mathematica. I have written the following code; ...
68 views

### How to solve initial value problem using Runge-Kutta method? [duplicate]

How to solve the following initial value problem using Runge-Kutta method u''[x] + (2/x) u'[x] + E^(u[x]) == 0, u[0] == 0, u'[0] == 0
325 views

### Interpolation of a table with 4 parameters

I have a huge data file which I need to do some analysis on it. The file is built in this way that for each 4 variables, there is a value of the function: ...
653 views

### Integrate message: can't prove Integration limits are real

I'm working on solving differential equations through Fourier series, I made a function to help me calculate the coefficients that looks like this: ...
228 views

### How to improve the performance of this code

I have implemented a code in Mathematica 9 to simulate a scattering problem, and I got really disappointed about its performance when compared to Matlab. Since I am a newbie in Mathematica, would ...
106 views

### Transformation of the NDSolve result into new dependent variables

I have solved a set of coupled differential equations and now I need to convert them into different dependent variables and sketch their trajectories. Here is the code I have written so far: ...
168 views

### Numerical integration of Hankel functions

I would like to know how to perform numeric integration for the following type of integrals in Mathematica. For the following integrand, we can not get the symbolic result. ...
78 views

### ParametricNDSolve and ProcessEquations

I have a question regarding NDSolve`ProcessEquations and ParametricNDSolve. When using the regular NDSolve we have the option to divide the integration into the three steps ProcessEquations, Iterate ...
603 views

### Problem using WhenEvent to constrain solution

Note: This question has also been posted at the Wolfram Community Problem: Simulate pressure in volume 1 and 2 for 1 second. The circuit is as follows: From this I set up the governing DE for ...
633 views

### Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
460 views

### Differential equations: How do I solve a delay differential equation with 0-1 variables

How do I solve the following non-linear, delay-differential equations using Mathematica under the assumptions $$p(t) = 1 ,\; y(t) > k$$ $$p(t) = 0,\; y(t)<= \ k$$.  \frac{dw}{dt} = ...
251 views

...
339 views

### Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
1k views

### NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
296 views

### Integration of Two Manipulatable Cylinders

Introduction I created the following code to simulate the many possible interactions between a cylindrical protein crystal and a x-ray beam during serial femtosecond crystallography. ...
I need to orthogonalize the polynomials $h_n(x)=x^{2n}(1+x^2)^{-4S}$ with $x\in\textbf{R}$, $2S\in\textbf{N}$ and $n\in\{1,3,5,\ldots, 4S-1\}$ over the inner product \$\langle h_n,h_m\rangle=32\pi ...