1
$\begingroup$

The following numerical integral within a numerical integral:

NIntegrate[ Exp[ -NIntegrate[ 1/(y - (1 - Exp[-(5/6) + (2 y)/3])), {y, z, 1}]] , {z, -(3/2) ProductLog[-(2/(3 E^(5/6)))], 1}] 

gives "NIntegrate::nlim: y = z is not a valid limit of integration" error messages prior to giving an estimate 0.250255.

How might I revise my code to avoid the errors? If the estimate is not valid, please explain why to me. Thank you!

$\endgroup$

1 Answer 1

4
$\begingroup$
Clear["Global`*"] 

To ensure that the inner integral never attempts to evaluate before z has a numeric value, use

int1[z_?NumericQ] := NIntegrate[1/(y - (1 - Exp[-(5/6) + (2 y)/3])), {y, z, 1}] int2 = NIntegrate[Exp[-int1[z]], {z, -(3/2) ProductLog[-(2/(3 E^(5/6)))], 1}] (* 0.250255 *) 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.