How can I evaluate an integration with another defined integration inside it? The problem is Sin[θ] has different variable and can not be solved directly.
Asked
Active
Viewed 67 times
0
Michael E2
- 235,386
- 17
- 334
- 747
user42006
- 11
1 Answers
2
From comment's this User.
f[theta_?NumericQ] := NIntegrate[Exp[-5/(2*Sin[theta]*Cos[phi])]/(1 - Exp[-5/(2*Sin[theta]*Cos[phi])]), {phi, 0, Pi},
WorkingPrecision -> 50]
NIntegrate[Sin[theta]*f[theta], {theta, 0, Pi}, WorkingPrecision -> 50]
(* -3.1415926535897932384626433832795028841971693993751 *)
We can identify the number as:
$-\pi$
Edited:
If You want to solve the orginal Question, then:
f[theta_?NumericQ] := NIntegrate[Exp[-5/(2*Sin[theta]*Cos[phi])]/(
1 - Exp[-5/(2*Sin[theta]*Cos[phi])]), {phi, 0, Pi}]
g[theta_?NumericQ] := NIntegrate[Sin[theta]*f[theta], {phi, 0, Pi}]
func = FunctionInterpolation[g[theta], {theta, -1, 1},
MaxRecursion -> 20] // Quiet;
Plot[func[theta], {theta, -1, 1}]
I can find the equation of the curve, which is on Plot:
data = Table[{theta, func[theta]}, {theta, -1, 1, 0.1}];
fit = FindFormula[data, theta, 4, All]
A constant -4.9348 I can find by integral:
f[theta_?NumericQ] := NIntegrate[
Exp[-5/(2*Sin[theta]*Cos[phi])]/(1 - Exp[-5/(2*Sin[theta]*Cos[phi])]), {phi, 0, Pi}, WorkingPrecision -> 50]
NIntegrate[f[theta], {theta, 0, Pi}, WorkingPrecision -> 50] // Quiet
(* -4.9348022005446793094172454999380755676568497036204 *)
We can identify the number as:
$-\frac{\pi ^2}{2}$
and Yours integral is:
$-\frac{1}{2} \pi ^2 \sin (\theta )$
Mariusz Iwaniuk
- 13,841
- 1
- 25
- 41



NIntegrate[Sin[theta]*NIntegrate[Exp[-5/(2*Sin[theta]*Cos[phi])]/( 1 - Exp[-5/(2*Sin[theta]*Cos[phi])]), {phi, 0, Pi}], {theta, 0, Pi}]– Mariusz Iwaniuk Jul 31 '16 at 15:51