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., 5}]
30.0795
Question:
Is it possible to do a numerical integration on this expression by using NIntegrate
?
A very naive attempt gives us the following errors:
NIntegrate[x NIntegrate[Exp[NIntegrate[-y, {y, 0, z}]], {z, -∞, x}], {x, -5, 5}]
NIntegrate::nlim: y = z is not a valid limit of integration
Notice that we want everything to be a numerical integration, this includes the inner integrals.
The problem is that one of the NIntegrate
s is an argument to the exponential function and this does not allow us to write the double integral with only one NIntegrate
as mentioned in here
Motivation
I'm trying to evaluate an expression that is too complicated for Mathematica to do symbolically and it is composed on integrals of the kind mentioned above.