+
    ‹°³jÅ'  ã                   óN  € R t ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
Ht ^ RIHtHt ^ RIHt ^ RIHt R t]RR l4       tR	 tRR
 ltR tR tR tR t]RR l4       t]RR l4       tR tR t]RR l4       t]RR l4       t R t!]RR l4       t"R t#]RR l4       t$R t%R t&RR lt'R# )z:Efficient functions for generating orthogonal polynomials.)ÚDummy)Údup_mulÚdup_mul_groundÚ
dup_lshiftÚdup_subÚdup_addÚdup_sub_termÚdup_sub_groundÚdup_sqr)ÚZZÚQQ)Ú
named_poly)Úpublicc           	     ó¨  € V ^8  d   VP                   .# VP                   .W,           V! ^4      ,          VP                   ,           W,
          V! ^4      ,          .rT\        ^V ^,           4       EFÞ  pV! V4      W,           V,           ,          W,           V! ^4      V,          ,           V! ^4      ,
          ,          pW,           V! ^4      V,          ,           VP                   ,
          W,          W",          ,
          ,          V! ^4      V,          ,          pW,           V! ^4      V,          ,           VP                   ,
          W,           V! ^4      V,          ,           V! ^4      ,
          ,          W,           V! ^4      V,          ,           ,          V! ^4      V,          ,          p	W,           VP                   ,
          W&,           VP                   ,
          ,          W,           V! ^4      V,          ,           ,          V,          p
\        WXV4      p\        \        V^V4      W“4      p\        WJV4      pT\	        \        W¼V4      WÓ4      rTEKá  	  V# )z/Low-level implementation of Jacobi polynomials.)ÚoneÚranger   r   r   r   )ÚnÚaÚbÚKÚm2Úm1ÚiÚdenÚf0Úf1Úf2Úp0Úp1Úp2s   &&&&          ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/polys/orthopolys.pyÚ
dup_jacobir!   	   sš  € àˆ1„uØ—‘ˆwˆØ�e‰eˆW˜�™Q˜q›T•z A§E¡EÕ)¨A­C±°1³­:Ð6ˆÜ�1�a˜•c�]ˆÙ�‹d�A•E˜A•IÕ ¥©¨!«¨Q­¥±°1³Õ 5Õ6ˆØ�e‘a˜“d˜1•f�n˜qŸu™uÕ$¨­¨q­s­Õ3±q¸³t¸CµxÕ@ˆØ�e‘a˜“d˜1•f�n˜qŸu™uÕ$¨­±°1³°aµ­¹!¸A»$Õ)>Õ?À1Å5É1ÈQË4ÐPQÍ6Å>ÕRÑVWÐXYÓVZÐ[^ÕV^Õ_ˆØ�e�a—e‘e�m˜a�e a§e¡e�mÕ,¨a­e±a¸³d¸1µf­nÕ=ÀÕCˆÜ˜B AÓ&ˆÜœJ r¨1¨aÓ0°"Ó8ˆÜ˜B AÓ&ˆØ”WœW R¨QÓ/°Ó7‹Bñ ð €Ió    Nc           	     ó.   € \        V \        RRW1V3V4      # )a^  Generates the Jacobi polynomial `P_n^{(a,b)}(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
a
    Lower limit of minimal domain for the list of coefficients.
b
    Upper limit of minimal domain for the list of coefficients.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
NzJacobi polynomial)r   r!   )r   r   r   ÚxÚpolyss   &&&&&r    Újacobi_polyr&      s   € ô" �aœ TÐ+>ÀÀqÀ	È5ÓQÐQr"   c                óö  € V ^8  d   VP                   .# VP                   .V! ^4      V,          VP                  .rC\        ^V ^,           4       F¦  p\        \	        V^V4      V! ^4      WP                   ,
          ,          V! V4      ,          V! ^4      ,           V4      p\        W2! ^4      WP                   ,
          ,          V! V4      ,          VP                   ,           V4      pT\        WgV4      rCK¨  	  V# )z3Low-level implementation of Gegenbauer polynomials.©r   Úzeror   r   r   r   )r   r   r   r   r   r   r   r   s   &&&     r    Údup_gegenbauerr*   ,   sÀ   € àˆ1„uØ—‘ˆwˆØ�e‰eˆW‘q˜“t˜A•v˜qŸv™vÐ&ˆÜ�1�a˜•cŽ]ˆÜœJ r¨1¨aÓ0±!°A³$¸¿%¹%½µ.ÁÀ1ÃÕ2EÉÈ!ËÕ2LÈaÓPˆÜ˜B  !£ a¯©¥g¥©q°«tÕ 3°a·e±eÕ ;¸QÓ?ˆØ”W˜R QÓ'ŠBñ ð €Ir"   c                ó,   € \        V \        RRW!3V4      # )a  Generates the Gegenbauer polynomial `C_n^{(a)}(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
