Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
83 views

NIntegrate failed to converge?

Hey guys I have a pretty simple code that consists of an RMS calculation. The issue is that I am getting quite a few error messages when I run it. The following equations are highly published physics ...
1
vote
1answer
128 views

To solve Cylinderical PDE

I want to solve this PDE. I have tried to solve it with NDSolve but found error 'Boundary values may only be specified for one independent variable. Initial ...
1
vote
2answers
142 views

Making mathematica do regulated integrals

Consider the integration, $\int _0 ^\infty dx\ x \tanh( \pi x) \sqrt {x^2 + a^2 } $ where $a$ is a real number. This integral is divergent. We note that an asymptotic expansion of the integrand ...
1
vote
1answer
67 views

Discrete sampling of interpolating function returned by NDSolve

When solving an ODE with NDSolve, Mathematica returns an interpolation function. I need a discrete sampling of this function however. Naively, I can write this as (example): ...
1
vote
1answer
47 views

Invariant error plot for an arbitray system of ODE

i try to use InvariantErrorPlot command for a generic system of ODE but i find only example with pre-building equations from Mathematica Packages. This is one of ...
1
vote
1answer
158 views

Error Function Integral (Erf)

Any idea how to solve analytically this integral Integrate[(a Erf[a Sqrt[b/(a^2 + b)] c])/(a^2 + b)^(3/2), a] I tried substitution u=a^2 + b, but it didn't work. ...
1
vote
2answers
115 views

NDSolve - 2nd order ODE - how to solve for y and y'

i am trying to workout how to solve a simple 2nd order ODE for y and y'. I can solve for y[t] as follows but how can i solve for y[t] and y'[t] ? ...
1
vote
1answer
98 views

ParallelTable of ParametricNDSolve objects fail

There seems to be a problem with ParametricNDSolveValue togeteher with ParallelTable First we create a ParametricNDSolveValue object ...
1
vote
2answers
646 views

How does one specify Neumann conditions for NDSolve?

I have a series of functions defined in my notebook, and then want to use this to solve a diffusion-reaction type equation. At the moment, something like this works: ...
1
vote
1answer
230 views

How to solve a system of ordinary differential equations contain a interpolating function?

I'm wondering how I can solve a system of ODE that has a interpolating function? For example, z and y are ...
1
vote
1answer
392 views

I ran into an error when I was trying to solve a PDE with a piecewise initial condition by NDSolve

This is a very simple one-dimensional heat-conduct equation, the only special part of it is the piecewise initial condition: ...
1
vote
2answers
84 views

Problem evaluating a complicated integral

Apologies for stating my problem poorly in the first instance, thank you for the help in narrowing down the issue. Problem For those interested, it's for the exact unbiased inverse of the ...
1
vote
1answer
141 views

Multiple plots on same graph for different parameter?

I would like to be able to Plot a function (with an implicit Integrate command) with various values for a certain parameter ...
1
vote
1answer
105 views

NIntegrate(with singularities) gives different results, which one should I trust?

I am doing an Numerical integral with sigularities. ...
1
vote
1answer
82 views

Integrate with FunctionInterpolation differs from NIntegrate

In working with interpolating functions and integration, I noticed a lot of differences between NIntegrate and Integrate in the ...
1
vote
1answer
122 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 ...
1
vote
1answer
115 views

ParametricNDSolve: Fails to differentiate an matrix differential equation

It seems like there is a problem with differentiating a ParametricNDSolve object when the underlying system contains an matrix differential equation. Create a simple ParametricNDSolveValue object ...
1
vote
1answer
154 views
1
vote
1answer
86 views

Get unique values for integration limits

For an multidimensional integration I want to build up the integration limits with the following code. (the length of vars is also variable) ...
1
vote
1answer
448 views

Problem with NIntegrate in NonlinearModelFit

We are receiving many error messages when using NIntegrate with NonlinearModelFit. Here is a much-simplified version of the code. It arrives at the correct answer after several messages saying that it ...
1
vote
1answer
301 views

NDSolve for PDE with discontinuous initial/terminal condition

I have an issue with NDSolve for the case of a PDE with discontinuous initial/terminal condition. Consider the PDE solution ...
1
vote
1answer
144 views
1
vote
1answer
797 views

Problem while solving system of two second order non linear coupled differential equations using NDSolve function

