WolframAlpha functionality: Computing nested integrals

369 Views Asked by At

Can wolframpalpha support the numerical calculation of the following type:

$$ \int_{x=0}^\infty f(x) e^{\int_{z=0}^\infty g(x,z)dz} dx $$

Note that the inside integral is in such form where parameter x cannot be separated from it.

Thanks in advance

PS: The respective command would have been:

int(f(x)*exp[int(g(x,z),{z,0,Infinity})],{x,0,Infinity})

2

There are 2 best solutions below

0
On BEST ANSWER

I don't see how to evaluate this type of integral in WolframAlpha.

In Mathematica, we could do this type of integral like so:

h[x_?NumericQ] := NIntegrate[g[x, z], {z, 0, Infinity}];
NIntegrate[f[x] Exp[h[x]], {x, 0, Infinity}]

As a concrete example:

h[x_?NumericQ] := NIntegrate[Sin[Exp[-x*z^2]], {z, 0, Infinity}];
NIntegrate[Exp[-1/x^2] Exp[-x^2] E^h[x], {x, 0, Infinity}]

(* Out: 0.262062 *)

However, WolframAlpha simply doesn't support this type of evaluation sequence and I don't see around the way intermediate definition.

More generally, it's really not the case that WolframAlpha supports general Mathematica syntax. If you need to evaluate this type of integral with any regularity, I suggest that you get Mathematica, or some general programmatic tool.

5
On

Sure. Syntactically "Integrate[]" isn't different than any other function. So, leaving out all parameter specifications, it's just

Integrate[f[] Exp[Integrate[]]]

or in more detail

Integrate[f[x] Exp[Integrate[g[x,z],{z,0,Infinity}]],{x,0,Infinity}]

I don't know if you mean "numerical calculation" literally here, but for any given function $g$ and fixed parameter $x$, the command Integrate[g[x,z],{z,0,Infinity}] will try to compute the integral. NIntegrate is a numerical integration command in Mathematica btw.