0
$\begingroup$

I have a difficulty in calculating the following integral with Mathematica:

$$ \int^{\pi}_{0}\rm d\theta_1\frac{ \sin^2\theta_1[2(2-\cos\theta_1\cos\theta)^2+(\sin\theta\sin\theta_1)^2]}{[(2-\cos\theta_1\cos\theta)^2-(\sin\theta\sin\theta_1)^2]^{5/2}}, $$ where $ \pi>\theta>0 $.

Here is the code:

Integrate[Sin[th1]^2*(2*(2 - Cos[th]*Cos[th1])^2 + (Sin[th]*Sin[th1])^2)/((2 - Cos[th]*Cos[th1])^2 - (Sin[th]*Sin[th1])^2)^(5/2), {th1, 0, Pi}]
$\endgroup$
  • 3
    $\begingroup$ Rubi`Int can evaluate analytically the indefinite integral with respect to $ \theta_1 $, involved with EllipticE. $\endgroup$ – Αλέξανδρος Ζεγγ Dec 22 '18 at 11:20
1
$\begingroup$

If numerical solution is sufficient:

int[th_?NumericQ] :=NIntegrate[Sin[th1]^2*(2*(2 - Cos[th]*Cos[th1])^2 +(Sin[th]*Sin[th1])^2)/((2 - Cos[th]*Cos[th1])^2 - (Sin[th]*Sin[th1])^2)^(5/2)
, {th1, 0, Pi}]

Plot[int[th], {th, 0, Pi}, PlotRange -> {0, 1}]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks for your answer. Yes, numerical solution can be obtained. However, I think there is analytical solution, because when I use "nlm = NonlinearModelFit[data, a1 + a2*Sin[x] + a3*Sin[x]^2 + a8/(1 + a9^2*Sin[x]), {a1, a2, a3, a8, a9}, x]" to fit the numerical solution, the fitted curve is almost 100% same as the numerical curve as you plotted. So I better try to find this analytical solution. $\endgroup$ – Qin-Tao Song Oct 24 '18 at 2:15
  • $\begingroup$ @Qin-TaoSong Usually the Weierstrass substitution th1->2 ArcTan[u1] helps for solving this kind of integral $\endgroup$ – Ulrich Neumann Oct 24 '18 at 7:21
  • $\begingroup$ Thanks, I will try it $\endgroup$ – Qin-Tao Song Oct 25 '18 at 12:17
1
$\begingroup$

Making use of

f[x_?NumericQ] =  NIntegrate[ Sin[th1]^2*(2*(2 - Cos[x]*Cos[th1])^2 + (Sin[x]*
     Sin[th1])^2)/((2 - Cos[x]*Cos[th1])^2 - (Sin[x]*Sin[th1])^2)^(5/2), {th1, 0, Pi}]

,one obtains

f[Pi/4]

0.676581

and

Plot[f[x], {x, 0, Pi}]

enter image description here

$\endgroup$
  • $\begingroup$ Shouldn't the assignment be delayed? as in, := instead of =? $\endgroup$ – AccidentalFourierTransform Oct 23 '18 at 15:58
  • $\begingroup$ Thanks a lot, numerical solution can be obtained. $\endgroup$ – Qin-Tao Song Oct 24 '18 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.