• Support PF! Buy your school textbooks, materials and every day products Here!

Mathematica showing strange output for elliptic integral

  • Thread starter springo
  • Start date
  • #1
126
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...
 

Answers and Replies

  • #2
316
0
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.
 

Related Threads on Mathematica showing strange output for elliptic integral

Replies
0
Views
958
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
11
Views
471
Replies
10
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
14
Views
2K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
8
Views
2K
Replies
2
Views
4K
  • Last Post
Replies
4
Views
1K
Top