elliptic integral

lemelinm's picture

Hi all,

While solving a différential equation, I encounter an integral:

 

> Int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi);

                         /phi                         
                        |               1             
                        |     --------------------- ds
                        |                     (1/2)   
                       /0     /     2       2\        
                              \1 - k  sin(s) /        

with k<1.  But Maple don't want to give me the special function F(k,phi)

>value(%) assuming k < 1;

                     /          1                        \
                  int|---------------------, s = 0 .. phi|
                     |                (1/2)              |
                     |/     2       2\                   |
                     \\1 - k  sin(s) /                   /

What I found in Abramowitz, is that if phi vary from 0 to Pi/2, it's an elliptic integral of the first kind. (p. 608)

> Int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. (1/2)*Pi);

                       /1/2 Pi                         
                      |                  1             
                      |        --------------------- ds
                      |                        (1/2)   
                     /0        /     2       2\        
                               \1 - k  sin(s) /        
> value(%) assuming 0 < k  < 1;

                                        /   1\
                               EllipticF|k, -|
                                        \   k/
                               ---------------
                                      k       

but I do need from 0 to phi.

In addition, there is a reference about the Jacobi elliptic function (p.569) wich is suppose to be the inverse of the integral I want to solve.

Can someone untangle this for me.

Thanks in advance

Mario

alec's picture

Assumptions

The form of the answer in this case depends not on k, but on phi.

int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi) assuming phi > 0, phi < Pi/2;

                           2 1/2
              (1 - sin(phi) )    EllipticF(sin(phi), k)
              -----------------------------------------
                              cos(phi)
simplify(%,symbolic);
                        EllipticF(sin(phi), k)

You can see other possible answers using

int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi, AllSolutions);

I should also add that the followings warnings look dirty,

int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi);

Warning, unable to determine if -1/2*Pi+2*Pi*_Z3 is 
between 0 and phi; try to use assumptions or set 
_EnvAllSolutions to true

Warning, unable to determine if 1/2*Pi+2*Pi*_Z4 is 
between 0 and phi; try to use assumptions or set 
_EnvAllSolutions to true

Warning, unable to determine if 1/2*Pi+Pi*_Z5 is 
between 0 and phi; try to use assumptions or set 
_EnvAllSolutions to true

_______________
Alec Mihailovs
Maplesoft Member

EllipticF

Is this of any use?

I1 := Int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi):
I2 := student[changevar](s=t*phi*2/Pi,I1,t);
value(I2) assuming k > 0, k < 1, phi > 0;
map(convert,%,EllipticF);

or perhaps..

Now, how does this match up with the result from Alec's suggestion?

int(2/(1-k^2*sin(2*t*phi/Pi)^2)^(1/2)/Pi*phi,
t=0..1/2*Pi,AllSolutions) assuming k>0, k<1, phi>0;
simplify(%,symbolic);
alec's picture

Well

It matches well in the suggested form,

int(2/(1-k^2*sin(2*t*phi/Pi)^2)^(1/2)/Pi*phi,
t=0..1/2*Pi) assuming phi > 0, phi < Pi/2;

                           2 1/2
              (1 - sin(phi) )    EllipticF(sin(phi), k)
              -----------------------------------------
                              cos(phi)
 
simplify(%,symbolic);

                        EllipticF(sin(phi), k)

_______________
Alec Mihailovs
Maplesoft Member

lemelinm's picture

Well, then it was the InverseJacobiAM

Thanks for so far, but there is another step to make

 

> sol1 := int(1/sqrt(1-k^2*sin(s)^2), s = 0 .. phi) assuming phi > 0, phi < (1/2)*Pi;

                                    (1/2)                       
                     /            2\                            
                     \1 - sin(phi) /      EllipticF(sin(phi), k)
             sol1 := -------------------------------------------
                                      cos(phi)                  
> sol2 := simplify(sol1, symbolic);

                       sol2 := EllipticF(sin(phi), k)

But if you do ?sn, you will see  the following:

FunctionAdvisor( definition, InverseJacobiAM);

wich is exactly my integral and moreover, it is stated that there is no restriction on k and phi.

But there is a subtil difference.  It's suppose to be

InverseJacobiAM(phi,k) which Maple doesn't give????

so I can do

JacobiAM(InverseJacobiAM(phi,k))=phi  #but....

To guide you in where I am going with this is:  I have:

f(t,k)=u  where u = EllipticF(phi,k)

sn(f(t,k),k)=sn(u,k)=sin(phi) #this is the critical part

Now, having made a change of variable earlier : sin(theta/2)=k*sin(phi) I have

theta=2*arcsin(k*sn(f(t,k),k))

wich give me the only thing I know wich is the answer and it is exacty what I need meaning theta in fonction of the time and for a k fixed

Could you please help me for the last step?

Thanks

mario.lemelin@cgocable.ca

alec's picture

Sorry Mario

Sorry, Mario, I've read 3 or 4 times your post but still couldn't understand it. What do you want, exactly?

_______________
Alec Mihailovs
Maplesoft Member

lemelinm's picture

Ok! Let me try again

