Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
86 views

How can I combine NIntegrate with NDSolve?

I have no idea how to calculate the problems. For example consider following differential equation (DE): ...
0
votes
2answers
166 views

How can I perform NIntegrate with NDSolve?

I'm a new user and I have no idea how to perform NIntegrate by using NDSolve. For example consider following differential equation (DE): ...
1
vote
0answers
110 views

Problem setting boundary conditions with NDSolve [closed]

I have the following system of PDEs for which I have given parameters $\gamma, \tau$ and $\mu$, $$\begin{align} T_t = &\ \gamma\,(L +\tau F-T)\\ F_t = & -F_x-(F-LT)\\ L_t = &\ \mu L_{xx}+...
11
votes
1answer
263 views

Numerically evaluating an integral related to Cantor's staircase

Cantor's staircase $F_C(x)$ is a well-known "pathological" function: Plot[CantorStaircase[x], {x, 0, 1}] The MathWorld link given above claims that $$\int_0^1 ...
1
vote
1answer
76 views

Estimating error in NDSolve

I would like to give a theoretical estimation of local truncation error (and then for the global one) for a solution to a numerical initial value problem by NDSolve....
0
votes
0answers
59 views

NIntegrate some kind of highly oscillatory function

I have an analytical expression (exp) like this, See here. It is a kind of highly oscillatory function for (x1,x2,x3,x4). So,how to get the integral result by ...
0
votes
0answers
45 views

Order of evaluation for numeric functions

I'm trying to plot a 3D vector field to illustrate an electric field of a uniformly charged disk, and I used Manipulate to change the radius R of the disk to see ...
0
votes
2answers
74 views

NIntegrate problem with limits in triple integral [closed]

So I am trying to solve a triple integral in mathematica, but I am getting errors regarding my limits of integration. This is my code: ...
2
votes
3answers
453 views

Solving an equation involving an integral

How do I get the following into Mathematica, solving for $a$: $$ 0.7 = 1 - \frac{2}{a} \times \left[ \frac{1}{a} \int_0^a \frac{x}{\exp(x)-1}\mathrm dx + \frac{a}{6} - 1\right] $$
0
votes
0answers
49 views

Time needed to solve NIntegrate is much longer than what I was expecting

I'm trying to do the following list: tablevdip = ParallelTable[{x, y, Vdip[x, y, 6]}, {x, -1, 1, .5}, {y, -1, 1, .5}];] with ...
4
votes
0answers
72 views

Avoid Evaluation of Function at NDSolve

I have a huge "black-box" f function, which I want to integrate. Let's define it: f[x_,y_,a_]:=a*Exp[-(a*10000)(x^3+y^3)] as ...
0
votes
1answer
107 views

Integrating high oscillatory function - triple integral - error message

I am working in a triple integral, but the second integral (qQ) and the first too ( aA ) is a oscillatory funcion. The third integral ( os11 ) is like a gaussian, and is easy to integrate. i am ...
2
votes
2answers
114 views

Solving nonlinear 3rd order ODE over range from zero to infinity

Here are the code that I had tried but there is an error ...
1
vote
1answer
175 views

Plotting singular integral

I need to plot the following singular double integration $u(x,t)$ for $t=0, t=0.2, t=0.4, t=1$ and $t=2$ in one figure as a line. That is, I need $u$-coordinate vertically and $x$-coordinate ...
1
vote
1answer
80 views

Nested NIntegrate with variables in limits

How do I solve nummerically something like this and plot a function for it? $f(x)=\int \exp[\int ^{x+y} _{x-y} \exp(z) dz]dy $ This example has analytical solution, however I would like to know how ...
5
votes
1answer
77 views

WorkingPrecision and NDSolve Method Plugin Framework

I'm studying some new numerical integration algorithms using NDSolve Method Framework to specify them. When I try to set ...
2
votes
0answers
62 views

WhenEvent behavior changed from v9 to v10 - how to fix the code?