a
    Decides minimal domain for the list of coefficients.
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
NzGegenbauer polynomial)r   r*   )r   r   r$   r%   s   &&&&r    Úgegenbauer_polyr,   7   s   € ô �aœ¨Ð/FÈÈÐPUÓVÐVr"   c                ód   € V ^8  d   VP                   .# V ^@8  d   \        W4      # \        W4      # )zDLow-level implementation of Chebyshev polynomials of the first kind.)r   Ú_dup_chebyshevt_recÚ_dup_chebyshevt_prod)r   r   s   &&r    Údup_chebyshevtr0   G   s1   € àˆ1„uØ—‘ˆwˆàˆ2„vÜ" 1Ó(Ð(Ü Ó%Ð%r"   c                óÒ   € VP                   .VP                   VP                  .r2\        V ^,
          4       F,  pT\        \	        \        V^V4      V! ^4      V4      W!4      r2K.  	  V# )a±  Chebyshev polynomials of the first kind using recurrence.

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

Chebyshev polynomials of the first kind are defined by the recurrence
relation:

.. math::
    T_0(x) &= 1\\
    T_1(x) &= x\\
    T_n(x) &= 2xT_{n-1}(x) - T_{n-2}(x)

This function calculates the Chebyshev polynomial of the first kind using
the above recurrence relation.

Parameters
==========

n : int
    n is a nonnegative integer.
K : domain

©r   r)   r   r   r   r   )r   r   r   r   Ú_s   &&   r    r.   r.   P   sX   € ð2 �e‰eˆW�q—u‘u˜aŸf™f�oˆÜ�1�q•5Ž\ˆØ”Wœ^¬J°r¸1¸aÓ,@Á!ÀAÃ$ÈÓJÈBÓRŠBñ à€Ir"   c           
     óæ  € VP                   VP                  .V! ^4      VP                  VP                   ) .r2\        V 4      R,           F£  p\        \	        \        W2V4      V! ^4      V4      VP                   ^V4      pVR8X  d5   T\        \	        \        W14      V! ^4      V4      VP                   V4      r2Kq  \        \	        \        W!4      V! ^4      V4      VP                   V4      Tr2K¥  	  V# )ar  Chebyshev polynomials of the first kind using recursive products.

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

Computes Chebyshev polynomials of the first kind using

.. math::
    T_{2n}(x) &= 2T_n^2(x) - 1\\
    T_{2n+1}(x) &= 2T_{n+1}(x)T_n(x) - x

This is faster than ``_dup_chebyshevt_rec`` for large ``n``.

Parameters
==========

n : int
    n is a nonnegative integer.
K : domain

