+
    i                        R t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RI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 ^ RIHtHtH t H!t!H"t"H#t#H$t$H%t% ]	! R4      t& ! R R]4      t' ! R R]'4      t(R t) ! R R]'4      t* ! R R]'4      t+ ! R R]'4      t, ! R R]4      t- ! R R]4      t. ! R R]'4      t/ ! R  R!]4      t0 ! R" R#]'4      t1 ! R$ R%]'4      t2 ! R& R']'4      t3 ! R( R)]'4      t4R*# )+z
This module mainly implements special orthogonal polynomials.

See also functions.combinatorial.numbers which contains some
combinatorial polynomials.

)Rational)DefinedFunctionArgumentIndexError)S)Dummy)binomial	factorialRisingFactorial)re)exp)floor)sqrt)cossec)gamma)hyper)chebyshevt_polychebyshevu_polygegenbauer_polyhermite_polyhermite_prob_polyjacobi_polylaguerre_polylegendre_polyxc                   :   a  ] tR t^t o Rt]R 4       tR tRtV t	R# )OrthogonalPolynomialz+Base class for orthogonal polynomials.
    c                    VP                   '       d=   V^ 8  d4   V P                  \        V4      \        4      P	                  \        V4      # R# R# )    N)
is_integer_ortho_polyint_xsubsclsnr   s   &&&ڃ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/functions/special/polynomials.py_eval_at_order#OrthogonalPolynomial._eval_at_order    s:    <<<AF??3q62.33B:: #<    c                    V P                  V P                  ^ ,          V P                  ^,          P                  4       4      # )r   )funcargs	conjugate)selfs   &r'   _eval_conjugate$OrthogonalPolynomial._eval_conjugate%   s,    yy1tyy|'='='?@@r*    N)
__name__
__module____qualname____firstlineno____doc__classmethodr(   r0   __static_attributes____classdictcell____classdict__s   @r'   r   r      s*      ; ;A Ar*   r   c                   P   a  ] tR t^-t o Rt]R 4       tR	R ltR tR t	R t
RtV tR# )
jacobia  
Jacobi polynomial $P_n^{\left(\alpha, \beta\right)}(x)$.

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

``jacobi(n, alpha, beta, x)`` gives the $n$th Jacobi polynomial
in $x$, $P_n^{\left(\alpha, \beta\right)}(x)$.

The Jacobi polynomials are orthogonal on $[-1, 1]$ with respect
to the weight $\left(1-x\right)^\alpha \left(1+x\right)^\beta$.

Examples
========

>>> from sympy import jacobi, S, conjugate, diff
>>> from sympy.abc import a, b, n, x

>>> jacobi(0, a, b, x)
1
>>> jacobi(1, a, b, x)
a/2 - b/2 + x*(a/2 + b/2 + 1)
>>> jacobi(2, a, b, x)
a**2/8 - a*b/4 - a/8 + b**2/8 - b/8 + x**2*(a**2/8 + a*b/4 + 7*a/8 + b**2/8 + 7*b/8 + 3/2) + x*(a**2/4 + 3*a/4 - b**2/4 - 3*b/4) - 1/2

>>> jacobi(n, a, b, x)
jacobi(n, a, b, x)

>>> jacobi(n, a, a, x)
RisingFactorial(a + 1, n)*gegenbauer(n,
    a + 1/2, x)/RisingFactorial(2*a + 1, n)

>>> jacobi(n, 0, 0, x)
legendre(n, x)

>>> jacobi(n, S(1)/2, S(1)/2, x)
RisingFactorial(3/2, n)*chebyshevu(n, x)/factorial(n + 1)

>>> jacobi(n, -S(1)/2, -S(1)/2, x)
RisingFactorial(1/2, n)*chebyshevt(n, x)/factorial(n)

>>> jacobi(n, a, b, -x)
(-1)**n*jacobi(n, b, a, x)

>>> jacobi(n, a, b, 0)
gamma(a + n + 1)*hyper((-n, -b - n), (a + 1,), -1)/(2**n*factorial(n)*gamma(a + 1))
>>> jacobi(n, a, b, 1)
RisingFactorial(a + 1, n)/factorial(n)

>>> conjugate(jacobi(n, a, b, x))
jacobi(n, conjugate(a), conjugate(b), conjugate(x))

>>> diff(jacobi(n,a,b,x), x)
(a/2 + b/2 + n/2 + 1/2)*jacobi(n - 1, a + 1, b + 1, x)

See Also
========

gegenbauer,
chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly,
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Jacobi_polynomials
.. [2] https://mathworld.wolfram.com/JacobiPolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/JacobiP/

c                   W#8X  Ed   V\        R^4      8X  d;   \        \        P                  V4      \	        V4      ,          \        W4      ,          # VP                  '       d   \        W4      # V\        P                  8X  dI   \        ^\        P                  ,          V4      \	        V^,           4      ,          \        W4      ,          # \        V^,           V4      \        ^V,          ^,           V4      ,          \        W\        P                  ,           V4      ,          # W2) 8X  dz   \        W,           ^,           4      \        V^,           4      ,          ^V,           V^,          ,          ,          ^V,
          V^,          ,          ,          \        W) V4      ,          # VP                  '       Eg   VP                  4       '       d*   \        P                  V,          \        WW$) 4      ,          # VP                  '       dt   ^V) ,          \        W!,           ^,           4      ,          \        V^,           4      \	        V4      ,          ,          \!        V) V,
          V) .V^,           .R4      ,          # V\        P"                  8X  d$   \        V^,           V4      \	        V4      ,          # V\        P$                  J d{   VP&                  '       dg   W#,           ^V,          ,           P(                  '       d   \+        R4      h\        W#,           V,           ^,           V4      \        P$                  ,          # R# R# \-        WW44      # )   z,Error. a + b + 2*n should not be an integer.N)r   r	   r   Halfr   
