Questions on the use of numerical functions NIntegrate and NDSolve.
0
votes
0answers
61 views
How can I make a progress bar for an Interpolation and an integration of an interpolation?
I'm a complete newbie to mathematica and I've just been fiddling with things to try to get the hang of it. I don't have any serious maths to do for a little while. I figured out, kind of, how to do ...
4
votes
2answers
109 views
Does Mathematica have a command analogous to ode45 of MATLAB?
Does anybody know if Mathematica has an analogue of MATLAB's ode45 command? I need to solve a second order coupled ODE system of equations.
1
vote
0answers
81 views
Multi-dimensional integral in the complex plane with poles and essential singularity
I've passed the last week searching a way to numerically integrate this multi-dimensional integral in the complex plane at the poles and avoiding the singularity at z=0:
$$
\oint_{C}\oint_{C\ auound\ ...
0
votes
0answers
57 views
Integrating and plotting pde system solution
I have a trouble with plotting a pde system solution. I'm solving a PDE system in 2-dimensional space and then I want to integrate the solution along one dimension and build a log plot along the ...
1
vote
0answers
97 views
Solving first order ODE by Runge-Kutta method
I want to solve the first order ODE by the Runge-Kutta method of order 4 $$y'(x)=1+(E-V(x)-1)\sin^2(y(x)),\qquad{}V(x):=\begin{cases}
-20\left(1+36x^2\right)(x+1)^2(x-1)^2&\hbox{if }|x|<1,\\
...
0
votes
0answers
45 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
votes
0answers
31 views
NDSolve: Equation or list of equations expected instead of False in the first \ argument [closed]
I do not know why this here will to work.
...
8
votes
1answer
108 views
WhenEvent and partial derivatives
Can WhenEvent be used to reset the conditions on a PDE at a given time?
How would the syntax of that be?
This is the code I`m using
...
1
vote
1answer
64 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 ...
6
votes
2answers
106 views
Finding y given x from an interpolating function
I would like to put a dot on the point of a curve that has a specific y value but I don't know the x value.
A simple example of my code is
...
1
vote
0answers
76 views
Numerical integration involving Inverse Normal CDF
I'd like to evaluate the following numerical integration using Mathematica
$$
\ \int_0^T\int_0^\infty xe^{-0.04 s}g(x,s) dxds\
$$
where g(x,s) is a Gaussian copula function with say, marginal ...
7
votes
1answer
110 views
Integration strategies for oscillatory multidimensional function
I am seeking to integrate a highly oscillatory, multidimensional function. I am currently using NIntegrate's QuasiMonteCarlo approach. However, this is time-consuming and, given my current resources, ...
5
votes
1answer
82 views
Numerical contour integrations in the complex plane - contour deformation gives different answer for analytic kernel
I am trying to do a contour integration in Mathematica numerically. In particular, I'm checking the identity:
$$ H_m^{(1)}(z) =\frac{i^{-m}}{\pi}\int_{-\pi/2 + i \infty}^{\pi/2 - i \infty} \exp[i m ...
0
votes
0answers
35 views
NIntegrate issue to do with unknown types [duplicate]
I have a numerical function zz:
zz[s_ ? NumericQ] := so3toE3[Inverse[yn[s]].ND[yn[k], k, s]];
The other functions involved have 2 pages of code defining them so ...
0
votes
0answers
40 views
How to let Mathematica computes the limit if it encounters an indefinite expression when solving ODEs?
The code talks itself clearly:
...
3
votes
1answer
62 views
Monitoring the Evaluation of NDSolve: time to finish estimation
My problem is quite simple: I run a NDSolve with a system of many ODEs, a calculation that will run for many hours, and I would like to know the progress of the ...
5
votes
1answer
84 views
Determining which rule NIntegrate selects automatically
I need to numerically integrate a highly oscillatory function over the semi-infinite domain $(0,\infty)$:
$$\int_0^\infty \frac{\sin^2(x) \sin^2(1000 x)}{x^{5/2}}\mathrm dx$$
Since the Levin rule ...
0
votes
0answers
81 views
Function not recognized by Mathematica?
I'm trying to do triple integration on a bivariate function where one of the upper integration limits is the variable of the outer-most integration. When I execute the following lines, Mathematica ...
1
vote
0answers
67 views
Cauchy principal value integral of a list of numbers. How?
I have a list of numbers that are numerical samples of a function for which I need to find the Cauchy principal value integral. I thought I should be able to combine Interpolation with Integrate to do ...
0
votes
0answers
59 views
NDSolve: methods and step size choosing
I am looking into the documentation of NDSolve[]; more precisely how this function chooses the StepSize and how it chooses which ...
1
vote
1answer
60 views
Double integral 0
I am trying to reproduce the results from a paper in Mathematica. This task involves $K$ double integrals of the form
$$\int f(x,y)g(x)dx,$$
where $f(x,y)$ is a bivariate normal density with mean ...
0
votes
0answers
31 views
How do I evaluate NIntegrate when one of the bounds is a variable? [duplicate]
I have the function F[x] and I want to plot the integral of it using Plot[NIntegrate[F[n],{n,0,x}],{x,0,5}], but I get the error ...
4
votes
0answers
98 views
Numerical solution of Schrödinger-type equation in Mathematica [duplicate]
I want to solve the following differential equation numerically:
\begin{equation}
i\partial_{t}\psi(r,t)=\left[-\frac{\Delta}{2m}+g\left|\psi(r,t)\right|^{2}+V_{d}(r,t)\right]\psi(r,t)
\end{equation}
...
13
votes
2answers
233 views
How to calculate the volume of a convex hull?
Given a spatial curve represented by a parametric equation, is it possible in Mathematica 9 to calculate symbolically (or at least numerically) the volume of its convex hull?
2
votes
2answers
106 views
5
votes
0answers
180 views
3
votes
0answers
82 views
Using NDSolve for Integro-Differential Equations
I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are:
...
2
votes
1answer
75 views
NDSolve with vector function
(Possible duplicate yet I still can't understand.)
Basic 2D revolving around origin:
...
2
votes
0answers
96 views
Solving homogeneous Fredholm Equation of the second kind
I am trying to solve a homogeneous Fredholm integral equation of the second kind, i.e.
$\lambda y(x) = \int\limits_a^b e^{i[\phi(t)+k(t-x/M)^2]} y(t)\,dt$
where $\lambda$ is the eigenvalue (to be ...
6
votes
2answers
225 views
How to deal with zero in NDSolve in mathematica?
I would like to solve the following ODEs
$$\begin{cases} x'(t)&=y\\
y'(t)&=-y(t)/t-e^{x(t)},\\
x(0)&=1,\\y(0)&=0,
\end{cases}$$
(EDIT :
The second equation used to be $y'(t) = ...
1
vote
0answers
99 views
Getting MemoryAllocationFailure from NIntegrate
When numerically calculating a double integral using NIntegrate over an infinite domain (with all options at their default), Mathematica 7 calculates my integral ...
2
votes
0answers
31 views
NIntegrate/NSum with parameters [duplicate]
I'm trying to calculate a continuous integral within a discrete integral.
Something similar to this (yet more complex):
...
1
vote
1answer
125 views
NDSolve diffusion equation over/underdetermined
I have a feeling the solution to my problem is very simple… but my knowledge of differential equations is pretty weak.
I am trying to solve a scalar diffusion equation (used in NMR spectroscopy, but ...
0
votes
1answer
165 views
DAE - varying initial conditions
I want to solve a DAE-system and I want to vary more than one initial conditions and to manipulate them. I looked here:
Putting NDSolve into ParametricPlot
But it does not work:
...
16
votes
2answers
422 views
3D orbits and inaccuracy over time
I wrote a little program to use Newton's Law of Universal Gravitation to animate 3 planets orbiting a central star, but I have run into a problem. Here is the code that I used to create the program (I ...
1
vote
1answer
105 views
How to adjust parameters to experimental data on a NDSolve problem
I have 2 differential equations with 2 variables, x and y,which are a function of t and I have the parameters k1, k2 y k3.
...
7
votes
0answers
163 views
Numerically solve 2nd order differential equation with singularity
Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example:
$$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$
where ...
6
votes
1answer
68 views
10
votes
1answer
234 views
Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?
I am trying to evaluate this integral numerically
$$
\int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q
$$
for large values of $R$. This makes the integrand oscillate more quickly and Mathematica ...
3
votes
1answer
205 views
How to plot and solve the numerical solution of a integro-differential equation
I have a integro-differential equation of the form
$y'(t) = - \int_0^t {y(t_1 )} e^{t_1 - t} dt_1, {\rm{ t}} \in {\rm{[0,10], y(0) = 1}}$
My code is:
...
2
votes
0answers
165 views
Is mathematica storing information it shouldn't store?
I'm seeking to find solutions to a numerical integration with a large set of parameter combinations (basically, I'm doing a brute parameter sampling). Yet, I believe the memory of the computer is ...
0
votes
1answer
68 views
Notation for numerical solutions to differential equations
Can somebody explain this notation to me? Using Mathematica's first example in the NDSolve documentation:
...
1
vote
0answers
132 views
Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations
I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...
2
votes
1answer
85 views
Infinite Expression Error from NDSolve
I am trying to solve a differential equation numerically. So I have
...
8
votes
2answers
143 views
Problem with NIntegrate when WorkingPrecision is specified
I am trying to evaluate this integral numerically:
$$
\int_0^{\infty } m \exp (-m) J_1(m){}^2 \, dm
$$
Everything is OK when only the integration method is specified:
...
3
votes
1answer
67 views
How to integrate ParametricNDSolve solution with respect to a parameter?
I have just upgraded to the new version of Mathematica because of its new built-in ParametricNDSolve function. I need to solve a first-order non-linear ordinary ...
3
votes
1answer
199 views
NDSolve for a large system of simple ODEs
I am solving a system of many (more than 100) ODEs.
It is the kind of standard rate equation encountered in semiconductor physics.
Here is the system:
...
4
votes
1answer
74 views
Differentiating ParametricNDSolve solutions
Is there any way to differentiate a solution obtained by ParametricNDSolve? For instance, I have the position $\phi_\gamma(t)$ as a function of time, parametrized ...
1
vote
2answers
109 views
NDSolve solution for driven damped pendulum diverges
I want to solve numerically for the system of the driven damped pendulum using Mathematica. This is the second-order nonlinear equation
\begin{equation}
\ddot{x} + 2 \beta \dot{x}+ \omega_0^2 \sin
...
2
votes
2answers
182 views
Animating the Lorenz Equations
I am trying to use the Animate command to vary a parameter of the Lorenz Equations in 3-D phase space and I'm not having much luck.
The equations are:
...






