Questions tagged [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

Filter by
Sorted by
Tagged with
2
votes
1answer
27 views

Need help to integrate a discretized data

Below I have a data organized as: data= {{x1,y1,f[x1,y1]},{x2,y2,f[x2,y2]},...{xn,yn,f[xn,yn}} I need a function interpolation and the integral of this function ...
3
votes
1answer
36 views

Numerical Laplace Transform of InterpolatingFunction

What are some ways to find the numerical Laplace transform of an InterpolatingFunction? (I know that numerical Laplace transforms are rarely used but my application requires a numerical evaluation). ...
1
vote
0answers
36 views

Numerical integration of a function with several variables

I need to calculate the next integral $$ F_l(R)=\int_0^{\infty} {dk k^2j_l(k R)*2*\exp[-0.36k^2](k)\rho_l(k)(18/k^2)P_l(\cos{\beta})}$$ where ρl(k) is given by $$ \rho_l(k)=\int_{0}^{\infty}{dr r^2 ...
0
votes
0answers
82 views

Plotting the graph of complex Integral function

Can anybody help me to Plot the graphs of T1 and T2, please. The problem is Integral part becomes so huge OR indeterminate at some points. So how to find and skip that points? Thanks a lot. ...
1
vote
0answers
25 views

Speed up Multidimensional numerical integration

I have the following 9-D integral, where the domain of integration is a nine-dimensional hypercube of unit length. The problem is that Mathematica takes too long to evaluate this. Is there any ...
1
vote
1answer
28 views

Optimal way of performing a high-dimensional numerical integral of a sharped function

I am trying to solve the following numerical integral ...
0
votes
1answer
36 views

How to speed up the drawing speed of the probability density function of Z=XY [closed]

We already know that X and Y are independent of each other and follow the standard normal distribution. I refer to this article ...
2
votes
2answers
184 views

Code that produces plot in V5 doesn't work in later versions

Bug in introduced after 5, in or before 8.0.4, partly fixed in or before 11.3. I have problem in plotting Integral function. I can compute/plot the graph of this integration below in Mathematica 5.0, ...
3
votes
1answer
106 views

Numerical Integration over experimental numbers

I have a large array {x,y,z} sigma = {{x1,y1,z1},{x2,y2,z2}, ......} where z is a function of x,y: z = f(x,y); the function is known only through its numerical ...
5
votes
3answers
135 views

Different Methods in NIntegrate

I am trying to numerically calculate a multidimensional integral which involves Jacobi elliptic theta functions. The integrand is the following: ...
-2
votes
0answers
49 views

How to solve the set of equations in Mathematica? [closed]

Consider a set of equations $$ \frac{\partial f(\mathbf p,t)}{\partial t}- H\mathbf p \cdot \frac{\partial f(\mathbf p,t)}{\partial \mathbf{p}} = C_{\text{coll}}(\mathbf p,t),\\ \frac{dT_{\gamma}(t)}{...
0
votes
0answers
24 views

Using NIntegrate on a piecewise function twice [closed]

I want to calculate a reduced density operator and project it on a hermite basis afterwards. To do so I use NIntegrate on my piecewise defined wavefunction ...
1
vote
2answers
47 views

Multidimensional NIntegrate with Interpolating

I have a numerically evaluated function f[x,y] (it is impossible to write down analytical epxression for the function f) and ...
0
votes
0answers
29 views

Numerical integration: efficiency and precision

I have an array of values $f[x,y]$ which was calculated numerically for "grid" ${x,y}$ and I have steps ${dx,dy}$. I would like to know how can I perform numerical integration, $$\sum_{i,j}...
0
votes
0answers
69 views

solve $\int x^{-c} \left( 1 + y(x)^2 \right)^{-\frac{a+1}{2}} dy$ where $e^y = x^c + bx$

I am trying to make some progress on solving the following integral: $$\int_{-\infty}^{\infty} x^{-c} \left( 1 + y(x)^2 \right)^{-\frac{a+1}{2}} dy$$ with $y(x)$ defined as $$e^y = x^c + bx$$ for $a \...
0
votes
1answer
31 views

Using NIntegrate to reproduce NProbability over joint Gaussian distribution

Consider a random vector {s,c} with a bivariate normal distribution. For a vector of positive scalars {a, ß, σz}, I'm interested ...
4
votes
0answers
74 views

AppellF1 unevaluated [duplicate]

I have very long symbolic expressions, which I have to evaluate numerically later on. They contain the AppellF1 function, which stays unevaluated for the specific ...
1
vote
1answer
73 views

Fast method for numerical integral (Fouriertransform?)

I want to numerically compute following integral (as fast as possible): \begin{equation} f(x) = \left| \int e^{ \mathrm{i} p x / 2} f(p) \ \mathrm{d}p\right|^2 , \end{equation} where $f(p)$ is given ...
2
votes
1answer
86 views

How to run NDSolve over a large range without freezing?

I am trying to solve a set of coupled differential eqns. I need the solution over a large range of the variable t. But the notebook freezes and stops working. ...
1
vote
0answers
18 views

Problem NIntegrating over 3D Polygon region with 4 points

I am trying to NIntegrate a non-planar polygonal region defined by 4 points, something like this: ...
1
vote
1answer
51 views

Nested integral takes too long with NIntegrate

I am attempting to calculate a nested multiple integral. The code snippet is given by ...
3
votes
0answers
58 views

Why this change gives different results in Integrate?

I'm new in Mathematica and can't understand why changing a number from Real to Integer is giving different results in my equations: ...
2
votes
1answer
73 views

How to implement an “if an error occurs”-condition in Mathematica programming?

In general Mathematica may return a value even if NDSolve has run into error. A simple example is ...
0
votes
1answer
49 views

Definite integral Closed-form or approximation\simplication or a plot diagram shows the variation based on $a$ and $b$

I am not professional in Mathematica and I am struggling to understand how the following function acts $f(x)=\int_{z=0}^\infty \int_{y=0}^{z} \frac{x}{ \sqrt{1-\left(\frac{z^2+y^2-x^2}{2 z y}\right)^2}...
2
votes
1answer
67 views

Two different results for the same differential equation while using “AccuracyGoal”, “WorkingPrecision” and “PrecisionGoal”

I saw some strange behavior as I was solving a differential equation, so I decided to plot the solution in three different conditions. First, I defined the initial conditions and some constants: ...
3
votes
2answers
121 views

Numerically solve the Rayleigh-Plesset equation

I've been trying to numerically solve the modified Rayleigh-Plesset equation (eq. 5 from https://arxiv.org/pdf/1407.5531.pdf) using the same parameters as in the papers. This is my code ...
1
vote
1answer
34 views

What causes the “Nonatomic expression expected at position 1 in Append” error?

I'm very new to mathematica (I just started using it today), I was wondering if someone could explain to me what is wrong with the following piece of code: ...
2
votes
0answers
35 views

How to calculate the numerical integration of the product of two entries of an exponential matrix?

Lets define a $6\times6$ matrix $M(t)$ with entries $m_{ij}$ as ...
3
votes
2answers
236 views

How to numerically verify that principal value?

Mathematica finds ...
0
votes
1answer
47 views

Correct use of Module with Table

This is a MWE of a system of differential equations whose analytical solution I would like to verify numerically. My end goal is to iterate the system of differential equations from ...
2
votes
1answer
48 views

ParametricNDSolve with a delay differential equation

I have a set of delay differential equations that I solve numerically from 0 < t < T. y[T] is then used as the initial ...
5
votes
3answers
252 views

Forcing NDSolve not to store full solution, in order to save memory

When using NDSolve to integrate a time-varying dynamical system (ie, an initial value problem), I often only care about the final value of the dependent variables ...
0
votes
0answers
32 views

Confusion related with NIntegrate and NDSolve

I have the following problem: Suppose that you have a differential equation ...
0
votes
0answers
32 views

Nintegrate providing results much smaller than what is expected

This is the first time I am posting something here. So, apologies if I make any mistake. I am dealing with a numerical integration in Mathematica-11.0 that has a Bessel function in it. In order to ...
1
vote
1answer
54 views

ParametricNDSolve “delayed time” error message

Issue reported to Wolfram, Inc as a possible bug in Version 12.1; CASE:4554034. When trying to solve a system of delay-differential equations with ParametricNDSolve...
7
votes
2answers
309 views

Is it possible to do this two-dimensional numerical integration more precisely?

I am considering the following integral: $$J(x_1^2, x_2^2) := \frac{3 \cdot 2^{15} \pi^4}{96} x_1^2 x_2^2 \int_{-\infty}^\infty d\tau_3 \int_{-\infty}^\infty d\tau_4 \int_{-\infty}^\infty d\tau_5 \...
5
votes
1answer
63 views

Sine vs Sinc vs SphericalBesselJ in NIntegrate

I'm evaluating an oscillatory integral numerically, and ran into a weirdness with NIntegrate, which I've boiled down to a simple case for this question. Consider ...
0
votes
0answers
23 views

What boundary conditions is mathematica enforcing by default? [duplicate]

I'm solving the PDE (Fokker-Planck equation) $$\frac{\partial p}{\partial L}(L, \eta)=\frac{1}{L_{\mathrm{loc}}} \frac{\partial}{\partial \eta}\left[\left(\eta^{2}-1\right) \frac{\partial p}{\partial ...
0
votes
0answers
60 views

How to integrate ParametricNDSolve solution and solve for parameter based on integration result

I have a second-order ODE that depends on a parameter $\rho_0$. For a given $\rho_0$, I can use NDSolve or ParametricNDSolve to get the solution $y(r; \rho_0)$ very easily, but I want to solve for the ...
1
vote
1answer
31 views

Can I configure a guaranteed precision for NIntegrate on a monotone function?

I know there are some great posts already about why PrecisionGoal->n doesn't guarantee the result of NIntegrate will actually ...
0
votes
0answers
38 views

Solve boundary value problem with NDSolve. How to print out approximations to a solution?

I solve particular boundary-value-problem for ODE with NDSolve "Shooting" method. The case is that solution is attained very slow, that seems to mean that boundary-...
2
votes
1answer
104 views

How to model the movement of a mass over a dome?

I'm trying to replicate the graphs and animation found in this page that studies the movement of a mass over a dome solving numerically the differential equation ...
2
votes
1answer
52 views

Calculating the bounce solution numerically

I would like to obtain a numerical solution to the following example bounce equations, $$\begin{align*} \frac{\partial^2 a}{\partial t^2} &= \frac{1}{t^2} a(1-a)(1-3a)-\frac{b^2}{2}(1-a)\\ \frac{\...
1
vote
1answer
68 views

NIntegrate::slwcon, NIntegrate::eincr and NIntegrate::inumri

I have the following code to evaluate the double integral of which the integrand contains summations. ...
2
votes
0answers
51 views

Numerical integral cannot be calculated

I want to solve $\mu$ and $T$ in this equation system: where $g(\omega)=\frac{1}{\mathrm e^{\omega/T}-1}$ , $N_f(\mu,T)=\frac{4\pi}{(2\pi)^3}\int_0^\infty\frac{k^2}{\mathrm{exp}({\frac{k^2-\mu}{T}})+...
4
votes
1answer
90 views

Solve free boundary problem for heat equation

How can I use Mathematica to compute/approximate and plot the solution of the following problem? $\min\{u_t - u_{xx} -1, u \} = 0 \text{ in } (0,T)\times (-1,1)$ $u(0,\cdot) = 0 \text{ in } (-1,1)$...
3
votes
2answers
135 views

Problem with Integration

I want to integrate a function which seems to have no regularity problems. In fact I have defined ...
4
votes
1answer
69 views
2
votes
1answer
53 views

how to plot an approximate Riemann Zeta function beyond $t=180$?

Riemann zeta function $\zeta(s)$ is related to Riemann Xi function $\Xi(z)$ via: $$s=\frac12+ iz,\qquad \Xi(z):=\frac12s(s-1)\pi^{-s/2}\Gamma(s/2)\zeta(s),\tag{1}$$ We found the following function $\...
1
vote
1answer
66 views

Integration of a complicated oscillatory function

I've tried the answers in similar posts but they don't seem to work. As per title, I need to double integrate a complicated quickly oscillatory function. I've checked and there are no poles, the ...

1
2 3 4 5
50