Numerical Calculation for Inverse Complete Elliptic Integral of The First Kind? [closed]












0












$begingroup$


Is there a way to calculate the inverse of $K(k)$ which is the complete elliptic integral of the first kind.



Ex:$$K^{-1}(K(k))=k$$










share|cite|improve this question









$endgroup$



closed as off-topic by Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas Dec 26 '18 at 6:43


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Newton's method?
    $endgroup$
    – metamorphy
    Dec 25 '18 at 20:14










  • $begingroup$
    I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
    $endgroup$
    – user10560552
    Dec 25 '18 at 20:52












  • $begingroup$
    The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
    $endgroup$
    – Narasimham
    Dec 26 '18 at 6:15


















0












$begingroup$


Is there a way to calculate the inverse of $K(k)$ which is the complete elliptic integral of the first kind.



Ex:$$K^{-1}(K(k))=k$$










share|cite|improve this question









$endgroup$



closed as off-topic by Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas Dec 26 '18 at 6:43


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Newton's method?
    $endgroup$
    – metamorphy
    Dec 25 '18 at 20:14










  • $begingroup$
    I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
    $endgroup$
    – user10560552
    Dec 25 '18 at 20:52












  • $begingroup$
    The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
    $endgroup$
    – Narasimham
    Dec 26 '18 at 6:15
















0












0








0





$begingroup$


Is there a way to calculate the inverse of $K(k)$ which is the complete elliptic integral of the first kind.



Ex:$$K^{-1}(K(k))=k$$










share|cite|improve this question









$endgroup$




Is there a way to calculate the inverse of $K(k)$ which is the complete elliptic integral of the first kind.



Ex:$$K^{-1}(K(k))=k$$







calculus numerical-methods elliptic-integrals






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 25 '18 at 19:29









user10560552user10560552

355




355




closed as off-topic by Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas Dec 26 '18 at 6:43


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas Dec 26 '18 at 6:43


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Carl Schildkraut, KReiser, Eevee Trainer, Saad, onurcanbektas

If this question can be reworded to fit the rules in the help center, please edit the question.












  • $begingroup$
    Newton's method?
    $endgroup$
    – metamorphy
    Dec 25 '18 at 20:14










  • $begingroup$
    I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
    $endgroup$
    – user10560552
    Dec 25 '18 at 20:52












  • $begingroup$
    The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
    $endgroup$
    – Narasimham
    Dec 26 '18 at 6:15




















  • $begingroup$
    Newton's method?
    $endgroup$
    – metamorphy
    Dec 25 '18 at 20:14










  • $begingroup$
    I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
    $endgroup$
    – user10560552
    Dec 25 '18 at 20:52












  • $begingroup$
    The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
    $endgroup$
    – Narasimham
    Dec 26 '18 at 6:15


















$begingroup$
Newton's method?
$endgroup$
– metamorphy
Dec 25 '18 at 20:14




$begingroup$
Newton's method?
$endgroup$
– metamorphy
Dec 25 '18 at 20:14












$begingroup$
I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
$endgroup$
– user10560552
Dec 25 '18 at 20:52






$begingroup$
I know the newton-raphson method, but i want to know if there is another way to calculate the inverse.
$endgroup$
– user10560552
Dec 25 '18 at 20:52














$begingroup$
The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
$endgroup$
– Narasimham
Dec 26 '18 at 6:15






$begingroup$
The first among Jacobi elliptic functions $ ( sn(u), cs(u), dn(u) ) = sin varphi $
$endgroup$
– Narasimham
Dec 26 '18 at 6:15












2 Answers
2






active

oldest

votes


















1












$begingroup$

As @user10560552 answered, solving for $y$ the equation $K(y)=x$ doesnot make much problems using Newton method.



The problem is to get a reasonable starting value for $y_0$.



