+
    iI:                         R t ^ RIHtHtHtHt ^ RIHtHt ^ RI	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHt  ! R
 R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )zElliptic Integrals. )SpiIRational)DefinedFunctionArgumentIndexError)Dummyuniquely_named_symbol)sign)atanh)sqrt)sintan)gamma)hypermeijergc                   f   a  ] tR t^t o Rt]R 4       tRR ltR tRR lt	R t
R tR tR	 tR
tV tR# )
elliptic_ka  
The complete elliptic integral of the first kind, defined by

.. math:: K(m) = F\left(\tfrac{\pi}{2}\middle| m\right)

where $F\left(z\middle| m\right)$ is the Legendre incomplete
elliptic integral of the first kind.

Explanation
===========

The function $K(m)$ is a single-valued function on the complex
plane with branch cut along the interval $(1, \infty)$.

Note that our notation defines the incomplete elliptic integral
in terms of the parameter $m$ instead of the elliptic modulus
(eccentricity) $k$.
In this case, the parameter $m$ is defined as $m=k^2$.

Examples
========

>>> from sympy import elliptic_k, I
>>> from sympy.abc import m
>>> elliptic_k(0)
pi/2
>>> elliptic_k(1.0 + I)
1.50923695405127 + 0.625146415202697*I
>>> elliptic_k(m).series(n=3)
pi/2 + pi*m/8 + 9*pi*m**2/128 + O(m**3)

See Also
========

elliptic_f

References
==========

.. [1] https://en.wikipedia.org/wiki/Elliptic_integrals
.. [2] https://functions.wolfram.com/EllipticIntegrals/EllipticK

c                   VP                   '       d   \        \        P                  ,          # V\        P                  J d@   ^\        \	        ^^4      ,          ,          \        \	        R^4      4      ^,          ,          # V\        P                  J d   \        P                  # V\        P                  J d?   \        \	        ^^4      4      ^,          ^\        ^\        ,          4      ,          ,          # V\        P                  \        P                  \        \        P                  ,          \        \        P                  ,          \        P                  39   d   \        P                  # R# )   N)is_zeror   r   Halfr   r   OneComplexInfinityNegativeOner   InfinityNegativeInfinityr   Zero)clsms   &&h/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/functions/special/elliptic_integrals.pyevalelliptic_k.eval:   s    999aff9!&&[R!Q''hr1o(>(AAA!%%Z$$$!--!Q(!+QtAbDz\::1::q111QZZ<Q'''):):< <66M<    c                    V P                   ^ ,          p\        V4      ^V,
          \        V4      ,          ,
          ^V,          ^V,
          ,          ,          #     )args
elliptic_er   )selfargindexr    s   && r!   fdiffelliptic_k.fdiffH   s<    IIaL1Q
1 55!QUDDr$   c                    V P                   ^ ,          pVP                  ;'       d    V^,
          P                  RJ d    V P                  VP	                  4       4      # R# )r'   FNr(   is_realis_positivefunc	conjugater*   r    s   & r!   _eval_conjugateelliptic_k._eval_conjugateL   sG    IIaLII--1q5--%799Q[[]++ 8r$   c                f    ^ RI Hp V! V P                  \        4      P	                  WVR7      4      # r'   )hyperexpand)nlogx)sympy.simplifyr9   rewriter   _eval_nseries)r*   xr:   r;   cdirr9   s   &&&&& r!   r>   elliptic_k._eval_nseriesQ   s)    .4<<.<<Q$<OPPr$   c                    \         \        P                  ,          \        \        P                  \        P                  3\        P                  3V4      ,          # N)r   r   r   r   r   r*   r    kwargss   &&,r!   _eval_rewrite_as_hyper!elliptic_k._eval_rewrite_as_hyperU   s1    !&&y/!%%1===r$   c                    \        \        P                  \        P                  3. 3\        P                  3\        P                  33V) 4      ^,          #    )r   r   r   r   rD   s   &&,r!   _eval_rewrite_as_meijerg#elliptic_k._eval_rewrite_as_meijergX   s;    ("-	AFF9/ErJ1LLr$   c                T    V P                   ^ ,          pVP                  '       d   R# R# )r'   TN)r(   is_infiniter4   s   & r!   _eval_is_zeroelliptic_k._eval_is_zero[   s     IIaL=== r$   c           
         ^ RI Hp \        \        RV4      P                  4      pV P
                  ^ ,          pV! ^\        ^V\        V4      ^,          ,          ,
          4      ,          V^ \        ^,          34      # r'   )Integralt)	sympy.integrals.integralsrS   r   r	   namer(   r   r   r   )r*   r(   rE   rS   rT   r    s   &*,   r!   _eval_rewrite_as_Integral$elliptic_k._eval_rewrite_as_Integral`   s[    6'T2778IIaL$q1SVQY;//!Q1>>r$    N   r&   )__name__