<p>First of all, sorry for my poor phrasing, english is not my first language.</p>
<p>The fact is that I have this:</p>
<p>f(t,k) =int(1/sqrt(1-k^2*sin(phi)^2),s=0..phi)</p>
<p>if you do</p>
<p>FunctionAdvisor( definition, InverseJacobiAM);</p>
<p>you see that this is exactly my integral and it's with no restriction on k and phi.&nbsp; So theoretically, Maple should give me</p>
<p>f(t,k)=InverseJacobi(phi,k)</p>
<p>Now I do</p>
<p>JacobiAM(f(t,k),k)=JacobiAM(InverseJacobi(phi,k)</p>
<p>JacobiAM(f(t,k),k)=phi</p>
<p>but having made a change of variable earlier : sin(theta/2)=k*sin(phi)</p>
<p>The only way to have to solution (that I know) is that</p>
<p>JacobiAM(f(t,k),k) must be equal to sin(phi)</p>
<p>so I can have</p>
<p>theta=2*arcsin(k*JakobiAM(f(t,k),k))</p>
<p>And that's where I am stuck theoretically.&nbsp; Why Maple give EllipticF(sin(phi),k)? I don't know the inverse of this special fonction.</p>
<p>Note that in my book, JacobiAM is replace be sn.&nbsp; And if you do ?sn, you are redirected immediatelly at those JacobiAM and others.</p>
<p>So my problem is that last step.</p>
<p>&nbsp;</p>
<p>mario.lemelin@cgocable.ca</p>

lemelinm's picture

OUPS! I don't know why those <p> and <\p> appears

First of all, sorry for my poor phrasing, english is not my first language.

The fact is that I have this:
f(t,k) =int(1/sqrt(1-k^2*sin(phi)^2),s=0..phi)
if you do
FunctionAdvisor( definition, InverseJacobiAM);
you see that this is exactly my integral and it's with no restriction on k and phi.

So theoretically, Maple should give me
f(t,k)=InverseJacobiAM(phi,k)

Now I do
JacobiAM(f(t,k),k)=JacobiAM(InverseJacobiAM(phi,k)
JacobiAM(f(t,k),k)=phi
but having made a change of variable earlier : sin(theta/2)=k*sin(phi)
The only way to have to solution (that I know) is that
JacobiAM(f(t,k),k) must be equal to sin(phi)
so I can have
theta=2*arcsin(k*JakobiAM(f(t,k),k))
And that's where I am stuck theoretically

Why Maple give EllipticF(sin(phi),k)? I don't know the inverse of this special fonction.
Note that in my book, JacobiAM is replace be sn. And if you do ?sn, you are redirected immediatelly at those JacobiAM and others.
So my problem is that last step.

 

mario.lemelin@cgocable.ca

alec's picture

InverseJacobiAM

The implementation of special functions in Maple (and in other CAS), is not the same as in the books (and it varies from one CAS to another one, and from one book to another one, too). The difference between InverseJacobiAM (which is not the inverse function of JacobiAM in Maple, in spite of its name) and EllipticF, is described rather clearly in ?InverseJacobiAM.

Simply speaking, one of them is using sqrt(1-a^2) and another one sqrt(1+a)*sqrt(1-a) which is not the same for complex values.

Some confusion may be caused by the title of the help page -

"InverseJacobiAM - The inverse of the Jacobi amplitude function am"

But if you read through it, you will see that

"With some restrictions on the values of the function parameters, InverseJacobiAM is the inverse of the amplitude JacobiAM function"

and the restrictions are described there.

I still don't exactly understand what input and what output you would like to see.

_______________
Alec Mihailovs
Maplesoft Member

lemelinm's picture

In short

I have

f(t,k)=int(1/sqrt(1-k^2*sin(s)^2),s=0..phi)

so suppose I write

f(t,k)=F(phi,k)

where F(phi,k) is the solution of the integral.  Then

invF(f(t,k))=invF(F(phi,k))

Since I did a change of variable sin(theta/2)=k*sin(phi), the only way to have the answer wich is:

theta=2*arcsin(k*invF(f(t,k))

is to prove that invF(F(phi,k)) is equal to sin(phi)

Hope this will help.

mario.lemelin@cgocable.ca

alec's picture

I'm not sure

I'm not sure that this is helpful, but something like following might work,

f(t,k)=int(1/sqrt(1-k^2*sin(s)^2),s=0..phi) 
    assuming phi > 0,phi < Pi/2:
simplify(%,symbolic);

                   f(t, k) = EllipticF(sin(phi), k)

solve(%,sin(phi));

                         JacobiSN(f(t, k), k)

solve(sin(theta/2)=k*%, theta);

                   2 arcsin(k JacobiSN(f(t, k), k))

_______________
Alec Mihailovs
Maplesoft Member

lemelinm's picture

That's exactly what I needed. Thanks Alec!

mario.lemelin@cgocable.ca

lemelinm's picture

HUM.... I am still wondering

 When you look at:

f(t,k)=int(1/sqrt(1-k^2*sin(s)^2),s=0..phi)

I found in Maple something confusing.  Look at the Assistants -> SpecialFunction

Select the special function InverseJacobiAM and explore the integral_form.  You will see that it's in fact the integral I have to solve and that there is no restrictions on k and phi (that's what is written).  So I should write:

 
> f(t, k) = InverseJacobiAM(phi, k);

But there is no way to arrive to the solution I am suppose to find.  For a beginner like me about special function, this is quite confusing.

try indefinite int

You might find it useful to try an indefinite integral instead of a definite integral:

int(1/sqrt(1-k^2*sin(s)^2),s);simplify(%,trig);radsimp(%);

This seems fairly clean and unrestricted.
 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}