chebyshevtis_zerolegendre
chebyshevu
gegenbauerr   assoc_legendre	is_Numbercould_extract_minus_signNegativeOner>   r   OneInfinityis_positiver   
ValueErrorr   )r%   r&   abr   s   &&&&&r'   evaljacobi.eval~   sN    6HRO#&qvvq1IaL@:aCSSS~%aff&qx3iA6FFTUIYYY&q1ua0?1Q37A3NNQ[\]cdcici_iklQmmm"W#eAEl2a!eqs^Cq1uPQRSPSnTWefgikmnWooo{{{ ))++}}a'&q"*===yyyQB%	"22eAElYq\6QRrAvrlQUGR89 :AEEz&q1ua09Q<??ajj===!///()WXX*1519q=!<qzzII	 ! ! qQ**r*   c                ,   ^ RI Hp V^8X  d   \        W4      hV^8X  d   V P                  w  r4rV\	        R4      p^WE,           V,           V,           ^,           ,          pWE,           ^V,          ,           ^,           \        WW,           ^,           W7,
          4      ,          W7,
          \        WE,           V,           ^,           W7,
          4      ,          ,          p	V! V\        W4WV4      V	\        WtWV4      ,          ,           ,          V^ V^,
          34      # V^8X  Ed   V P                  w  r4rV\	        R4      p^WE,           V,           V,           ^,           ,          pRW7,
          ,          WE,           ^V,          ,           ^,           \        WG,           ^,           W7,
          4      ,          W7,
          \        WE,           V,           ^,           W7,
          4      ,          ,          ,          p	V! V\        W4WV4      V	\        WtWV4      ,          ,           ,          V^ V^,
          34      # V^8X  dc   V P                  w  r4rV\        P                  WE,           V,           ^,           ,          \        V^,
          V^,           V^,           V4      ,          # \        W4      hr   SumkrA   )	sympy.concrete.summationsrW   r   r-   r   r	   r>   r   rB   )
r/   argindexrW   r&   rP   rQ   r   rX   f1f2s
   &&        r'   fdiffjacobi.fdiff   s   1q=$T44]JA!c
Aaeai!ma'(B51Q3;?oaeai&GGE_QUQY]AEBBDBrVA!/"VA!5G2GGH1aQRUVQV-XX]JA!c
Aaeai!ma'(B151Q3;?oaeaiQRQV6W"WE_QUQY]AEBB#D EBrVA!/"VA!5G2GGH1aQRUVQV-XX]JA!66QUQY]+fQUAE1q5!.LLL$T44r*   c                   ^ RI Hp VP                  '       g   VP                  RJ d   \	        R4      h\        R4      p\        V) V4      \        W#,           V,           ^,           V4      ,          \        W',           ^,           W,
          4      ,          \        V4      ,          ^V,
          ^,          V,          ,          p^\        V4      ,          V! W^ V34      ,          # r   rV   Fz*Error: n should be a non-negative integer.rX   )rY   rW   is_negativer   rO   r   r	   r   )	r/   r&   rP   rQ   r   kwargsrW   rX   kerns	   &&&&&,   r'   _eval_rewrite_as_Sumjacobi._eval_rewrite_as_Sum   s    1===ALLE1IJJ#JA&Q)JJ_]^]bef]fhihmMnn!!"Q	A~.9Q<#d1I"666r*   c                *    V P                   ! WW43/ VB # Nrd   )r/   r&   rP   rQ   r   rb   s   &&&&&,r'   _eval_rewrite_as_polynomial"jacobi._eval_rewrite_as_polynomial   s     ((q>v>>r*   c                    V P                   w  rr4V P                  WP                  4       VP                  4       VP                  4       4      # rg   r-   r,   r.   )r/   r&   rP   rQ   r   s   &    r'   r0   jacobi._eval_conjugate   s4    YY
ayyKKM1;;=!++-HHr*   r2   N)   r3   r4   r5   r6   r7   r8   rR   r]   rd   ri   r0   r9   r:   r;   s   @r'   r>   r>   -   s<     N` #+ #+J587?
I Ir*   r>   c                   \        ^4      W,           ^,           ,          \        W,           ^,           4      \        W,           ^,           4      ,          ,          ^V ,          V,           V,           ^,           ,          \        V 4      \        W,           V,           ^,           4      ,          ,          p\        WW#4      \	        V4      ,          # )a  
Jacobi polynomial $P_n^{\left(\alpha, \beta\right)}(x)$.

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

``jacobi_normalized(n, alpha, beta, x)`` gives the $n$th
Jacobi polynomial in $x$, $P_n^{\left(\alpha, \beta\right)}(x)$.

The Jacobi polynomials are orthogonal on $[-1, 1]$ with respect
to the weight $\left(1-x\right)^\alpha \left(1+x\right)^\beta$.

This functions returns the polynomials normilzed:

.. math::

    \int_{-1}^{1}
      P_m^{\left(\alpha, \beta\right)}(x)
      P_n^{\left(\alpha, \beta\right)}(x)
      (1-x)^{\alpha} (1+x)^{\beta} \mathrm{d}x
    = \delta_{m,n}

Examples
========

>>> from sympy import jacobi_normalized
>>> from sympy.abc import n,a,b,x

>>> jacobi_normalized(n, a, b, x)
jacobi(n, a, b, x)/sqrt(2**(a + b + 1)*gamma(a + n + 1)*gamma(b + n + 1)/((a + b + 2*n + 1)*factorial(n)*gamma(a + b + n + 1)))

Parameters
==========

n : integer degree of polynomial

a : alpha value

b : beta value

x : symbol

See Also
========

gegenbauer,
chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly,
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Jacobi_polynomials
.. [2] https://mathworld.wolfram.com/JacobiPolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/JacobiP/

)r   r   r   r>   r   )r&   rP   rQ   r   nfactors   &&&& r'   jacobi_normalizedrr      s    F taeai E!%!)$4uQUQY7G$GHA#'A+/#&/lU1519q=5I&IKG !W--r*   c                   P   a  ] tR tRt o Rt]R 4       tR
R ltR tR t	R t
RtV tR	# )rG   i"  a~  
Gegenbauer polynomial $C_n^{\left(\alpha\right)}(x)$.

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

``gegenbauer(n, alpha, x)`` gives the $n$th Gegenbauer polynomial
in $x$, $C_n^{\left(\alpha\right)}(x)$.

The Gegenbauer polynomials are orthogonal on $[-1, 1]$ with
respect to the weight $\left(1-x^2\right)^{\alpha-\frac{1}{2}}$.

Examples
========

>>> from sympy import gegenbauer, conjugate, diff
>>> from sympy.abc import n,a,x
>>> gegenbauer(0, a, x)
1
>>> gegenbauer(1, a, x)
2*a*x
>>> gegenbauer(2, a, x)
-a + x**2*(2*a**2 + 2*a)
>>> gegenbauer(3, a, x)
x**3*(4*a**3/3 + 4*a**2 + 8*a/3) + x*(-2*a**2 - 2*a)