For a rather large range $(0 leq y leq 0.8)$, we can use a $[2,2]$ Padé approximant built at $y=0$. It would be
$$K(y) simeqfrac pi 2 ,frac{1-frac{249 }{304}y+frac{409 }{4864}y^2 } {1-frac{325 }{304}y+frac{1025 }{4864}y^2 }$$ leaving us with a quadratic equation in $y$ and the retained solution being given by
$$y_{est}= frac{8 left(650 x-249 pi-sqrt{110900 x^2-105732 pi x+30917 pi ^2}
right)}{2050 x-409 pi }$$



Below are reproduced some results
$$left(
begin{array}{ccc}
x & text{approximation} & text{solution} \
1.6 & 0.071353 & 0.071353 \
1.7 & 0.275811 & 0.275799 \
1.8 & 0.431626 & 0.431472 \
1.9 & 0.551809 & 0.551130 \
2.0 & 0.645716 & 0.643856 \
2.1 & 0.720101 & 0.716225 \
2.2 & 0.779850 & 0.773057 \
2.3 & 0.828504 & 0.817928 \
2.4 & 0.868645 & 0.853523 \
2.5 & 0.902173 & 0.881878 \
2.6 & 0.930496 & 0.904545 \
2.7 & 0.954672 & 0.922724 \
2.8 & 0.975507 & 0.937342
end{array}
right)$$



Working with the bad case where $x=2.8$, Newton iterates would be
$$left(
begin{array}{cc}
n & y_n \
0 & 0.975507 \
1 & 0.952724 \
2 & 0.939459 \
3 & 0.937380 \
4 & 0.937342
end{array}
right)$$






share|cite|improve this answer









$endgroup$













  • $begingroup$
    For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
    $endgroup$
    – user10560552
    Dec 26 '18 at 15:40



















0












$begingroup$

For anyone in the future who needs this, $K(k)$ can be computed efficiently using the formula $$K(k)=frac{.5pi}{AGM(1,sqrt{1-k^2})}$$ where $AGM(x,y)$ is the arithmetic-geometric mean and the derivative of $K(k)$ is $$frac{E(k)}{k(1-k^2)}-frac{K(k)}{k}$$ where $E(k)$ is the complete elliptic integral of the second kind, which can be calculated using$$E(k)=K(k)(1-frac{k^2}{2}-sum_{n=0}^infty2^n(a_n-a_{n+1})^2)$$and $a_n$ is computed using the AGM where$$a_0=1;b_0=sqrt{1-k^2}$$$$a_{n+1}=frac{a_n+b_n}{2};b_{n+1}=sqrt{a_nb_n}$$ Then using Newton-raphson functional inversion, define$$K^{-1}(x)=y$$$$x=K(y)$$$$0=K(y)-x$$$$y_{n+1}=y_n-frac{K(y_n)-x}{frac{E(y_n)}{y_n(1-y_n^2)}-frac{K(y_n)}{y_n}}$$after when n > 6 you will get a reasonably accurate result






share|cite|improve this answer











