Suppose that we have the given simple integral expression
$$
\int_{-5}^{5} x \int_{-\infty}^{x} e^{\int_{0}^{z} -y dy} dz dx
$$
Writing this out in Mathematica we obtain:
Integrate[x Integrate[Exp[Integrate[-y, {y, 0, z}]], {z, -∞, x}], {x, -5.,…
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 (which was recently added to Mathematica, starting in…
Is there a way to extract the error that Mathematica estimates when calculating a numerical integral using NIntegrate?
Internally Mathematica must keep track of this error, because it is used to determine if the PrecisionGoal has been met.
The…
I am trying to get information on the following integral:
$$
\int_{\pi-0.3}^{\pi-\epsilon} \frac{1}{(3+\cos{x})\sqrt{(3+\cos{x})^2-4}}
$$
The lower limit is somewhat arbitrary; the point is that this integral is known to be divergent if the…
I need to integrate an expensive likelihood L[x] over its n-dimensional domain.
I know that L[x] is decently approximated by a gaussian likelihood G[x], which is very cheap to evaluate.
In particular, L and G share the same maximum.
The…
I have a complicated function $f$ and I want to plot the function $F(x)$ defined by the definite integral of $f$ from $0$ to $x$:
$$
F(x) = \int_0^x f(y)\mathrm dy.
$$
Apparently $f$ cannot be integrated in closed-form, and I use NIntegrate[]…
I'm solving a differential equation numerically by
NDSolve[{p'[r] == -function[r,p[r]], p[0] == pcenter}, p,{r, 0, rmax}]
with function>0. At some r, p[r] becomes negative. I want NDSolve to stop as soon as this happens and save the value of r. Any…
I am trying to specify a bivariate probability density function in Mathematica. As a check, I would like to confirm that it integrates to one. Here is the function:
f[x1_, x2_, u1_, u2_, v11_, v22_, v12_] := Det[2*Pi*{{v11, v12}, {v12,…
I'm trying to numerically integrate a function which has a vector-valued slow part and a much faster component which is shared by all the components, i.e. an integral of the form
$$
\int_a^b\begin{pmatrix}f(x)\\ g(x) \\ h(x)\end{pmatrix}w(x)\,\text…
I am trying to numerically integrate a function that flips sign at a certain location. In the vicinity of this location the function is approximately asymmetric so there are large negative and positive contributions to the integral which presumably…
Hi am trying to compute the following integral in Mathematica:
NIntegrate[(Sign[Cos[q]] Sqrt[Abs[Cos[q]]])/(q+100),{q,0,Infinity}]
But when I run that command I get the following error:
NIntegrate::ncvb: NIntegrate failed to converge to…
I found some of the values remained unevaluated using the following code
Table[NIntegrate[Sin[i x]/((2^x + 1) (Sin[x])), {x, -Pi/2, Pi/2}], {i,70, 90}]
Pick them out, the unevaluated ones remain unevaluated. For example,
NIntegrate[Sin[81 x]/((2^x…
I have a multidimensional integration of the form:
somefunc[t] = NIntegrate[ otherfunc[x, y, z, t ],
{z, z1[t], z2[t]}, {y, y1[t, z], y2[t, z]}, {x, x1[t, z, y], x2[t, z, y]}];
This needs to be evaluated only when $z2 > z1$, $y2 > y1$ and $x2 >…