>>> gegenbauer(n, a, x)
gegenbauer(n, a, x)
>>> gegenbauer(n, a, -x)
(-1)**n*gegenbauer(n, a, x)

>>> gegenbauer(n, a, 0)
2**n*sqrt(pi)*gamma(a + n/2)/(gamma(a)*gamma(1/2 - n/2)*gamma(n + 1))
>>> gegenbauer(n, a, 1)
gamma(2*a + n)/(gamma(2*a)*gamma(n + 1))

>>> conjugate(gegenbauer(n, a, x))
gegenbauer(n, conjugate(a), conjugate(x))

>>> diff(gegenbauer(n, a, x), x)
2*a*gegenbauer(n - 1, a + 1, x)

See Also
========

jacobi,
chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Gegenbauer_polynomials
.. [2] https://mathworld.wolfram.com/GegenbauerPolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/GegenbauerC3/

c                &   VP                   '       d   \        P                  # V\        P                  8X  d   \	        W4      # V\        P
                  8X  d   \        W4      # V\        P                  8X  d   \        P                  # VP                  '       Egm   V\        P                  8X  d   \        V4      \        P                  8  R 8X  d   \        P                  # \        \        P                  W!,           ,          4      \        \        P                  V,          4      ,          \        ^V,          V,           4      ,          \        ^V,          4      \        V^,           4      ,          ,          # VP                  4       '       d*   \        P                  V,          \!        WV) 4      ,          # VP"                  '       d   ^V,          \%        \        P                  4      ,          \        V\        P                  V,          ,           4      ,          \        ^V,
          ^,          4      \        V^,           4      ,          \        V4      ,          ,          # V\        P
                  8X  dH   \        ^V,          V,           4      \        ^V,          4      \        V^,           4      ,          ,          # V\        P&                  J d5   VP(                  '       d!   \+        W!4      \        P&                  ,          # R# R# \-        WV4      # )TN)ra   r   ZerorB   rE   rL   rF   rK   rI   r
   ComplexInfinityr   Pir   r   rJ   rG   rD   r   rM   rN   r	   r   )r%   r&   rP   r   s   &&&&r'   rR   gegenbauer.evalg  s    ===66M ;A>!!%%Za##!--66M{{{AMM!qEAFFNt+,,,ac
Oc!$$q&k9E!A#a%LH!&qseAaCj!8: ;
 ))++}}a'*QA2*>>>yyy1tADDz)E!affQh,,??Aqy)E!a%L858CE GAEEzQqS1W~qseAEl)BCCajj===*101::== ! !
 #1++r*   c                   ^ RI Hp V^8X  d   \        W4      hV^8X  Ed   V P                  w  r4p\	        R4      p^^RW6,
          ,          ,           ,          Wd,           ,          VV,           ^V,          ,           W6,
          ,          ,          p^V^,           ,          V^V,          ,           ^V,          ^V,          ,           ^,           ,          ,          ^Wc,           ^V,          ,           ,          ,           pV\        WdV4      ,          V\        W4V4      ,          ,           p	V! W^ V^,
          34      # V^8X  d9   V P                  w  r4p^V,          \        V^,
          V^,           V4      ,          # \        W4      hrU   )rY   rW   r   r-   r   rG   )
r/   rZ   rW   r&   rP   r   rX   factor1factor2rc   s
   &&        r'   r]   gegenbauer.fdiff  s1   1q=$T44]iiGA!c
A1ae},-7A= s=#'(u<. /GQiA!G!ac	A#>?QUQqS[!"G:aA..A!9L1LLDtAE]++]iiGA!Q3z!a%Q222$T44r*   c           	     <   ^ RI Hp \        R4      pRV,          \        W!V,
          4      ,          ^V,          V^V,          ,
          ,          ,          \	        V4      \	        V^V,          ,
          4      ,          ,          pV! Wv^ \        V^,          4      34      # rU   )rY   rW   r   r	   r   r   )r/   r&   rP   r   rb   rW   rX   rc   s   &&&&,   r'   rd   gegenbauer._eval_rewrite_as_Sum  ss    1#Ja/!U33qsa!A#g6FF1	!ac' 2244Qac
+,,r*   c                *    V P                   ! WV3/ VB # rg   rh   )r/   r&   rP   r   rb   s   &&&&,r'   ri   &gegenbauer._eval_rewrite_as_polynomial       ((q;F;;r*   c                |    V P                   w  rpV P                  WP                  4       VP                  4       4      # rg   rl   )r/   r&   rP   r   s   &   r'   r0   gegenbauer._eval_conjugate  ,    ))ayyKKM1;;=99r*   r2   N   ro   r;   s   @r'   rG   rG   "  s:     BH &, &,P5,-<
: :r*   rG   c                   Z   a  ] tR tRt o Rt]! ]4      t]R 4       t	R	R lt
R tR tRtV tR# )
rC   i  a  
Chebyshev polynomial of the first kind, $T_n(x)$.

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

``chebyshevt(n, x)`` gives the $n$th Chebyshev polynomial (of the first
kind) in $x$, $T_n(x)$.

The Chebyshev polynomials of the first kind are orthogonal on
$[-1, 1]$ with respect to the weight $\frac{1}{\sqrt{1-x^2}}$.

Examples
========

>>> from sympy import chebyshevt, diff
>>> from sympy.abc import n,x
>>> chebyshevt(0, x)
1
>>> chebyshevt(1, x)
x
>>> chebyshevt(2, x)
2*x**2 - 1

>>> chebyshevt(n, x)
chebyshevt(n, x)
>>> chebyshevt(n, -x)
(-1)**n*chebyshevt(n, x)
>>> chebyshevt(-n, x)
chebyshevt(n, x)

>>> chebyshevt(n, 0)
cos(pi*n/2)
>>> chebyshevt(n, -1)
(-1)**n

>>> diff(chebyshevt(n, x), x)
n*chebyshevu(n - 1, x)

See Also
========

jacobi, gegenbauer,
chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Chebyshev_polynomial
.. [2] https://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html
.. [3] https://mathworld.wolfram.com/ChebyshevPolynomialoftheSecondKind.html
.. [4] https://functions.wolfram.com/Polynomials/ChebyshevT/
.. [5] https://functions.wolfram.com/Polynomials/ChebyshevU/

