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$
1
  • 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$
3
  • $\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$
2
  • $\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
0
$\begingroup$

The simplest answer I could come up with is

((Sqrt[2]*
  Sqrt[5 + Cos[2*\[Theta]] + 4*I*Sqrt[3]*Sin[\[Theta]]])/(9*(7 - 
    Cos[2*\[Theta]])))*(2*(3 - 2*I*Sqrt[3]*Sin[\[Theta]])*
 EllipticK[-((I*8*Sqrt[3]*Sin[\[Theta]])/(5 + Cos[2*\[Theta]] - 
       I*4*Sqrt[3]*Sin[\[Theta]]))] - 
    I*(7 - Cos[2*\[Theta]])*
 EllipticE[
  1 - (I*8*Sqrt[3]*Sin[\[Theta]])/(5 + Cos[2*\[Theta]] + 
      I*4*Sqrt[3]*Sin[\[Theta]])]) - ((Sqrt[2]*
  Sqrt[5 + Cos[2*\[Theta]] - 4*Sqrt[3]*I*Sin[\[Theta]]])/(9*(7 - 
    Cos[2*\[Theta]])))*
 (8*Sqrt[3]*Sin[\[Theta]]*
 EllipticK[
  1 - (I*8*Sqrt[3]*Sin[\[Theta]])/(5 + Cos[2*\[Theta]] + 
      I*4*Sqrt[3]*Sin[\[Theta]])] - 
I*(7 - Cos[2*\[Theta]])*
 EllipticE[
  1 + (I*8*Sqrt[3]*Sin[\[Theta]])/(5 + Cos[2*\[Theta]] - 
      I*4*Sqrt[3]*Sin[\[Theta]])])

I have no idea how to treat the complex moduli further...

$\endgroup$
6
  • $\begingroup$ You did this by hand, or by Mathematica? $\endgroup$ – Michael E2 Jan 3 at 22:34
  • $\begingroup$ @MichaelE2 using Mathematica and giving some help with simplification $\endgroup$ – Andreas Jan 3 at 22:37
  • $\begingroup$ Can you show what you did? $\endgroup$ – Michael E2 Jan 3 at 22:38
  • $\begingroup$ @MichaelE2 It was quite involved: used Ulrich Neumann's substitution to calculate the antiderivative, then (the hard part) find the upper limit at u1->Infinity using Series[antiderivative,{u1,Infinity,0}] and then helped Mathematica simplifying a v_e_r_y large expression $\endgroup$ – Andreas Jan 3 at 22:53
  • 1
    $\begingroup$ I guess what I'm trying hint in my second comment is that the answer seems incomplete as is. Unless all one is interested is the result. But the output does not help me learn how to use Mathematica. $\endgroup$ – Michael E2 Jan 3 at 23:03

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.