Wednesday 14 September 2016

wolfram alpha - Evaluation of complete elliptic integral of second kind




I am currently working to try and solve the integral:



$$\int_{0}^{\frac{\pi}{2}} \sqrt{1-a^2\cos(x)^2} = \sqrt{1-a^2} \; E\left ( 1+\frac{1}{-1+a^2} \right )$$



where $E(m)$ is the complete elliptic integral of second kind with the parameter $m=k^2$ and $0.



This is the soultion I found using WolframAlpha



In this case $m$ is always smaller then $0$, yet $m$ is supposed to be the square of some $k$.




The implementation I found in NumericalRecipies seems to only accept $k$ as argument, evident through a test, plotting values of the positive argument-branch and comparing them with WolframAlphas elliptic function.



However, the NR implementation doesn't use any sort of complex variables (therefor, won't accept them as input).



Do I need another implementation, am I completely off with this.



I am very confused and uncertain about this.



Help would be greatly appreciated, Thanks.


Answer




I found the solution to my problem here:



http://analyticphysics.com/Mathematical%20Methods/A%20Miscellany%20of%20Elliptic%20Integrals.htm



To quote:



$$E(-m)=\sqrt{m+1} E \left (\frac{m+1}{m} \right )$$



Simply building an if clause into my driver to choose $-k$ whenever $k<0$ and then use the formula indicated above gave me the result WolfrAmalpha shows in wolframalpha.com/input/?i=plot+EllipticE%5Bx%5D.




The discussion here was what got me to ask the right question. Thanks Jack D'Aurizio.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...