:é   NNÚ1)r   r)   Úbinr   r   r   r	   r
   )r   r   r   r   r   Úcs   &&    r    r/   r/   n   sÇ   € ð, �e‰e�Q—V‘Vˆ_™q ›t Q§V¡V¨a¯e©e¨VÐ4ˆÜ�‹V�B�ZˆZˆÜœ¬°¸Ó(:¹A¸a»DÀ!ÓDÀaÇeÁeÈQÐPQÓRˆØ�#ŒIØœ¤~´g¸b³nÁaÈÃdÈAÓ'NÐPQ×PUÑPUÐWXÓY’ä#¤N´7¸2³>Á1ÀQÃ4ÈÓ$KÈQÏUÉUÐTUÓVÐXY’ñ ð €Ir"   c                óô   € V ^8  d   VP                   .# VP                   .V! ^4      VP                  .r2\        ^V ^,           4       F,  pT\        \	        \        V^V4      V! ^4      V4      W!4      r2K.  	  V# )zELow-level implementation of Chebyshev polynomials of the second kind.r2   ©r   r   r   r   r   s   &&   r    Údup_chebyshevur;   �   sj   € àˆ1„uØ—‘ˆwˆØ�e‰eˆW‘q˜“t˜QŸV™V�nˆÜ�1�a˜•cŽ]ˆØ”Wœ^¬J°r¸1¸aÓ,@Á!ÀAÃ$ÈÓJÈBÓRŠBñ à€Ir"   c                ó4   € \        V \        \        RV3V4      # )zçGenerates the Chebyshev polynomial of the first kind `T_n(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
z&Chebyshev polynomial of the first kind)r   r0   r   ©r   r$   r%   s   &&&r    Úchebyshevt_polyr>   –   s"   € ô �aœ¬Ø4°q°d¸EóCð Cr"   c                ó4   € \        V \        \        RV3V4      # )zèGenerates the Chebyshev polynomial of the second kind `U_n(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
z'Chebyshev polynomial of the second kind)r   r;   r   r=   s   &&&r    Úchebyshevu_polyr@   ¦   s"   € ô �aœ¬Ø5¸°t¸UóDð Dr"   c           	     ó*  € V ^8  d   VP                   .# VP                   .V! ^4      VP                  .r2\        ^V ^,           4       FG  p\        V^V4      p\	        W!! V^,
          4      V4      pT\	        \        WVV4      V! ^4      V4      r2KI  	  V# )z0Low-level implementation of Hermite polynomials.©r   r)   r   r   r   r   ©r   r   r   r   r   r   r   s   &&     r    Údup_hermiterD   ¶   s‡   € àˆ1„uØ—‘ˆwˆØ�e‰eˆW‘q˜“t˜QŸV™V�nˆÜ�1�a˜•cŽ]ˆÜ�r˜1˜aÓ ˆÜ˜2˜q  1¥›v qÓ)ˆØ”^¤G¨A°!Ó$4±a¸³d¸AÓ>ŠBñ ð €Ir"   c                ó  € V ^8  d   VP                   .# VP                   .VP                   VP                  .r2\        ^V ^,           4       F6  p\        V^V4      p\	        W!! V^,
          4      V4      pT\        WVV4      r2K8  	  V# )z>Low-level implementation of probabilist's Hermite polynomials.rB   rC   s   &&     r    Údup_hermite_probrF   Á   sz   € àˆ1„uØ—‘ˆwˆØ�e‰eˆW�q—u‘u˜aŸf™f�oˆÜ�1�a˜•cŽ]ˆÜ�r˜1˜aÓ ˆÜ˜2˜q  1¥›v qÓ)ˆØ”W˜Q 1Ó%ŠBñ ð €Ir"   c                ó4   € \        V \        \        RV3V4      # )zÓGenerates the Hermite polynomial `H_n(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
zHermite polynomial)r   rD   r   r=   s   &&&r    Úhermite_polyrH   Ì   s   € ô �aœ¤bÐ*>ÀÀÀeÓLÐLr"   c                ó4   € \        V \        \        RV3V4      # )zâGenerates the probabilist's Hermite polynomial `He_n(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
z probabilist's Hermite polynomial)r   rF   r   r=   s   &&&r    Úhermite_prob_polyrJ   Û   s!   € ô �aÔ)¬2Ø.°°°eó=ð =r"   c                óR  € V ^8  d   VP                   .# VP                   .VP                   VP                  .r2\        ^V ^,           4       FW  p\        \	        V^V4      V! ^V,          ^,
          V4      V4      p\        W!! V^,
          V4      V4      pT\        WVV4      r2KY  	  V# )z1Low-level implementation of Legendre polynomials.r(   rC   s   &&     r    Údup_legendrerL   ë   s“   € àˆ1„uØ—‘ˆwˆØ�e‰eˆW�q—u‘u˜aŸf™f�oˆÜ�1�a˜•cŽ]ˆÜœ: b¨!¨QÓ/±°1°Qµ3°qµ5¸!³¸aÓ@ˆÜ˜2˜q  1¥ a›y¨!Ó,ˆØ”W˜Q 1Ó%ŠBñ ð €Ir"   c                ó4   € \        V \        \        RV3V4      # )zÔGenerates the Legendre polynomial `P_n(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
