I have the problem quite similar as in: Nested NIntegrate I define two functions:
r[x_] := Evaluate[q[x] /. NDSolve[{q'[t] == 0.0001 + (-1 + I*1 + q[t])*q[t],q[0] == 0}, q,
{t, 0, 50}]]
fn[k_?NumericQ] := Exp[8*NIntegrate[r[s]*Exp[2*beta*1] + 8*r[s], {s, 0, k}]]
beta=1
When I want to know the value of:
NIntegrate[fn[k], {k, 0, 5}]
I obtain following error:
NIntegrate::inum: "Integrand fn[k] is not numerical at {k} = {0.03978659976289378`}."
Adding ?NumericQ to r[k_] I obtain error:
NIntegrate::inumr: "The integrand fn[k] has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,5}}"
What do I wrong?