c                x   VP                   '       g   VP                  4       '       d)   \        P                  V,          \	        W) 4      ,          # VP                  4       '       d   \	        V) V4      # VP
                  '       d6   \        \        P                  \        P                  ,          V,          4      # V\        P                  8X  d   \        P                  # V\        P                  J d   \        P                  # R # VP                  '       d   V P                  V) V4      # V P                  W4      # rg   )rI   rJ   r   rK   rC   rD   r   rB   rw   rL   rM   ra   r(   r$   s   &&&r'   rR   chebyshevt.eval  s    {{{ ))++}}a'*Q*;;;))++!1"a((yyy166ADD=1,--AEEzuuajjzz! ! }}}))1"a00))!//r*   c                    V^8X  d   \        W4      hV^8X  d)   V P                  w  r#V\        V^,
          V4      ,          # \        W4      hr@   )r   r-   rF   r/   rZ   r&   r   s   &&  r'   r]   chebyshevt.fdiff  sG    q=$T44]99DAz!a%+++$T44r*   c           	         ^ RI Hp \        R4      p\        V^V,          4      V^,          ^,
          V,          ,          W!^V,          ,
          ,          ,          pV! We^ \	        V^,          4      34      # r   rV   rX   )rY   rW   r   r   r   r/   r&   r   rb   rW   rX   rc   s   &&&,   r'   rd   chebyshevt._eval_rewrite_as_Sum%  sX    1#J1Q31a4!8a-/!!A#g,>4Qac
+,,r*   c                (    V P                   ! W3/ VB # rg   rh   r/   r&   r   rb   s   &&&,r'   ri   &chebyshevt._eval_rewrite_as_polynomial+       ((888r*   r2   N   )r3   r4   r5   r6   r7   staticmethodr   r    r8   rR   r]   rd   ri   r9   r:   r;   s   @r'   rC   rC     s>     AF /K0 00	5-9 9r*   rC   c                   Z   a  ] tR tRt o Rt]! ]4      t]R 4       t	R	R lt
R tR tRtV tR# )
rF   i1  a  
Chebyshev polynomial of the second kind, $U_n(x)$.

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

``chebyshevu(n, x)`` gives the $n$th Chebyshev polynomial of the second
kind in x, $U_n(x)$.

The Chebyshev polynomials of the second kind are orthogonal on
$[-1, 1]$ with respect to the weight $\sqrt{1-x^2}$.

Examples
========

>>> from sympy import chebyshevu, diff
>>> from sympy.abc import n,x
>>> chebyshevu(0, x)
1
>>> chebyshevu(1, x)
2*x
>>> chebyshevu(2, x)
4*x**2 - 1

>>> chebyshevu(n, x)
chebyshevu(n, x)
>>> chebyshevu(n, -x)
(-1)**n*chebyshevu(n, x)
>>> chebyshevu(-n, x)
-chebyshevu(n - 2, x)

>>> chebyshevu(n, 0)
cos(pi*n/2)
>>> chebyshevu(n, 1)
n + 1

>>> diff(chebyshevu(n, x), x)
(-x*chebyshevu(n, x) + (n + 1)*chebyshevt(n + 1, x))/(x**2 - 1)

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Chebyshev_polynomial
.. [2] https://mathworld.wolfram.com/ChebyshevPolynomialoftheFirstKind.html
.. [3] https://mathworld.wolfram.com/ChebyshevPolynomialoftheSecondKind.html
.. [4] https://functions.wolfram.com/Polynomials/ChebyshevT/
.. [5] https://functions.wolfram.com/Polynomials/ChebyshevU/

c                x   VP                   '       EgF   VP                  4       '       d)   \        P                  V,          \	        W) 4      ,          # VP                  4       '       dY   V\        P                  8X  d   \        P
                  # V) ^,
          P                  4       '       g   \	        V) ^,
          V4      ) # VP                  '       d6   \        \        P                  \        P                  ,          V,          4      # V\        P                  8X  d   \        P                  V,           # V\        P                  J d   \        P                  # R# VP                  '       dA   V\        P                  8X  d   \        P
                  # V P                  V) ^,
          V4      ) # V P                  W4      # )r   N)rI   rJ   r   rK   rF   ru   rD   r   rB   rw   rL   rM   ra   r(   r$   s   &&&r'   rR   chebyshevu.evalw  s+   {{{ ))++}}a'*Q*;;;))++%66M"q&::<<&rAvq111yyy166ADD=1,--AEEzuuqy ajjzz! ! }}}%66M..rAvq999))!//r*   c                    V^8X  d   \        W4      hV^8X  d\   V P                  w  r#V^,           \        V^,           V4      ,          V\        W#4      ,          ,
          V^,          ^,
          ,          # \        W4      hr   )r   r-   rC   rF   r   s   &&  r'   r]   chebyshevu.fdiff  si    q=$T44]99DAUjQ22QA9I5IIaQRdUVhWW$T44r*   c           	     V   ^ RI Hp \        R4      p\        P                  V,          \        W,
          4      ,          ^V,          V^V,          ,
          ,          ,          \        V4      \        V^V,          ,
          4      ,          ,          pV! We^ \        V^,          4      34      # r   rY   rW   r   r   rK   r   r   r   s   &&&,   r'   rd   chebyshevu._eval_rewrite_as_Sum  s    1#J}}a)E# cQ1W%&)21	!ac'8J)JL4Qac