zLegendre polynomial)r   rL   r   r=   s   &&&r    Úlegendre_polyrN   ö   s   € ô �aœ¤rÐ+@À1À$ÈÓNÐNr"   c           	     óœ  € VP                   .VP                  .rC\        ^V ^,           4       F›  p\        WBP                  ) V! V4      ,          WP                  ,
          V! V4      ,          V! ^4      ,           .V4      p\	        W1VP                  ,
          V! V4      ,          VP                  ,           V4      pT\        WgV4      rCK�  	  V# )z1Low-level implementation of Laguerre polynomials.)r)   r   r   r   r   r   )r   Úalphar   r   r   r   r   r   s   &&&     r    Údup_laguerrerQ     s›   € à�f‰fˆX˜Ÿ™�wˆÜ�1�a˜•cŽ]ˆÜ�BŸ%™%˜¡ !£� u¯U©U¥{±A°a³DÕ&8¹1¸Q»4Õ&?Ð@À!ÓDˆÜ˜2 a§e¡e¥©Q¨q«TÕ1°A·E±EÕ9¸1Ó=ˆØ”W˜Q 1Ó%ŠBñ ð €Ir"   c                ó,   € \        V \        RRW3V4      # )a)  Generates the Laguerre polynomial `L_n^{(\alpha)}(x)`.

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
alpha : optional
    Decides minimal domain for the list of coefficients.
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.
NzLaguerre polynomial)r   rQ   )r   r$   rP   r%   s   &&&&r    Úlaguerre_polyrS     s   € ô �aœ tÐ-BÀQÀJÐPUÓVÐVr"   c                óD  € V ^8  d   VP                   VP                  .# VP                   .VP                   VP                  .r2\        ^V ^,           4       F:  pT\        \	        \        V^V4      V! ^V,          ^,
          4      V4      W!4      r2K<  	  \        V^V4      # )z%Low-level implementation of fn(n, x).r2   r:   s   &&   r    Údup_spherical_bessel_fnrU     s„   € àˆ1„uØ—‘�q—v‘vˆÐØ�e‰eˆW�q—u‘u˜aŸf™f�oˆÜ�1�a˜•cŽ]ˆØ”Wœ^¬J°r¸1¸aÓ,@Á!ÀAÀaÅCÈÅEÃ(ÈAÓNÐPRÓVŠBñ ä�b˜!˜QÓÐr"   c                óð   € VP                   VP                  .VP                  .r2\        ^V ^,           4       F:  pT\        \	        \        V^V4      V! ^^V,          ,
          4      V4      W!4      r2K<  	  V# )z&Low-level implementation of fn(-n, x).r2   r:   s   &&   r    Údup_spherical_bessel_fn_minusrW   (  sa   € à�e‰e�Q—V‘Vˆ_˜qŸv™v˜hˆÜ�1�a˜•cŽ]ˆØ”Wœ^¬J°r¸1¸aÓ,@Á!ÀAÀaÈÅcÅEÃ(ÈAÓNÐPRÓVŠBñ à€Ir"   c           	     ó¢   € Vf   \        R4      pV ^ 8  d   \        M\        p\        \	        V 4      V\
        R\        ^4      V,          3V4      # )a|  
Coefficients for the spherical Bessel functions.

These are only needed in the jn() function.

The coefficients are calculated from:

fn(0, z) = 1/z
fn(1, z) = 1/z**2
fn(n-1, z) + fn(n+1, z) == (2*n+1)/z * fn(n, z)

Parameters
==========

n : int
    Degree of the polynomial.
x : optional
polys : bool, optional
    If True, return a Poly, otherwise (default) return an expression.

Examples
========

>>> from sympy.polys.orthopolys import spherical_bessel_fn as fn
>>> from sympy import Symbol
>>> z = Symbol("z")
>>> fn(1, z)
z**(-2)
>>> fn(2, z)
-1/z + 3/z**3
>>> fn(3, z)
-6/z**2 + 15/z**4
>>> fn(4, z)
1/z - 45/z**3 + 105/z**5

r$   Ú )r   rW   rU   r   Úabsr   r   )r   r$   r%   Úfs   &&& r    Úspherical_bessel_fnr\   /  sE   € ðJ 	‚yÜ�#‹JˆØ)*¨Q¬Õ%Ô4K€AÜ”c˜!“f˜a¤ R¬"¨Q«%°­'¨°UÓ;Ð;r"   )NF)Né    F)(Ú__doc__Úsympy.core.symbolr   Úsympy.polys.densearithr   r   r   r   r   r   r	   r
   Úsympy.polys.domainsr   r   Úsympy.polys.polytoolsr   Úsympy.utilitiesr   r!   r&   r*   r,   r0   r.   r/   r;   r>   r@   rD   rF   rH   rJ   rL   rN   rQ   rS   rU   rW   r\   © r"   r    Ú<module>re      s  ðÙ @Ý #÷I÷ Ió Iç &Ý ,Ý "òð  óRó ðRò$	ôWò &òò<ò>ð óCó ðCð óDó ðDò	ò	ð óMó ðMð ó=ó ð=ò	ð óOó ðOòð óWó ðWò  òö(<r"   