__module____qualname____firstlineno____doc__classmethodr"   r,   r5   r>   rF   rK   rO   rW   __static_attributes____classdictcell____classdict__s   @r!   r   r      sJ     *X  E,
Q>M
? ?r$   r   c                   P   a  ] tR t^gt o Rt]R 4       tR	R ltR tR t	R t
RtV tR# )

elliptic_fa  
The Legendre incomplete elliptic integral of the first
kind, defined by

.. math:: F\left(z\middle| m\right) =
          \int_0^z \frac{dt}{\sqrt{1 - m \sin^2 t}}

Explanation
===========

This function reduces to a complete elliptic integral of
the first kind, $K(m)$, when $z = \pi/2$.

Note that our notation defines the incomplete elliptic integral
in terms of the parameter $m$ instead of the elliptic modulus
(eccentricity) $k$.
In this case, the parameter $m$ is defined as $m=k^2$.

Examples
========

>>> from sympy import elliptic_f, I
>>> from sympy.abc import z, m
>>> elliptic_f(z, m).series(z)
z + z**5*(3*m**2/40 - m/30) + m*z**3/6 + O(z**6)
>>> elliptic_f(3.0 + I/2, 1.0 + I)
2.909449841483 + 1.74720545502474*I

See Also
========

elliptic_k

References
==========

.. [1] https://en.wikipedia.org/wiki/Elliptic_integrals
.. [2] https://functions.wolfram.com/EllipticIntegrals/EllipticF

c                   VP                   '       d   \        P                  # VP                   '       d   V# ^V,          \        ,          pVP                  '       d   V\        V4      ,          # V\        P                  \        P                  39   d   \        P                  # VP                  4       '       d   \        V) V4      ) # R# )rJ   N)
r   r   r   r   
is_integerr   r   r   could_extract_minus_signrg   )r   zr    ks   &&& r!   r"   elliptic_f.eval   s    99966M999HaCF<<<Z]?"1::q112266M''))r1%%% *r$   c                   V P                   w  r#\        ^V\        V4      ^,          ,          ,
          4      pV^8X  d
   ^V,          # V^8X  dy   \        W#4      ^V,          ^V,
          ,          ,          \	        W#4      ^V,          ,          ,
          \        ^V,          4      ^^V,
          ,          V,          ,          ,
          # \        W4      hrZ   )r(   r   r   r)   rg   r   )r*   r+   rk   r    fms   &&   r!   r,   elliptic_f.fdiff   s    yy!aA	k/"q=R4K]q$ac1q5k2Z5Eqs5KK!HaQil+, - 00r$   c                    V P                   w  rVP                  ;'       d    V^,
          P                  RJ d/   V P                  VP	                  4       VP	                  4       4      # R# )r[   FNr/   r*   rk   r    s   &  r!   r5   elliptic_f._eval_conjugate   sM    yyII--1q5--%799Q[[]AKKM:: 8r$   c           
     
   ^ RI Hp \        \        RV4      P                  4      pV P
                  ^ ,          V P
                  ^,          reV! ^\        ^V\        V4      ^,          ,          ,
          4      ,          V^ V34      # rR   )rU   rS   r   r	   rV   r(   r   r   )r*   r(   rE   rS   rT   rk   r    s   &*,    r!   rW   $elliptic_f._eval_rewrite_as_Integral   sa    6'T2778yy|TYYq\14Ac!faiK01Aq!9==r$   c                    V P                   w  rVP                  '       d   R # VP                  '       d   VP                  '       d   R # R# R# )TN)r(   r   is_extended_realrN   rr   s   &  r!   rO   elliptic_f._eval_is_zero   s8    yy999!--- #0r$   rY   NrZ   )r\   r]   r^   r_   r`   ra   r"   r,   r5   rW   rO   rb   rc   rd   s   @r!   rg   rg   g   s8     'R & &1;