+,,r*   c                (    V P                   ! W3/ VB # rg   rh   r   s   &&&,r'   ri   &chebyshevu._eval_rewrite_as_polynomial  r   r*   r2   Nr   )r3   r4   r5   r6   r7   r   r   r    r8   rR   r]   rd   ri   r9   r:   r;   s   @r'   rF   rF   1  s>     AF /K0 0>	5-9 9r*   rF   c                   4   a  ] tR tRt o Rt]R 4       tRtV tR# )chebyshevt_rooti  a%  
``chebyshev_root(n, k)`` returns the $k$th root (indexed from zero) of
the $n$th Chebyshev polynomial of the first kind; that is, if
$0 \le k < n$, ``chebyshevt(n, chebyshevt_root(n, k)) == 0``.

Examples
========

>>> from sympy import chebyshevt, chebyshevt_root
>>> chebyshevt_root(3, 2)
-sqrt(3)/2
>>> chebyshevt(3, chebyshevt_root(3, 2))
0

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly
c                    ^ V8:  d   W!8  g   \        RV: RV: 24      h\        \        P                  ^V,          ^,           ,          ^V,          ,          4      # r   zmust have 0 <= k < n, got k = z	 and n = rO   r   r   rw   r%   r&   rX   s   &&&r'   rR   chebyshevt_root.eval  sH    aae+,a1 2 21441q>1Q3'((r*   r2   N	r3   r4   r5   r6   r7   r8   rR   r9   r:   r;   s   @r'   r   r     s     @ ) )r*   r   c                   4   a  ] tR tRt o Rt]R 4       tRtV tR# )chebyshevu_rooti  a  
``chebyshevu_root(n, k)`` returns the $k$th root (indexed from zero) of the
$n$th Chebyshev polynomial of the second kind; that is, if $0 \le k < n$,
``chebyshevu(n, chebyshevu_root(n, k)) == 0``.

Examples
========

>>> from sympy import chebyshevu, chebyshevu_root
>>> chebyshevu_root(3, 2)
-sqrt(2)/2
>>> chebyshevu(3, chebyshevu_root(3, 2))
0

See Also
========

chebyshevt, chebyshevt_root, chebyshevu,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly
c                    ^ V8:  d   W!8  g   \        RV: RV: 24      h\        \        P                  V^,           ,          V^,           ,          4      # r   r   r   s   &&&r'   rR   chebyshevu_root.eval  sD    aae+,a1 2 2144Q<Q'((r*   r2   Nr   r;   s   @r'   r   r     s     @ ) )r*   r   c                   Z   a  ] tR tRt o Rt]! ]4      t]R 4       t	R	R lt
R tR tRtV tR# )
rE   i  a  
``legendre(n, x)`` gives the $n$th Legendre polynomial of $x$, $P_n(x)$

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

The Legendre polynomials are orthogonal on $[-1, 1]$ with respect to
the constant weight 1. They satisfy $P_n(1) = 1$ for all $n$; further,
$P_n$ is odd for odd $n$ and even for even $n$.

Examples
========

>>> from sympy import legendre, diff
>>> from sympy.abc import x, n
>>> legendre(0, x)
1
>>> legendre(1, x)
x
>>> legendre(2, x)
3*x**2/2 - 1/2
>>> legendre(n, x)
legendre(n, x)
>>> diff(legendre(n,x), x)
n*(x*legendre(n, x) - legendre(n - 1, x))/(x**2 - 1)

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
assoc_legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Legendre_polynomial
.. [2] https://mathworld.wolfram.com/LegendrePolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/LegendreP/
.. [4] https://functions.wolfram.com/Polynomials/LegendreP2/

c                b   VP                   '       Egc   VP                  4       '       d)   \        P                  V,          \	        W) 4      ,          # VP                  4       '       dA   V) ^,
          P                  4       '       g#   \	        V) \        P
                  ,
          V4      # VP                  '       dr   \        \        P                  4      \        \        P                  V^,          ,
          4      \        \        P
                  V^,          ,           4      ,          ,          # V\        P
                  8X  d   \        P
                  # V\        P                  J d   \        P                  # R# VP                  '       d   V) \        P
                  ,
          pV P                  W4      # )r@   N)rI   rJ   r   rK   rE   rL   rD   r   rw   r   rB   rM   ra   r(   r$   s   &&&r'   rR   legendre.eval=  s   {{{ ))++}}a'(1b/99))++QBF3T3T3V3VQUU
A..yyyADDz5!A##6uQUUQqS[7I#IJJaeeuuajjzz! !
 }}}BJ%%a++r*   c                    V^8X  d   \        W4      hV^8X  dT   V P                  w  r#W#^,          ^,
          ,          V\        W#4      ,          \        V^,
          V4      ,
          ,          # \        W4      hr   )r   r-   rE   r   s   &&  r'   r]   legendre.fdiffU  sa    q=$T44] 99DAdQh<8A>!1HQUA4F!FGG$T44r*   c                   ^ RI Hp \        R4      p\        P                  V,          \        W4      ^,          ,          ^V,           ^,          W,
          ,          ,          ^V,
          ^,          V,          ,          pV! We^ V34      # r   )rY   rW   r   r   rK   r   r   s   &&&,   r'   rd   legendre._eval_rewrite_as_Summ  sb    1#J}}a 11AE192FFQPQ	TU~U4Q##r*   c                (    V P                   ! W3/ VB # rg   rh   r   s   &&&,r'   ri   $legendre._eval_rewrite_as_polynomials  r   r*   r2   Nr   )r3   r4   r5   r6   r7   r   r   r    r8   rR   r]   rd   ri   r9   r:   r;   s   @r'   rE   rE     s=     3j }-K, ,.50$9 9r*   rE   c                   `   a  ] tR tRt o Rt]R 4       t]R 4       tRR ltR t	R t
R tR	tV tR
# )rH   iy  a  
``assoc_legendre(n, m, x)`` gives $P_n^m(x)$, where $n$ and $m$ are
the degree and order or an expression which is related to the nth
order Legendre polynomial, $P_n(x)$ in the following manner:

.. math::
    P_n^m(x) = (-1)^m (1 - x^2)^{\frac{m}{2}}
               \frac{\mathrm{d}^m P_n(x)}{\mathrm{d} x^m}

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

Associated Legendre polynomials are orthogonal on $[-1, 1]$ with:

- weight $= 1$            for the same $m$ and different $n$.
- weight $= \frac{1}{1-x^2}$   for the same $n$ and different $m$.

Examples
========

>>> from sympy import assoc_legendre
>>> from sympy.abc import x, m, n
>>> assoc_legendre(0,0, x)
1
>>> assoc_legendre(1,0, x)
x
>>> assoc_legendre(1,1, x)
-sqrt(1 - x**2)
>>> assoc_legendre(n,m,x)
assoc_legendre(n, m, x)

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
legendre,
hermite, hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Associated_Legendre_polynomials
.. [2] https://mathworld.wolfram.com/LegendrePolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/LegendreP/
.. [4] https://functions.wolfram.com/Polynomials/LegendreP2/