A couple of years ago I asked a question about solving n-body systems with NDSolve and detecting collisions with WhenEvent. I ...
2
votes
2answers
97 views

Function where variable is integration bound

Lets say I have a function of the form: $f(T) = T^4 \int_0^{1/T} \frac{x^3 dx}{e^x-1}$ This is an example of the situation I am describing not a unique problem. I want to define it as a numerical ...
6
votes
3answers
198 views

Certain integral over torus

Let $F(t_1,s_1,t_2,s_2)=$ $$\big((2+\cos t_1)\cos s_1 - (2+\cos t_2)\cos s_2\big)^2 + \big((2+\cos t_1)\sin s_1-(2+\cos t_2)\sin s_2\big)^2 + (\sin t_1 -\sin t_2 )^2.$$ I am interested in computing ...
1
vote
1answer
188 views

How do I plot this 3-D, double integral?

I have the following function: I need to plot a 3-D with coordinates f (p, q), p and q. I mean, I enter values for p and q, so that the integral of f (p, q) must be a number. This number must be ...
11
votes
1answer
319 views

How can I use Mathematica to numerically compute a Wigner spectrogram of an optical pulse?

This question was inspired by this question where it is necessary to numerically compute the Fourier transform of a Gaussian optical pulse with a Gaussian chirp function. $$E(t)=e^{-t^2} \cos(50 t - ...
0
votes
1answer
138 views

NDSolve breaking down

I'm trying to model a situation involving charged sphere in a dynamic electric potential, and find out how the rotational motion of the sphere affects the translational dynamics in two dimensions. ...
3
votes
1answer
71 views

Numerical integration with parameter and plot

I'm working on this function: (0.0027 Sin[phi])/(1.05*Exp[-241w]+ Exp[239w]-Cos[phi]) I'd want NIntegrate this function on <...
3
votes
1answer
63 views

How can I plot points generated by a Verlet Integration?

So, I have this code for Verlet Integration: ...
2
votes
0answers
54 views

Discretised numerical solution to a non-linear non-local equation

I understand that to do something even slightly non-trivial in Mathematica, I need to read some materials; the problem is that there are (too) many materials and only one particular problem, and I ...
3
votes
2answers
196 views

Error in NIntegrate command

I am trying to evaluate (numerically) the integral $$\int_0^1\int_0^1\int_0^1\int_0^1\int_0^1\int_0^1\frac{dx\,dy\,dz\,ds\,dt\,du}{(x - s)^2 + (y - t)^2 + (z - u)^2}$$ with Mathematica using the ...
6
votes
2answers
268 views

Solving the path of Earth around Sun

This maybe isn't a universally helpful question. Maybe a little of a code dump. But here goes. I'm trying to solve the path Earth moves around Sun from Earths mass, Suns mass, Earths initial velocity ...
1
vote
1answer
84 views

Nonlinear 2nd order ODE with regular singularities

I am tring to solve the following ODE with NDsolve $2x~(1-x)~f''(x)+(3-4x)~f'(x)+a~f(x)+b~f^n(x)=0;~~a,b\in\mathbb{R},~n\in\mathbb{N}$. The mathematica "code" is: ...
1
vote
1answer
400 views

Numerical solution of Schrödinger equation

I want to solve the following differential equation numerically. The geometry of the problem is as shown below. Electron 1 is located on the inner ring of radius $R_1$ and electron 2 is located on the ...
1
vote
1answer
53 views

Convergence of numerical integration with parameter in the region of integration

I would like to solve the integral: $ f(a)=\iiint\limits_{\mathcal{R}(a)}\frac{\sqrt{12\left(\left(\frac{x-y}{x+y}\right)^2+\left(\frac{y-z}{y+z}\right)^2+\left(\frac{x-z}{x+z}\right)^2\right)}}{\exp(...
16
votes
2answers
306 views

More efficient method to compute moments of the Johnson $S_B$ distribution

Here is a very specific feature request. I need Mean[JohnsonDistribution["SB", γ, δ, 0, 1]] When I issue e.g. ...
2
votes
0answers
144 views

How to solve an equation where the unknown variable is inside the integration [closed]

I have an equation: $$ \frac{1}{g}=\int_0^{\frac{1}{\delta}\sinh \frac{1}{g}} \frac{\tanh\left(0.882\, b\,\delta\sqrt{1+z^2}\right)}{\sqrt{1+z^2}}\mathrm{d}z $$ I want to obtain the relation $b\,\...
1
vote
1answer
100 views

Convergence in NIntegrate

I wish to understand how to cope with the following error messages: ...
0
votes
0answers
91 views

How to solve boundary value problem with singularities at boundaries?

I have a boundary value problem, solving a system of differential equations with a singular boundary condtion (V[0] = 1/s, s->0) ...
2
votes
0answers
64 views

NIntegrate over statistical variables with parameter

Essentially, what I am trying to do is the following: Integrate a function which contains the parameter k ...
0
votes
1answer
169 views

NIntegrate with variable limit of integration [duplicate]

Hey guys Im working with this integral and I can´t get it right. ...
-1
votes
1answer
294 views

Follow up: how to plot a function under NDSolve domain

Here is the details of the code to plot. ...
2
votes
0answers
110 views

integration of a list of gaussian type orbitals (GTO)

I am currently trying to integrate various components of a current density (j={jx,jy,jz}) over space. The problem is that the current j is extracted from a quantum chemical computation and is a sum of ...
0
votes
2answers
79 views

Fit a polynomial/curve to an NIntegrate result

I want to NIntegrate a function which also contains some parameter. In the end, I would like to plot the result as a function of one of these parameters. The thing ...
2
votes
2answers
241 views

Attempting to use NDSolve to plot harmonic oscillator solutions

NDSolve[{ (-y''[r]/1880) + (470 (0.04077)^2 r^2 - 48 + 1/(1880 r^2)) y[r] == 0, y[0] = 0, y'[0] = 0}, y, {r, -4, 4}] I use this but get errors and am ...
4
votes
1answer
130 views

A 1D numerical integral Mathematica cannot compute, from physics

A well know result in theoretical physics is that a sum over Matsubara fermionic frequencies, i.e.: $$ S = \sum_{n=-\infty}^{\infty} h(\omega_n) \hspace{32pt} \omega_n=(2n+1)\frac{\pi}{\beta} $$ can ...
1
vote
2answers
144 views

Trapezoid Integration over a list of pairs [duplicate]

I have two very connected questions: Is there really no built-in function to integrate a list of pairs without converting to a function? Something like: ...
0
votes
2answers
182 views

Solving non-linear differential equation

For my research project I need to solve the following integral ...
1
vote
1answer
103 views

Problem with NIntegrate and FindFit [closed]

I fit the experimental curve with the model using the following equation, ...
1
vote
0answers
50 views

Problem with curve fit using integral [closed]

I need fitting a Langevin function on a experimental data, but one parameter must be firstly optimized by using a Lognormal distribution. The complete expression could be written as: The integrate ...
7
votes
2answers
237 views

How to locate the position of a periodic orbit

These are the equations of the dynamical system ...
1
vote
2answers
120 views

Can't NIntegrate my NDSolve results

I want to NIntegrate my NDSolve result. I don't have a exact function form because it is coming from the ...
2
votes
1answer
60 views

WhenEvent stops working after first instance

I'm modelling a very simple physical situation is which an object is rested on two moving fingers. Sometimes the object moves with one finger while sliding over the other, while at other critical ...
0
votes
0answers
53 views

NIntegrate within NMinimize - how to optimize the code?

How I can optimize these numerical calculations? Most annoying is encountering instabilities (numerical errors). I have a predefined function: ...
3
votes
2answers
111 views

Numerical integration of oscillatory function

I am trying to evaluate the following oscillatory integration numerically but the answers are wrong or not accurate enough. I don't know what the problem is. ...