> r$   rg   c                   p   a a ] tR t^t oRt]R
R l4       tRR ltR tRV 3R llt	R t
R tR tR	tVtV ;t# )r)   a(  
Called with two arguments $z$ and $m$, evaluates the
incomplete elliptic integral of the second kind, defined by

.. math:: E\left(z\middle| m\right) = \int_0^z \sqrt{1 - m \sin^2 t} dt

Called with a single argument $m$, evaluates the Legendre complete
elliptic integral of the second kind

.. math:: E(m) = E\left(\tfrac{\pi}{2}\middle| m\right)

Explanation
===========

The function $E(m)$ is a single-valued function on the complex
plane with branch cut along the interval $(1, \infty)$.

Note that our notation defines the incomplete elliptic integral
in terms of the parameter $m$ instead of the elliptic modulus
(eccentricity) $k$.
In this case, the parameter $m$ is defined as $m=k^2$.

Examples
========

>>> from sympy import elliptic_e, I
>>> from sympy.abc import z, m
>>> elliptic_e(z, m).series(z)
z + z**5*(-m**2/40 + m/30) - m*z**3/6 + O(z**6)
>>> elliptic_e(m).series(n=4)
pi/2 - pi*m/8 - 3*pi*m**2/128 - 5*pi*m**3/512 + O(m**4)
>>> elliptic_e(1 + I, 2 - I/2).n()
1.55203744279187 + 0.290764986058437*I
>>> elliptic_e(0)
pi/2
>>> elliptic_e(2.0 - I)
0.991052601328069 + 0.81879421395609*I

References
==========

.. [1] https://en.wikipedia.org/wiki/Elliptic_integrals
.. [2] https://functions.wolfram.com/EllipticIntegrals/EllipticE2
.. [3] https://functions.wolfram.com/EllipticIntegrals/EllipticE

c                   Ve   Yr^V,          \         ,          pVP                  '       d   V# VP                  '       d   \        P                  # VP                  '       d   V\        V4      ,          # V\        P                  \        P                  39   d   \        P                  # VP                  4       '       d   \        V) V4      ) # R # VP                  '       d   \         ^,          # V\        P                  J d   \        P                  # V\        P                  J d   \        \        P                  ,          # V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # R # rC   )r   r   r   r   ri   r)   r   r   r   rj   r   r   )r   r    rk   rl   s   &&& r!   r"   elliptic_e.eval   s   =q!BAyyyyyyvvA&qzz1#5#566(((++--"A2q))) . yyy!taeeuuajj|#a(((zz!a'''((( (r$   c                   \        V P                  4      ^8X  dp   V P                  w  r#V^8X  d*   \        ^V\        V4      ^,          ,          ,
          4      # V^8X  d*   \	        W#4      \        W#4      ,
          ^V,          ,          # MCV P                  ^ ,          pV^8X  d*   \	        V4      \        V4      ,
          ^V,          ,          # \        W4      hrI   )lenr(   r   r   r)   rg   r   r   )r*   r+   rk   r    s   &&  r!   r,   elliptic_e.fdiff  s    tyy>Q99DA1}A#a&!)O,,Q"1(:a+;;acBB  		!A1}"1
15!<< 00r$   c                   \        V P                  4      ^8X  dj   V P                  w  rVP                  ;'       d    V^,
          P                  RJ d/   V P	                  VP                  4       VP                  4       4      # R# V P                  ^ ,          pVP                  ;'       d    V^,
          P                  RJ d    V P	                  VP                  4       4      # R# )rJ   FNr}   r(   r0   r1   r2   r3   rr   s   &  r!   r5   elliptic_e._eval_conjugate  s    tyy>Q99DA		11q1u11e;yy>> < 		!A		11q1u11e;yy// <r$   c                   < ^ RI Hp \        V P                  4      ^8X  d-   V! V P	                  \
        4      P                  WVR7      4      # \        SV `  WVR7      # r8   )r<   r9   r}   r(   r=   r   r>   super)r*   r?   r:   r;   r@   r9   	__class__s   &&&&& r!   r>   elliptic_e._eval_nseries  sO    .tyy>Qt||E2@@d@STTw$Q$$77r$   c                    \        V4      ^8X  dR   V^ ,          p\        ^,          \        \        R^4      \        P
                  3\        P                  3V4      ,          # R# )r[   Nr   )r}   r   r   r   r   r   r   r*   r(   rE   r    s   &*, r!   rF   !elliptic_e._eval_rewrite_as_hyper$  sH    t9>QAqD%"a!&& 9AEE8QGGG r$   c                    \        V4      ^8X  d\   V^ ,          p\        \        P                  \	        ^^4      3. 3\        P
                  3\        P
                  33V) 4      ) ^,          # R# )r[   N)r}   r   r   r   r   r   r   s   &*, r!   rK   #elliptic_e._eval_rewrite_as_meijerg)  sc    t9>QAaffhq!n5r:ffY	2QB8 889: : r$   c           	     B   ^ RI Hp \        V P                  4      ^8X  d!   \        ^,          V P                  ^ ,          3MV P                  w  rE\        \        RV4      P                  4      pV! \        ^V\        V4      ^,          ,          ,
          4      V^ V34      # rR   )