I am a completely new to Mathematica, and I am sorry if this question is dumb. I have to solve a system of two second order non linear coupled differential equations (that I got from the Lagrangian ...
1
vote
1answer
151 views

How to collect q[t] from the following integration

As shown in the following program, the q[t] in a can be collected from the integration by defining the integration of ...
1
vote
1answer
46 views

Numerically Integrating to find a Maximum using NDSolve

I am trying to numerically find an equilibrium (maximum) of a function using its differential. The following is a simplified version. ...
1
vote
1answer
129 views

Runge-Kutta 2nd Order ODE Solver

Suppose I have a 2nd order ODE of the form y''(t) = 1/y with y(0) = 0 and y'(0) = 10, and ...
1
vote
1answer
101 views

Solution of Coupled Second Order ODEs with Boundary Conditions

D[Tu1[x], {x, 2}] qu - Tu1[x] (fu0 + I w p) == Tou[x] f1 D[T1[x], {x, 2}] q - T1[x] (f0 - b g0 + I w p)== To[x] (f1 - b g1) - g1 For T1 , ...
1
vote
1answer
100 views

Problem with numerical integration

I am not very used to do numerical simulations on Mathematica. I have a problem with numerical integration of this function. Is there any way for this calculation? Input: ...
1
vote
1answer
528 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 ...
1
vote
1answer
169 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: ...
1
vote
1answer
105 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. ...
1
vote
1answer
115 views

Partitioning a numerical integral: need to integrate spectra

I am trying to integrate a spectrum I obtained from a fourier transform infrared spectroscopy experiment, in order to determine the global warming potential of green house gases. In order to do this, ...
1
vote
1answer
260 views

Why does this integral have a complex component?

I wanted to find the probability of my normally-distributed random variable being at least 15, so I set up this integral: ...
1
vote
1answer
740 views

Can Mathematica solve integro-differential equations?

I have integro-differential equations like this: ...
1
vote
1answer
155 views

Using ParametricNDSolveValue with initial conditions of another ParametricNDSolveValue

I have a system of parameter-dependent ODEs, which I can solve using ParametricNDSolveValue. Now, I have another ODE, which has as initial condition the solution of ...
1
vote
1answer
170 views

Using new symbol in WhenEvent in NDSolve

This is an example in Mathematica's help document. ...
1
vote
1answer
108 views

Changing ParametricNDSolveValue options for only part of the run

Here is an example of the system that I am running, ...
1
vote
1answer
252 views

Simpson's rule with ListConvolve or ListCorrelate

I have a function that's represented as a long list of values that I want to integrate. I can do it procedurally with Simpson's rule. ListConvolve generally runs faster then procedural code, so i ...
1
vote
1answer
198 views

NIntegrate converging too slowly when increasing size of array

I have a problem with a numerical integration. I have a 4x4x4x4 array that has for each entry an integral and I want to use NIntegrate to evaluate it. It gives me ...
1
vote
1answer
196 views

Which integration strategy to use for this product of polynomials?

What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...
1
vote
1answer
198 views

What do these error messages mean when numerically solving differential equations?

I am using Mathematica to numercially solve the following equations: ...
1
vote
1answer
257 views

Table not working with Plot

Because NIntegrate[] does not support parallel computation out of the box, I'm doing a simplified version by breaking the integration limit into pieces and using ...
1
vote
0answers
31 views

NDSolve PDE, not enough boundary condition?

The PDE that I want to solve is: $$ \frac{\partial f}{\partial t} + \frac{1}{m} \left( p_x \frac{\partial f}{\partial x} + p_y \frac{\partial f}{\partial y} + p_z \frac{\partial f}{\partial z} \right) ...
1
vote
0answers
56 views

Numerically solving a 2D oscillating integral

I'm having trouble solving this integral numerically: ...
1
vote
0answers
23 views

Nested NIntegrate of vector function

I am performing a nested integration where the upper limit of the inner integral depends on the value of the outer integral, like in the question [Nested NIntegrate]. As in this question my function ...
1
vote
0answers
83 views

How to specify the time variable for NDSolve

I recall that it is possible to specify which independent variable is the "time" variable in NDSolve, but I can't find it documented anywhere. Does anyone recall ...
1
vote
0answers
70 views

Speeding up the numerical integration of a certain function

I'm using the following function f[t_] := 3/4 t^-3 NIntegrate[(x^4*Csch[x/2]^2), {x, 0, t}, Method -> {Automatic, "SymbolicProcessing" -> 0}]; I ...
1
vote
0answers
67 views

NIntegrate (multi-dimensional integral)

I am interested in the numerical evaluation of the following integral: $\int \prod_{i=1}^n dx_i \delta(\sum_{i=1}^n x_i) \prod_{i=1}^n f_i(x_i)$ where $f(x)$ is a complicated function. Unfortunately ...
1
vote
0answers
59 views

Speeding Up NIntegrate and ?NumericQ

I have attached below a piece of code that has been running successfully but takes extremely long for mathematica to compute. I believe it is the last "rms" calculation and the fact that I am using ...
1
vote
0answers
51 views

Multidimensional Numerical Integral with Singular Behavior [closed]

I'm trying to numerically integrate a multidimensional integral where there is singular behavior when x = y. This is the integral ...