Numerical Integration Query
I need to evaluate the following integral
1
∫
0
g(y)
y
∫
0
f(z)zy[1]
There is no closed-form solution to the inner integral on F(z), and therefore no closed-form solution for the outer integral. In the case of a single integral, e.g.
y
∫
0
f(z)z=F(y)
one can approximate the definite integral numerically using NIntegrate, but I’m not sure how to do this for the example [1], since the integral of f(z) is supposed to generate a function F(y) so that g(y)F(y) can be integrated.
​
For example, this integral has no explicit solution
In[]:=
ToIntegrate[a_,z_,var_]:=Exp-
2
2
a
z(2
2
z
-1)
var

In[]:=
Integrate[ToIntegrate[.1,z,.01],z]
Out[]=
∫
-2.z(-1+2
2
z
)

z
So if I want to evaluate this for f(z) as “ToIntegrate”
​
1
∫
0
y
y
∫
0
f(z)zy[1]
In[]:=
NIntegrate[y*NIntegrate[ToIntegrate[.1,z,.01],{z,0,y}],{y,0,1}]
NIntegrate
:z = y is not a valid limit of integration.
NIntegrate
:z = y is not a valid limit of integration.
NIntegrate
:z = y is not a valid limit of integration.
General
:Further output of NIntegrate::nlim will be suppressed during this calculation.
Out[]=
0.449737