rU   rS   r}   r(   r   r   r	   rV   r   r   )r*   r(   rE   rS   rk   r    rT   s   &*,    r!   rW   $elliptic_e._eval_rewrite_as_Integral/  sr    6'*499~':1diil#		'T2778Q3q619_-1ay99r$   rY   rC   rZ   r&   )r\   r]   r^   r_   r`   ra   r"   r,   r5   r>   rF   rK   rW   rb   rc   __classcell__)r   re   s   @@r!   r)   r)      sC     -^ ) )4108H
:: :r$   r)   c                   N   a  ] tR tRt o Rt]R	R l4       tR tR
R ltR t	Rt
V tR# )elliptic_pii6  a  
Called with three arguments $n$, $z$ and $m$, evaluates the
Legendre incomplete elliptic integral of the third kind, defined by

.. math:: \Pi\left(n; z\middle| m\right) = \int_0^z \frac{dt}
          {\left(1 - n \sin^2 t\right) \sqrt{1 - m \sin^2 t}}

Called with two arguments $n$ and $m$, evaluates the complete
elliptic integral of the third kind:

.. math:: \Pi\left(n\middle| m\right) =
          \Pi\left(n; \tfrac{\pi}{2}\middle| m\right)

Explanation
===========

Note that our notation defines the incomplete elliptic integral
in terms of the parameter $m$ instead of the elliptic modulus
(eccentricity) $k$.
In this case, the parameter $m$ is defined as $m=k^2$.

Examples
========

>>> from sympy import elliptic_pi, I
>>> from sympy.abc import z, n, m
>>> elliptic_pi(n, z, m).series(z, n=4)
z + z**3*(m/6 + n/3) + O(z**4)
>>> elliptic_pi(0.5 + I, 1.0 - I, 1.2)
2.50232379629182 - 0.760939574180767*I
>>> elliptic_pi(0, 0)
pi/2
>>> elliptic_pi(1.0 - I/3, 2.0 + I)
3.29136443417283 + 0.32555634906645*I

References
==========

.. [1] https://en.wikipedia.org/wiki/Elliptic_integrals
.. [2] https://functions.wolfram.com/EllipticIntegrals/EllipticPi3
.. [3] https://functions.wolfram.com/EllipticIntegrals/EllipticPi