c                    \        V\        R R7      P                  \        V34      p\        P                  V,          ^\        ^,          ,
          \        V^4      ,          ,          VP                  4       ,          # )T)polys)r   r"   diffr   rK   r   as_expr)r%   r&   mPs   &&& r'   r(   assoc_legendre._eval_at_order  sQ    !Rt,112q':}}a1r1u9x1~"==		KKr*   c                   VP                  4       '       dW   \        P                  V) ,          \        W!,           4      \        W,
          4      ,          ,          \	        W) V4      ,          # V^ 8X  d   \        W4      # V^ 8X  dq   ^V,          \        \        P                  4      ,          \        ^V,
          V,
          ^,          4      \        ^W!,
          ^,          ,
          4      ,          ,          # VP                  '       d   VP                  '       d   VP                  '       d   VP                  '       d   VP                  '       d   \        V : RV: R24      h\        V4      V8  d   \        V : RV: RV: R24      hV P                  \        V4      \        \        V4      4      4      P!                  \"        V4      # R# R# R# R# )r   z. : 1st index must be nonnegative integer (got )z0 : abs('2nd index') must be <= '1st index' (got z, N)rJ   r   rK   r   rH   rE   r   rw   r   rI   r   ra   rO   absr(   r!   r#   r"   )r%   r&   r   r   s   &&&&r'   rR   assoc_legendre.eval  s7   %%''==A2&)AE*:9QU;K*KL~^_acefOggg6A>!6a4QTT
?eQUQYM&:5aeQY;O&OPP;;;1;;;1<<<ALLL}}} Z]_`!abb1vz `cefhi!jkk%%c!fc#a&k:??AFF =I<;;r*   c                @   V^8X  d   \        W4      hV^8X  d   \        W4      hV^8X  dj   V P                  w  r#p^V^,          ^,
          ,          WB,          \        W#V4      ,          W2,           \        V^,
          W44      ,          ,
          ,          # \        W4      hr   )r   r-   rH   )r/   rZ   r&   r   r   s   &&   r'   r]   assoc_legendre.fdiff  s    q=$T44]$T44] iiGA!adQh<^A!%<!<~VWZ[V[]^Gb?b!bcc$T44r*   c           
     6   ^ RI Hp \        R4      p\        ^V,          ^V,          ,
          4      ^V,          \        W,
          4      ,          \        V4      ,          \        V^V,          ,
          V,
          4      ,          ,          \        P
                  V,          ,          W1V,
          ^V,          ,
          ,          ,          p^V^,          ,
          V^,          ,          V! Wv^ \        W,
          \        P                  ,          4      34      ,          # r   )rY   rW   r   r   r   rK   r   rB   )r/   r&   r   r   rb   rW   rX   rc   s   &&&&,   r'   rd   #assoc_legendre._eval_rewrite_as_Sum  s    1#J1qs#QT)AE*:%:9< &QqS1%&& ''(}}a'7889EAaCK8HIAqDAaC 3tE15!&&.4I-J#KKKr*   c                *    V P                   ! WV3/ VB # rg   rh   )r/   r&   r   r   rb   s   &&&&,r'   ri   *assoc_legendre._eval_rewrite_as_polynomial  r   r*   c                |    V P                   w  rpV P                  WP                  4       VP                  4       4      # rg   rl   )r/   r&   r   r   s   &   r'   r0   assoc_legendre._eval_conjugate  r   r*   r2   Nr   )r3   r4   r5   r6   r7   r8   r(   rR   r]   rd   ri   r0   r9   r:   r;   s   @r'   rH   rH   y  sQ     8t L L G G 5L<
: :r*   rH   c                   `   a  ] tR tRt o Rt]! ]4      t]R 4       t	R
R lt
R tR tR tRtV tR	# )hermitei  a  
``hermite(n, x)`` gives the $n$th Hermite polynomial in $x$, $H_n(x)$.

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

The Hermite polynomials are orthogonal on $(-\infty, \infty)$
with respect to the weight $\exp\left(-x^2\right)$.

Examples
========

>>> from sympy import hermite, diff
>>> from sympy.abc import x, n
>>> hermite(0, x)
1
>>> hermite(1, x)
2*x
>>> hermite(2, x)
4*x**2 - 2
>>> hermite(n, x)
hermite(n, x)
>>> diff(hermite(n,x), x)
2*n*hermite(n - 1, x)
>>> hermite(n, -x)
(-1)**n*hermite(n, x)

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite_prob,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Hermite_polynomial
.. [2] https://mathworld.wolfram.com/HermitePolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/HermiteH/

c                "   VP                   '       g   VP                  4       '       d)   \        P                  V,          \	        W) 4      ,          # VP
                  '       dT   ^V,          \        \        P                  4      ,          \        \        P                  V,
          ^,          4      ,          # V\        P                  J d   \        P                  # R# VP                  '       d   \        RV,          4      hV P                  W4      # )r   0The index n must be nonnegative integer (got %r)N)rI   rJ   r   rK   r   rD   r   rw   r   rL   rM   ra   rO   r(   r$   s   &&&r'   rR   hermite.eval&  s    {{{ ))++}}a''!R.88yyy!td144j(5!%%!)Q+???ajjzz! ! }}} FJL L ))!//r*   c                    V^8X  d   \        W4      hV^8X  d0   V P                  w  r#^V,          \        V^,
          V4      ,          # \        W4      hr   )r   r-   r   r   s   &&  r'   r]   hermite.fdiff:  sK    q=$T44]99DAQ3wq1ua((($T44r*   c           
     J   ^ RI Hp \        R4      p\        P                  V,          \        V4      \        V^V,          ,
          4      ,          ,          ^V,          V^V,          ,
          ,          ,          p\        V4      V! We^ \        V^,          4      34      ,          # r   r   r   s   &&&,   r'   rd   hermite._eval_rewrite_as_SumE  ss    1#J}}a9Q<	!ac'0B#BCqsaRSTURUgFVV|C!U1Q3Z&8999r*   c                (    V P                   ! W3/ VB # rg   rh   r   s   &&&,r'   ri   #hermite._eval_rewrite_as_polynomialK  r   r*   c                f    \        ^4      V,          \        W\        ^4      ,          4      ,          # r   )r   hermite_probr   s   &&&,r'   _eval_rewrite_as_hermite_prob%hermite._eval_rewrite_as_hermite_probP  s"    AwzLd1gI666r*   r2   Nr   )r3   r4   r5   r6   r7   r   r   r    r8   rR   r]   rd   ri   r   r9   r:   r;   s   @r'   r   r     sB     3j |,K0 0&	5:9
7 7r*   r   c                   `   a  ] tR tRt o Rt]! ]4      t]R 4       t	R
R lt
R tR tR tRtV tR	# )r   iT  a  
``hermite_prob(n, x)`` gives the $n$th probabilist's Hermite polynomial
in $x$, $He_n(x)$.

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