$endgroup$




















    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    As @user10560552 answered, solving for $y$ the equation $K(y)=x$ doesnot make much problems using Newton method.



    The problem is to get a reasonable starting value for $y_0$.



    For a rather large range $(0 leq y leq 0.8)$, we can use a $[2,2]$ Padé approximant built at $y=0$. It would be
    $$K(y) simeqfrac pi 2 ,frac{1-frac{249 }{304}y+frac{409 }{4864}y^2 } {1-frac{325 }{304}y+frac{1025 }{4864}y^2 }$$ leaving us with a quadratic equation in $y$ and the retained solution being given by
    $$y_{est}= frac{8 left(650 x-249 pi-sqrt{110900 x^2-105732 pi x+30917 pi ^2}
    right)}{2050 x-409 pi }$$



    Below are reproduced some results
    $$left(
    begin{array}{ccc}
    x & text{approximation} & text{solution} \
    1.6 & 0.071353 & 0.071353 \
    1.7 & 0.275811 & 0.275799 \
    1.8 & 0.431626 & 0.431472 \
    1.9 & 0.551809 & 0.551130 \
    2.0 & 0.645716 & 0.643856 \
    2.1 & 0.720101 & 0.716225 \
    2.2 & 0.779850 & 0.773057 \
    2.3 & 0.828504 & 0.817928 \
    2.4 & 0.868645 & 0.853523 \
    2.5 & 0.902173 & 0.881878 \
    2.6 & 0.930496 & 0.904545 \
    2.7 & 0.954672 & 0.922724 \
    2.8 & 0.975507 & 0.937342
    end{array}
    right)$$



    Working with the bad case where $x=2.8$, Newton iterates would be
    $$left(
    begin{array}{cc}
    n & y_n \
    0 & 0.975507 \
    1 & 0.952724 \
    2 & 0.939459 \
    3 & 0.937380 \
    4 & 0.937342
    end{array}
    right)$$






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
      $endgroup$
      – user10560552
      Dec 26 '18 at 15:40
















    1












    $begingroup$

    As @user10560552 answered, solving for $y$ the equation $K(y)=x$ doesnot make much problems using Newton method.



    The problem is to get a reasonable starting value for $y_0$.



    For a rather large range $(0 leq y leq 0.8)$, we can use a $[2,2]$ Padé approximant built at $y=0$. It would be
    $$K(y) simeqfrac pi 2 ,frac{1-frac{249 }{304}y+frac{409 }{4864}y^2 } {1-frac{325 }{304}y+frac{1025 }{4864}y^2 }$$ leaving us with a quadratic equation in $y$ and the retained solution being given by
    $$y_{est}= frac{8 left(650 x-249 pi-sqrt{110900 x^2-105732 pi x+30917 pi ^2}
    right)}{2050 x-409 pi }$$



    Below are reproduced some results
    $$left(
    begin{array}{ccc}
    x & text{approximation} & text{solution} \
    1.6 & 0.071353 & 0.071353 \
    1.7 & 0.275811 & 0.275799 \
    1.8 & 0.431626 & 0.431472 \
    1.9 & 0.551809 & 0.551130 \
    2.0 & 0.645716 & 0.643856 \
    2.1 & 0.720101 & 0.716225 \
    2.2 & 0.779850 & 0.773057 \
    2.3 & 0.828504 & 0.817928 \
    2.4 & 0.868645 & 0.853523 \
    2.5 & 0.902173 & 0.881878 \
    2.6 & 0.930496 & 0.904545 \
    2.7 & 0.954672 & 0.922724 \
    2.8 & 0.975507 & 0.937342
    end{array}
    right)$$



    Working with the bad case where $x=2.8$, Newton iterates would be
    $$left(
    begin{array}{cc}
    n & y_n \
    0 & 0.975507 \
    1 & 0.952724 \
    2 & 0.939459 \
    3 & 0.937380 \
    4 & 0.937342
    end{array}
    right)$$






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
      $endgroup$
      – user10560552
      Dec 26 '18 at 15:40














    1












    1








    1





    $begingroup$

    As @user10560552 answered, solving for $y$ the equation $K(y)=x$ doesnot make much problems using Newton method.



    The problem is to get a reasonable starting value for $y_0$.



    For a rather large range $(0 leq y leq 0.8)$, we can use a $[2,2]$ Padé approximant built at $y=0$. It would be
    $$K(y) simeqfrac pi 2 ,frac{1-frac{249 }{304}y+frac{409 }{4864}y^2 } {1-frac{325 }{304}y+frac{1025 }{4864}y^2 }$$ leaving us with a quadratic equation in $y$ and the retained solution being given by
    $$y_{est}= frac{8 left(650 x-249 pi-sqrt{110900 x^2-105732 pi x+30917 pi ^2}
    right)}{2050 x-409 pi }$$



    Below are reproduced some results
    $$left(
    begin{array}{ccc}
    x & text{approximation} & text{solution} \
    1.6 & 0.071353 & 0.071353 \
    1.7 & 0.275811 & 0.275799 \
    1.8 & 0.431626 & 0.431472 \
    1.9 & 0.551809 & 0.551130 \
    2.0 & 0.645716 & 0.643856 \
    2.1 & 0.720101 & 0.716225 \
    2.2 & 0.779850 & 0.773057 \
    2.3 & 0.828504 & 0.817928 \
    2.4 & 0.868645 & 0.853523 \
    2.5 & 0.902173 & 0.881878 \
    2.6 & 0.930496 & 0.904545 \
    2.7 & 0.954672 & 0.922724 \
    2.8 & 0.975507 & 0.937342
    end{array}
    right)$$



    Working with the bad case where $x=2.8$, Newton iterates would be
    $$left(
    begin{array}{cc}
    n & y_n \
    0 & 0.975507 \
    1 & 0.952724 \
    2 & 0.939459 \
    3 & 0.937380 \
    4 & 0.937342
    end{array}
    right)$$






    share|cite|improve this answer









    $endgroup$



    As @user10560552 answered, solving for $y$ the equation $K(y)=x$ doesnot make much problems using Newton method.



    The problem is to get a reasonable starting value for $y_0$.



    For a rather large range $(0 leq y leq 0.8)$, we can use a $[2,2]$ Padé approximant built at $y=0$. It would be
    $$K(y) simeqfrac pi 2 ,frac{1-frac{249 }{304}y+frac{409 }{4864}y^2 } {1-frac{325 }{304}y+frac{1025 }{4864}y^2 }$$ leaving us with a quadratic equation in $y$ and the retained solution being given by
    $$y_{est}= frac{8 left(650 x-249 pi-sqrt{110900 x^2-105732 pi x+30917 pi ^2}
    right)}{2050 x-409 pi }$$



    Below are reproduced some results
    $$left(
    begin{array}{ccc}
    x & text{approximation} & text{solution} \
    1.6 & 0.071353 & 0.071353 \
    1.7 & 0.275811 & 0.275799 \
    1.8 & 0.431626 & 0.431472 \
    1.9 & 0.551809 & 0.551130 \
    2.0 & 0.645716 & 0.643856 \
    2.1 & 0.720101 & 0.716225 \
    2.2 & 0.779850 & 0.773057 \
    2.3 & 0.828504 & 0.817928 \
    2.4 & 0.868645 & 0.853523 \
    2.5 & 0.902173 & 0.881878 \
    2.6 & 0.930496 & 0.904545 \
    2.7 & 0.954672 & 0.922724 \
    2.8 & 0.975507 & 0.937342
    end{array}
    right)$$



    Working with the bad case where $x=2.8$, Newton iterates would be
    $$left(
    begin{array}{cc}
    n & y_n \
    0 & 0.975507 \
    1 & 0.952724 \
    2 & 0.939459 \
    3 & 0.937380 \
    4 & 0.937342
    end{array}
    right)$$







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Dec 26 '18 at 5:44









    Claude LeiboviciClaude Leibovici

    124k1157135




    124k1157135












    • $begingroup$
      For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
      $endgroup$
      – user10560552
      Dec 26 '18 at 15:40


















    • $begingroup$
      For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
      $endgroup$
      – user10560552
      Dec 26 '18 at 15:40
















    $begingroup$
    For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
    $endgroup$
    – user10560552
    Dec 26 '18 at 15:40




    $begingroup$
    For x values larger than 0.8 how would one get a reasonable first guess, and doesn't the newton-method fail at 0 & 1 how would one correct that, or get analytical continuation for possibly the whole domain?
    $endgroup$
    – user10560552
    Dec 26 '18 at 15:40











    0












    $begingroup$

    For anyone in the future who needs this, $K(k)$ can be computed efficiently using the formula $$K(k)=frac{.5pi}{AGM(1,sqrt{1-k^2})}$$ where $AGM(x,y)$ is the arithmetic-geometric mean and the derivative of $K(k)$ is $$frac{E(k)}{k(1-k^2)}-frac{K(k)}{k}$$ where $E(k)$ is the complete elliptic integral of the second kind, which can be calculated using$$E(k)=K(k)(1-frac{k^2}{2}-sum_{n=0}^infty2^n(a_n-a_{n+1})^2)$$and $a_n$ is computed using the AGM where$$a_0=1;b_0=sqrt{1-k^2}$$$$a_{n+1}=frac{a_n+b_n}{2};b_{n+1}=sqrt{a_nb_n}$$ Then using Newton-raphson functional inversion, define$$K^{-1}(x)=y$$$$x=K(y)$$$$0=K(y)-x$$$$y_{n+1}=y_n-frac{K(y_n)-x}{frac{E(y_n)}{y_n(1-y_n^2)}-frac{K(y_n)}{y_n}}$$after when n > 6 you will get a reasonably accurate result






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      For anyone in the future who needs this, $K(k)$ can be computed efficiently using the formula $$K(k)=frac{.5pi}{AGM(1,sqrt{1-k^2})}$$ where $AGM(x,y)$ is the arithmetic-geometric mean and the derivative of $K(k)$ is $$frac{E(k)}{k(1-k^2)}-frac{K(k)}{k}$$ where $E(k)$ is the complete elliptic integral of the second kind, which can be calculated using$$E(k)=K(k)(1-frac{k^2}{2}-sum_{n=0}^infty2^n(a_n-a_{n+1})^2)$$and $a_n$ is computed using the AGM where$$a_0=1;b_0=sqrt{1-k^2}$$$$a_{n+1}=frac{a_n+b_n}{2};b_{n+1}=sqrt{a_nb_n}$$ Then using Newton-raphson functional inversion, define$$K^{-1}(x)=y$$$$x=K(y)$$$$0=K(y)-x$$$$y_{n+1}=y_n-frac{K(y_n)-x}{frac{E(y_n)}{y_n(1-y_n^2)}-frac{K(y_n)}{y_n}}$$after when n > 6 you will get a reasonably accurate result






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        For anyone in the future who needs this, $K(k)$ can be computed efficiently using the formula $$K(k)=frac{.5pi}{AGM(1,sqrt{1-k^2})}$$ where $AGM(x,y)$ is the arithmetic-geometric mean and the derivative of $K(k)$ is $$frac{E(k)}{k(1-k^2)}-frac{K(k)}{k}$$ where $E(k)$ is the complete elliptic integral of the second kind, which can be calculated using$$E(k)=K(k)(1-frac{k^2}{2}-sum_{n=0}^infty2^n(a_n-a_{n+1})^2)$$and $a_n$ is computed using the AGM where$$a_0=1;b_0=sqrt{1-k^2}$$$$a_{n+1}=frac{a_n+b_n}{2};b_{n+1}=sqrt{a_nb_n}$$ Then using Newton-raphson functional inversion, define$$K^{-1}(x)=y$$$$x=K(y)$$$$0=K(y)-x$$$$y_{n+1}=y_n-frac{K(y_n)-x}{frac{E(y_n)}{y_n(1-y_n^2)}-frac{K(y_n)}{y_n}}$$after when n > 6 you will get a reasonably accurate result






        share|cite|improve this answer











        $endgroup$



        For anyone in the future who needs this, $K(k)$ can be computed efficiently using the formula $$K(k)=frac{.5pi}{AGM(1,sqrt{1-k^2})}$$ where $AGM(x,y)$ is the arithmetic-geometric mean and the derivative of $K(k)$ is $$frac{E(k)}{k(1-k^2)}-frac{K(k)}{k}$$ where $E(k)$ is the complete elliptic integral of the second kind, which can be calculated using$$E(k)=K(k)(1-frac{k^2}{2}-sum_{n=0}^infty2^n(a_n-a_{n+1})^2)$$and $a_n$ is computed using the AGM where$$a_0=1;b_0=sqrt{1-k^2}$$$$a_{n+1}=frac{a_n+b_n}{2};b_{n+1}=sqrt{a_nb_n}$$ Then using Newton-raphson functional inversion, define$$K^{-1}(x)=y$$$$x=K(y)$$$$0=K(y)-x$$$$y_{n+1}=y_n-frac{K(y_n)-x}{frac{E(y_n)}{y_n(1-y_n^2)}-frac{K(y_n)}{y_n}}$$after when n > 6 you will get a reasonably accurate result







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 26 '18 at 16:42

























        answered Dec 26 '18 at 2:12









        user10560552user10560552

        355




        355















            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen