Mathematica showing strange output for elliptic integral

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
springo
Messages
125
Reaction score
0
Hi,
I was studying calculus and I had a problem while checking my results.

I came to the following result:
[tex]\int_{\frac{\pi}{6}}^{\frac{\pi}{2}}\frac{1}{\sqrt{\sin t}}\:\mathrm{d}t = \sqrt{2}\cdot \mathrm{F}\left(\frac{\pi}{4},\frac{1}{4}\right) \approx1.16817[/tex]

However, Mathematica shows:
[tex]\int_{\frac{\pi}{6}}^{\frac{\pi}{2}}\frac{1}{\sqrt{\sin t}}\:\mathrm{d}t = 2\cdot \mathrm{F}\left(\frac{\pi}{6},2\right) \approx1.16817-9.26622\cdot10^{-17}\mathrm{i}[/tex]
The results are almost identical (numerically) and I believe I didn't make any mistakes... is there a problem with Mathematica here?

Thanks for your help.

PS: Sorry for not using the template but it didn't make much sense here...
 
Physics news on Phys.org
Well, the integral should definitely be a real number. It is a common problem with Mathematica that small imaginary parts appear due to rounding errors.