The probabilist's Hermite polynomials are orthogonal on $(-\infty, \infty)$
with respect to the weight $\exp\left(-\frac{x^2}{2}\right)$. They are monic
polynomials, related to the plain Hermite polynomials (:py:class:`~.hermite`) by

.. math :: He_n(x) = 2^{-n/2} H_n(x/\sqrt{2})

Examples
========

>>> from sympy import hermite_prob, diff, I
>>> from sympy.abc import x, n
>>> hermite_prob(1, x)
x
>>> hermite_prob(5, x)
x**5 - 10*x**3 + 15*x
>>> diff(hermite_prob(n,x), x)
n*hermite_prob(n - 1, x)
>>> hermite_prob(n, -x)
(-1)**n*hermite_prob(n, x)

The sum of absolute values of coefficients of $He_n(x)$ is the number of
matchings in the complete graph $K_n$ or telephone number, A000085 in the OEIS:

>>> [hermite_prob(n,I) / I**n for n in range(11)]
[1, 1, 2, 4, 10, 26, 76, 232, 764, 2620, 9496]

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite,
laguerre, assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Hermite_polynomial
.. [2] https://mathworld.wolfram.com/HermitePolynomial.html
c                
   VP                   '       g   VP                  4       '       d)   \        P                  V,          \	        W) 4      ,          # VP
                  '       dF   \        \        P                  4      \        \        P                  V,
          ^,          4      ,          # V\        P                  J d   \        P                  # R# VP                  '       d   \        RV,          4       R# V P                  W4      # )r   z'n must be a nonnegative integer, not %rN)rI   rJ   r   rK   r   rD   r   rw   r   rL   rM   ra   rO   r(   r$   s   &&&r'   rR   hermite_prob.eval  s    {{{))++}}a',q"*===yyyADDzE1557a-$888ajjzz! ! }}}DqHI))!//r*   c                v    V^8X  d)   V P                   w  r#V\        V^,
          V4      ,          # \        W4      hr   )r-   r   r   r   s   &&  r'   r]   hermite_prob.fdiff  s5    q=99DA\!A#q)))$T44r*   c           
     <   ^ RI Hp \        R4      p\        P                  ) V,          W!^V,          ,
          ,          ,          \        V4      \        V^V,          ,
          4      ,          ,          p\        V4      V! We^ \        V^,          4      34      ,          # r   )rY   rW   r   r   rB   r   r   r   s   &&&,   r'   rd   !hermite_prob._eval_rewrite_as_Sum  sj    1#J!|aAaC%j(IaL9QqsU;K,KL|C!U1Q3Z&8999r*   c                (    V P                   ! W3/ VB # rg   rh   r   s   &&&,r'   ri   (hermite_prob._eval_rewrite_as_polynomial  r   r*   c                h    \        ^4      V) ,          \        W\        ^4      ,          4      ,          # r   )r   r   r   s   &&&,r'   _eval_rewrite_as_hermite%hermite_prob._eval_rewrite_as_hermite  s$    Aw!}wqDG)444r*   r2   Nr   )r3   r4   r5   r6   r7   r   r   r    r8   rR   r]   rd   ri   r   r9   r:   r;   s   @r'   r   r   T  sC     7r 01K0 05:9
5 5r*   r   c                   Z   a  ] tR tRt o Rt]! ]4      t]R 4       t	R	R lt
R tR tRtV tR# )
laguerrei  a  
Returns the $n$th Laguerre polynomial in $x$, $L_n(x)$.

Examples
========

>>> from sympy import laguerre, diff
>>> from sympy.abc import x, n
>>> laguerre(0, x)
1
>>> laguerre(1, x)
1 - x
>>> laguerre(2, x)
x**2/2 - 2*x + 1
>>> laguerre(3, x)
-x**3/6 + 3*x**2/2 - 3*x + 1

>>> laguerre(n, x)
laguerre(n, x)

>>> diff(laguerre(n, x), x)
-assoc_laguerre(n - 1, 1, x)

Parameters
==========

n : int
    Degree of Laguerre polynomial. Must be `n \ge 0`.

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
assoc_laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Laguerre_polynomial
.. [2] https://mathworld.wolfram.com/LaguerrePolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/LaguerreL/
.. [4] https://functions.wolfram.com/Polynomials/LaguerreL3/

c                   VP                   R J d   \        R4      hVP                  '       g   VP                  4       '       dD   V) ^,
          P                  4       '       g&   \	        V4      \        V) ^,
          V) 4      ,          # VP                  '       d   \        P                  # V\        P                  J d   \        P                  # V\        P                  J d-   \        P                  V,          \        P                  ,          # R# VP                  '       d&   \	        V4      \        V) ^,
          V) 4      ,          # V P                  W4      # )FError: n should be an integer.N)r   rO   rI   rJ   r   r   rD   r   rL   NegativeInfinityrM   rK   ra   r(   r$   s   &&&r'   rR   laguerre.eval  s    <<5 =>>{{{ ))++QBF3T3T3V3V1vhrAvr222yyyuua(((zz!ajj}}a'!**44 ! }}}1vhrAvr222))!//r*   c                    V^8X  d   \        W4      hV^8X  d$   V P                  w  r#\        V^,
          ^V4      ) # \        W4      hr   )r   r-   assoc_laguerrer   s   &&  r'   r]   laguerre.fdiff  sG    q=$T44]99DA"1q5!Q///$T44r*   c                P   ^ RI Hp VP                  '       d.   \        V4      V P                  ! V) ^,
          V) 3/ VB ,          # VP
                  RJ d   \        R4      h\        R4      p\        V) V4      \        V4      ^,          ,          W%,          ,          pV! We^ V34      # )r   rV   Fr   rX   )