Nc           	        VEe   Y#r#VP                   '       d   \        W24      # V\        P                  J dh   \        W24      \	        ^V\        V4      ^,          ,          ,
          4      \        V4      ,          \        W24      ,
          ^V,
          ,          ,           # ^V,          \        ,          pVP                  '       d   V\        W4      ,          # VP                   '       dC   \        \	        V^,
          4      \        V4      ,          4      \	        V^,
          4      ,          # W8X  d[   \        W14      \        ^W14      ,
          \        V4      \	        ^V\        V4      ^,          ,          ,
          4      ,          ,           # V\        P                  \        P                  39   d   \        P                  # V\        P                  \        P                  39   d   \        P                  # VP                  4       '       d   \        W) V4      ) # VP                   '       d   \        W24      # VP                   '       d   VP"                  '       g%   VP                   '       d%   VP"                  '       d   \        P                  # R # R # VP                   '       d   \%        V4      # V\        P                  J d   \        P&                  # VP                   '       d%   \        ^\	        ^V,
          4      ,          ,          # V\        P                  8X  d(   \        P                  \)        V^,
          4      ,          # W8X  d   \        V4      ^V,
          ,          # V\        P                  \        P                  39   d   \        P                  # V\        P                  \        P                  39   d   \        P                  # VP                   '       d   \%        V4      # VP                   '       d   VP"                  '       g%   VP                   '       d%   VP"                  '       d   \        P                  # R # R # rC   )r   rg   r   r   r   r   r   r)   r   ri   r   r   r   r   r   rj   rw   rN   r   r   r
   )r   r:   r    rk   rl   s   &&&& r!   r"   elliptic_pi.evalc  s   =qyyy!!''aee"1(a!CFAI+o.s1v5#A)*,-E33 4 !BA|||Q***T!a%[Q/0a!e<<"1(;q!+??AtA#a&!)O445 6qzz1#5#566vvqzz1#5#566vv++--#Ar1---yyy!!''!!!ammm&&&1===vv ,9& yyy!!}$aee(((1T!a%[=))aee))$q1u+55!!}a!e,,qzz1#5#566vvqzz1#5#566vvyyy!!}$!!!ammm&&&1===vv ,9&r$   c                   \        V P                  4      ^8X  d   V P                  w  rpVP                  ;'       d    V^,
          P                  RJ dk   VP                  ;'       d    V^,
          P                  RJ d>   V P	                  VP                  4       VP                  4       VP                  4       4      # R# R# V P                  w  rV P	                  VP                  4       VP                  4       4      # )   FNr   )r*   r:   rk   r    s   &   r!   r5   elliptic_pi._eval_conjugate  s    tyy>QiiGA!		11q1u11e;		11q1u11e;yyq{{}MM < < 99DA99Q[[]AKKM::r$   c                B   \        V P                  4      ^8X  Ed   V P                  w  r#p\        ^V\        V4      ^,          ,          ,
          4      ^V\        V4      ^,          ,          ,
          reV^8X  d   \	        W44      WB,
          \        W44      ,          V,          ,           V^,          V,
          \        W#V4      ,          V,          ,           W%,          \        ^V,          4      ,          ^V,          ,          ,
          ^WB,
          ,          V^,
          ,          ,          # V^8X  d   ^WV,          ,          # V^8X  dy   \	        W44      V^,
          ,          \        W#V4      ,           V\        ^V,          4      ,          ^V^,
          ,          V,          ,          ,
          ^W$,
          ,          ,          # MV P                  w  r$V^8X  d~   \	        V4      WB,
          \        V4      ,          V,          ,           V^,          V,
          \        W$4      ,          V,          ,           ^WB,
          ,          V^,
          ,          ,          # V^8X  d>   \	        V4      V^,
          ,          \        W$4      ,           ^W$,
          ,          ,          # \        W4      h)r   )	r}   r(   r   r   r)   rg   r   r   r   )r*   r+   r:   rk   r    ro   fns   &&     r!   r,   elliptic_pi.fdiff  s   tyy>QiiGA!!aA	k/*A#a&!)O1}"1(AE:a3C+CA+EEA;qQ#779:S1Xqt,-/0!%y!a%/@B B Q"%y Q"1(!a%0#A!,-#ac(
Aq1uIbL1245quI? ? 
 99DA1}"1
1(=a(??A;q#44Q679:AEAE9JL LQ"1q1u-A0AAAquINN 00r$   c                   ^ RI Hp \        V P                  4      ^8X  d4   V P                  ^ ,          V P                  ^,          \        ^,          repMV P                  w  rFp\        \        RV4      P                  4      pV! ^^V\        V4      ^,          ,          ,
          \        ^V\        V4      ^,          ,          ,
          4      ,          ,          V^ V34      # rR   )
rU   rS   r}   r(   r   r   r	   rV   r   r   )r*   r(   rE   rS   r:   r    rk   rT   s   &*,     r!   rW   %elliptic_pi._eval_rewrite_as_Integral  s    6tyy>QiilDIIaL"Q$!A!iiGA!'T2778A#a&!)OT!aA	k/-BBCaAYOOr$   rY   rC   rZ   )r\   r]   r^   r_   r`   ra   r"   r5   r,   rW   rb   rc   rd   s   @r!   r   r   6  s6     *X / /b;1.P Pr$   r   N)r`   
sympy.corer   r   r   r   sympy.core.functionr   r   sympy.core.symbolr   r	   $sympy.functions.elementary.complexesr
   %sympy.functions.elementary.hyperbolicr   (sympy.functions.elementary.miscellaneousr   (sympy.functions.elementary.trigonometricr   r   'sympy.functions.special.gamma_functionsr   sympy.functions.special.hyperr   r   r   rg   r)   r   rY   r$   r!   <module>r      sc     ) ) C 9 5 7 9 = 9 8W? W?tR Rjw: w:tGP/ GPr$   