rY   rW   ra   r   rd   r   rO   r   r	   r   r   s   &&&,   r'   rd   laguerre._eval_rewrite_as_Sum  s    1===q6D55qb1fqbKFKKK<<5 =>>#Jr1%	!a7!$>4Q##r*   c                (    V P                   ! W3/ VB # rg   rh   r   s   &&&,r'   ri   $laguerre._eval_rewrite_as_polynomial"  r   r*   r2   Nr   )r3   r4   r5   r6   r7   r   r   r    r8   rR   r]   rd   ri   r9   r:   r;   s   @r'   r   r     s=     6p }-K0 0,	5	$9 9r*   r   c                   P   a  ] tR tRt o Rt]R 4       tR
R ltR tR t	R t
RtV tR	# )r   i(  a  
Returns the $n$th generalized Laguerre polynomial in $x$, $L_n(x)$.

Examples
========

>>> from sympy import assoc_laguerre, diff
>>> from sympy.abc import x, n, a
>>> assoc_laguerre(0, a, x)
1
>>> assoc_laguerre(1, a, x)
a - x + 1
>>> assoc_laguerre(2, a, x)
a**2/2 + 3*a/2 + x**2/2 + x*(-a - 2) + 1
>>> assoc_laguerre(3, a, x)
a**3/6 + a**2 + 11*a/6 - x**3/6 + x**2*(a/2 + 3/2) +
    x*(-a**2/2 - 5*a/2 - 3) + 1

>>> assoc_laguerre(n, a, 0)
binomial(a + n, a)

>>> assoc_laguerre(n, a, x)
assoc_laguerre(n, a, x)

>>> assoc_laguerre(n, 0, x)
laguerre(n, x)

>>> diff(assoc_laguerre(n, a, x), x)
-assoc_laguerre(n - 1, a + 1, x)

>>> diff(assoc_laguerre(n, a, x), a)
Sum(assoc_laguerre(_k, a, x)/(-a + n), (_k, 0, n - 1))

Parameters
==========

n : int
    Degree of Laguerre polynomial. Must be `n \ge 0`.

alpha : Expr
    Arbitrary expression. For ``alpha=0`` regular Laguerre
    polynomials will be generated.

See Also
========

jacobi, gegenbauer,
chebyshevt, chebyshevt_root, chebyshevu, chebyshevu_root,
legendre, assoc_legendre,
hermite, hermite_prob,
laguerre,
sympy.polys.orthopolys.jacobi_poly
sympy.polys.orthopolys.gegenbauer_poly
sympy.polys.orthopolys.chebyshevt_poly
sympy.polys.orthopolys.chebyshevu_poly
sympy.polys.orthopolys.hermite_poly
sympy.polys.orthopolys.hermite_prob_poly
sympy.polys.orthopolys.legendre_poly
sympy.polys.orthopolys.laguerre_poly

References
==========

.. [1] https://en.wikipedia.org/wiki/Laguerre_polynomial#Generalized_Laguerre_polynomials
.. [2] https://mathworld.wolfram.com/AssociatedLaguerrePolynomial.html
.. [3] https://functions.wolfram.com/Polynomials/LaguerreL/
.. [4] https://functions.wolfram.com/Polynomials/LaguerreL3/

c                   VP                   '       d   \        W4      # VP                  '       g   VP                   '       d   \        W,           V4      # V\        P
                  J d4   V^ 8  d-   \        P                  V,          \        P
                  ,          # V\        P                  J d   V^ 8  d   \        P
                  # R# R# VP                  '       d   \        RV,          4      h\        WV4      # )r   r   N)rD   r   rI   r   r   rM   rK   r   ra   rO   r   )r%   r&   alphar   s   &&&&r'   rR   assoc_laguerre.evalo  s     ===A>!{{{yyy	511ajjQU}}a'!**44a(((QUzz! .3( }}} FJL L %Q511r*   c                B   ^ RI Hp V^8X  d   \        W4      hV^8X  dE   V P                  w  r4p\	        R4      pV! \        WdV4      W4,
          ,          V^ V^,
          34      # V^8X  d,   V P                  w  r4p\        V^,
          V^,           V4      ) # \        W4      hr   )rY   rW   r   r-   r   r   )r/   rZ   rW   r&   r   r   rX   s   &&     r'   r]   assoc_laguerre.fdiff  s    1q=$T44]))KAac
A~a2ai@1aQ-PP]))KAa"1q5%!)Q777$T44r*   c                |   ^ RI Hp VP                  '       g   VP                  RJ d   \	        R4      h\        R4      p\        V) V4      \        Wb,           ^,           4      \        V4      ,          ,          W6,          ,          p\        W,           ^,           4      \        V4      ,          V! Wv^ V34      ,          # r`   )	rY   rW   ra   r   rO   r   r	   r   r   )r/   r&   r   r   rb   rW   rX   rc   s   &&&&,   r'   rd   #assoc_laguerre._eval_rewrite_as_Sum  s    1===ALLE1IJJ#JBAIM*Yq\9;=>TBQY]#il2S1ay5IIIr*   c                *    V P                   ! WV3/ VB # rg   rh   )r/   r&   r   r   rb   s   &&&&,r'   ri   *assoc_laguerre._eval_rewrite_as_polynomial  s     ((1???r*   c                |    V P                   w  rpV P                  WP                  4       VP                  4       4      # rg   rl   )r/   r&   r   r   s   &   r'   r0   assoc_laguerre._eval_conjugate  s-    ii!yyOO-q{{}==r*   r2   Nr   ro   r;   s   @r'   r   r   (  s;     DL 2 2*5"J@
> >r*   r   N)5r7   
sympy.corer   sympy.core.functionr   r   sympy.core.singletonr   sympy.core.symbolr   (sympy.functions.combinatorial.factorialsr   r   r	   $sympy.functions.elementary.complexesr
   &sympy.functions.elementary.exponentialr   #sympy.functions.elementary.integersr   (sympy.functions.elementary.miscellaneousr   (sympy.functions.elementary.trigonometricr   r   'sympy.functions.special.gamma_functionsr   sympy.functions.special.hyperr   sympy.polys.orthopolysr   r   r   r   r   r   r   r   r"   r   r>   rr   rG   rC   rF   r   r   rE   rH   r   r   r   r   r2   r*   r'   <module>r     s     C " # Y Y 3 6 5 9 = 9 /O O O 3Z
A? 
A"dI! dINF.\R:% R:rs9% s9l{9% {9|&)o &)R&)o &)Zq9# q9hn:_ n:jc7" c7L^5' ^5Lk9# k9\>) >r*   