§
    OŠtj¨B  ã                   ó¢   — d dl mZmZmZ d dlmZ d dlmZmZ d dl	m
Z
 d dlmZ d dlmZmZmZmZ d dlmZ d„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )é    )ÚSÚDummyÚpi)Ú	factorial)ÚsinÚcos)Úsqrt)Úgamma)Úlegendre_polyÚlaguerre_polyÚhermite_polyÚjacobi_poly)ÚRootOfc           	      ó  — t          d¦  «        }t          | |d¬¦  «        }|                     |¦  «        }g }g }|                     ¦   «         D ]²}t	          |t
          ¦  «        r(|                     t          j        d|dz   z  z  ¦  «        }| 	                    | 
                    |¦  «        ¦  «         | 	                    dd|dz  z
  |                     ||¦  «        dz  z  z   
                    |¦  «        ¦  «         Œ³||fS )aÏ  
    Computes the Gauss-Legendre quadrature [1]_ points and weights.

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

    The Gauss-Legendre quadrature approximates the integral:

    .. math::
        \int_{-1}^1 f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of `P_n`
    and the weights `w_i` are given by:

    .. math::
        w_i = \frac{2}{\left(1-x_i^2\right) \left(P'_n(x_i)\right)^2}

    Parameters
    ==========

    n :
        The order of quadrature.
    n_digits :
        Number of significant digits of the points and weights to return.

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_legendre
    >>> x, w = gauss_legendre(3, 5)
    >>> x
    [-0.7746, 0, 0.7746]
    >>> w
    [0.55556, 0.88889, 0.55556]
    >>> x, w = gauss_legendre(4, 5)
    >>> x
    [-0.86114, -0.33998, 0.33998, 0.86114]
    >>> w
    [0.34785, 0.65215, 0.65215, 0.34785]

    See Also
    ========

    gauss_laguerre, gauss_gen_laguerre, gauss_hermite, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gaussian_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/legendre_rule/legendre_rule.html
    ÚxT©Úpolysé
   é   é   )r   r   ÚdiffÚ
real_rootsÚ
isinstancer   Úeval_rationalr   ÚOneÚappendÚnÚsubs©r   Ún_digitsr   ÚpÚpdÚxiÚwÚrs           úX/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/integrals/quadrature.pyÚgauss_legendrer'      sô   € õv 	ˆc‰
Œ
€AÝ�a˜ $Ð'Ñ'Ô'€AØ	
�Š�‰Œ€BØ	€BØ
€AØ�\Š\‰^Œ^ð @ð @ˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�Š�!�a˜˜1™‘f §¢¨¨1¡¤¨qÑ 0Ñ0Ñ1×4Ò4°XÑ>Ô>Ñ?Ô?Ð?Ð?Øˆqˆ5€Ló    c           	      ó  — t          d¦  «        }t          | |d¬¦  «        }t          | dz   |d¬¦  «        }g }g }|                     ¦   «         D ]²}t          |t          ¦  «        r(|                     t          j        d|dz   z  z  ¦  «        }|                     | 	                    |¦  «        ¦  «         |                     || dz   dz  | 
                    ||¦  «        dz  z  z   	                    |¦  «        ¦  «         Œ³||fS )a  
    Computes the Gauss-Laguerre quadrature [1]_ points and weights.

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

    The Gauss-Laguerre quadrature approximates the integral:

    .. math::
        \int_0^{\infty} e^{-x} f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i)


    The nodes `x_i` of an order `n` quadrature rule are the roots of `L_n`
    and the weights `w_i` are given by:

    .. math::
        w_i = \frac{x_i}{(n+1)^2 \left(L_{n+1}(x_i)\right)^2}

    Parameters
    ==========

    n :
        The order of quadrature.
    n_digits :
        Number of significant digits of the points and weights to return.

    Returns
    =======

    (x, w) : The ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_laguerre
    >>> x, w = gauss_laguerre(3, 5)
    >>> x
    [0.41577, 2.2943, 6.2899]
    >>> w
    [0.71109, 0.27852, 0.010389]
    >>> x, w = gauss_laguerre(6, 5)
    >>> x
    [0.22285, 1.1889, 2.9927, 5.7751, 9.8375, 15.983]
    >>> w
    [0.45896, 0.417, 0.11337, 0.010399, 0.00026102, 8.9855e-7]

    See Also
    ========

    gauss_legendre, gauss_gen_laguerre, gauss_hermite, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gauss%E2%80%93Laguerre_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/laguerre_rule/laguerre_rule.html
    r   Tr   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   ©r   r    r   r!   Úp1r#   r$   r%   s           r&   Úgauss_laguerrer,   S   sý   € õx 	ˆc‰
Œ
€AÝ�a˜ $Ð'Ñ'Ô'€AÝ	�q˜‘s˜A TÐ	*Ñ	*Ô	*€BØ	€BØ
€AØ�\Š\‰^Œ^ð @ð @ˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�Š�!�a˜‘c˜A‘X §¢¨¨1¡¤¨qÑ 0Ñ0Ñ1×4Ò4°XÑ>Ô>Ñ?Ô?Ð?Ð?Øˆqˆ5€Lr(   c           	      ó\  — t          d¦  «        }t          | |d¬¦  «        }t          | dz
  |d¬¦  «        }g }g }|                     ¦   «         D ]Ú}t          |t          ¦  «        r(|                     t          j        d|dz   z  z  ¦  «        }|                     | 	                    |¦  «        ¦  «         |                     d| dz
  z  t          | ¦  «        z  t          t          ¦  «        z  | dz  |                     ||¦  «        dz  z  z   	                    |¦  «        ¦  «         ŒÛ||fS )au  
    Computes the Gauss-Hermite quadrature [1]_ points and weights.

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

    The Gauss-Hermite quadrature approximates the integral:

    .. math::
        \int_{-\infty}^{\infty} e^{-x^2} f(x)\,dx \approx
            \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of `H_n`
    and the weights `w_i` are given by:

    .. math::
        w_i = \frac{2^{n-1} n! \sqrt{\pi}}{n^2 \left(H_{n-1}(x_i)\right)^2}

    Parameters
    ==========

    n :
        The order of quadrature.
    n_digits :
        Number of significant digits of the points and weights to return.

    Returns
    =======

    (x, w) : The ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_hermite
    >>> x, w = gauss_hermite(3, 5)
    >>> x
    [-1.2247, 0, 1.2247]
    >>> w
    [0.29541, 1.1816, 0.29541]

    >>> x, w = gauss_hermite(6, 5)
    >>> x
    [-2.3506, -1.3358, -0.43608, 0.43608, 1.3358, 2.3506]
    >>> w
    [0.00453, 0.15707, 0.72463, 0.72463, 0.15707, 0.00453]

    See Also
    ========

    gauss_legendre, gauss_laguerre, gauss_gen_laguerre, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gauss-Hermite_Quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/hermite_rule/hermite_rule.html
    .. [3] https://people.sc.fsu.edu/~jburkardt/cpp_src/gen_hermite_rule/gen_hermite_rule.html
    r   Tr   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r	   r   r   r*   s           r&   Úgauss_hermiter.   œ   s  € õ| 	ˆc‰
Œ
€AÝ�Q˜ Ð&Ñ&Ô&€AÝ	�a˜‘c˜1 DÐ	)Ñ	)Ô	)€BØ	€BØ
€AØ�\Š\‰^Œ^ð 9ð 9ˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�Š�1�q˜‘s‘8�i¨™lœlÑ*­Tµ"©X¬XÑ5Ø�Q‘$˜Ÿš  A™œ¨Ñ)Ñ)ñ+ß,-ªA¨h©K¬Kñ	9ô 	9ð 	9ð 	9àˆqˆ5€Lr(   c           	      óž  — t          d¦  «        }t          | ||d¬¦  «        }t          | dz
  ||d¬¦  «        }t          | dz
  ||dz   d¬¦  «        }g }g }|                     ¦   «         D ]à}	t          |	t          ¦  «        r(|	                     t          j        d|dz   z  z  ¦  «        }	|                     |	 	                    |¦  «        ¦  «         |                     t          || z   ¦  «        | t          | ¦  «        z  |                     ||	¦  «        z  |                     ||	¦  «        z  z   	                    |¦  «        ¦  «         Œá||fS )aÓ  
    Computes the generalized Gauss-Laguerre quadrature [1]_ points and weights.

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

    The generalized Gauss-Laguerre quadrature approximates the integral:

    .. math::
        \int_{0}^\infty x^{\alpha} e^{-x} f(x)\,dx \approx
            \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of
    `L^{\alpha}_n` and the weights `w_i` are given by:

    .. math::
        w_i = \frac{\Gamma(\alpha+n)}
                {n \Gamma(n) L^{\alpha}_{n-1}(x_i) L^{\alpha+1}_{n-1}(x_i)}

    Parameters
    ==========

    n :
        The order of quadrature.

    alpha :
        The exponent of the singularity, `\alpha > -1`.

    n_digits :
        Number of significant digits of the points and weights to return.

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy import S
    >>> from sympy.integrals.quadrature import gauss_gen_laguerre
    >>> x, w = gauss_gen_laguerre(3, -S.Half, 5)
    >>> x
    [0.19016, 1.7845, 5.5253]
    >>> w
    [1.4493, 0.31413, 0.00906]

    >>> x, w = gauss_gen_laguerre(4, 3*S.Half, 5)
    >>> x
    [0.97851, 2.9904, 6.3193, 11.712]
    >>> w
    [0.53087, 0.67721, 0.11895, 0.0023152]

    See Also
    ========

    gauss_legendre, gauss_laguerre, gauss_hermite, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gauss%E2%80%93Laguerre_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/gen_laguerre_rule/gen_laguerre_rule.html
    r   T)Úalphar   r   r   r   )r   r   r   r   r   r   r   r   r   r   r
   r   )
r   r0   r    r   r!   r+   Úp2r#   r$   r%   s
             r&   Úgauss_gen_laguerrer2   è   sC  € õF 	ˆc‰
Œ
€AÝ�a˜ %¨tÐ4Ñ4Ô4€AÝ	�q˜‘s˜A U°$Ð	7Ñ	7Ô	7€BÝ	�q˜‘s˜A U¨1¡W°DÐ	9Ñ	9Ô	9€BØ	€BØ
€AØ�\Š\‰^Œ^ð Hð HˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�Š•%˜˜a™‘.”.Ø•E˜!‘H”H‘*˜RŸWšW Q¨™]œ]Ñ*¨2¯7ª7°1°a©=¬=Ñ8ñ:ß;<º1¸X¹;¼;ñ	Hô 	Hð 	Hð 	Hàˆqˆ5€Lr(   c                 óX  — g }g }t          d| dz   ¦  «        D ]�}|                     t          d|z  t          j        z
  d| z  z  t          j        z  ¦  «                             |¦  «        ¦  «         |                     t          j        | z                       |¦  «        ¦  «         Œ�||fS )a-  
    Computes the Gauss-Chebyshev quadrature [1]_ points and weights of
    the first kind.

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

    The Gauss-Chebyshev quadrature of the first kind approximates the integral:

    .. math::
        \int_{-1}^{1} \frac{1}{\sqrt{1-x^2}} f(x)\,dx \approx
            \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of `T_n`
    and the weights `w_i` are given by:

    .. math::
        w_i = \frac{\pi}{n}

    Parameters
    ==========

    n :
        The order of quadrature.

    n_digits :
        Number of significant digits of the points and weights to return.

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_chebyshev_t
    >>> x, w = gauss_chebyshev_t(3, 5)
    >>> x
    [0.86602, 0, -0.86602]
    >>> w
    [1.0472, 1.0472, 1.0472]

    >>> x, w = gauss_chebyshev_t(6, 5)
    >>> x
    [0.96593, 0.70711, 0.25882, -0.25882, -0.70711, -0.96593]
    >>> w
    [0.5236, 0.5236, 0.5236, 0.5236, 0.5236, 0.5236]

    See Also
    ========

    gauss_legendre, gauss_laguerre, gauss_hermite, gauss_gen_laguerre, gauss_chebyshev_u, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Chebyshev%E2%80%93Gauss_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/chebyshev1_rule/chebyshev1_rule.html
    r   r   )Úranger   r   r   r   ÚPir   ©r   r    r#   r$   Úis        r&   Úgauss_chebyshev_tr8   :  sœ   € ð~ 
€BØ
€AÝ�1�a˜‘c‰]Œ]ð 'ð 'ˆØ
�	Š	•3˜˜!™�AœE™	 A a¡CÑ(­¬Ñ-Ñ.Ô.×1Ò1°(Ñ;Ô;Ñ<Ô<Ð<Ø	�Š•!”$�q‘&—’˜HÑ%Ô%Ñ&Ô&Ð&Ð&Øˆqˆ5€Lr(   c           	      óÆ  — g }g }t          d| dz   ¦  «        D ]Æ}|                     t          || t          j        z   z  t          j        z  ¦  «                             |¦  «        ¦  «         |                     t          j        | t          j        z   z  t          |t          j        z  | t          j        z   z  ¦  «        dz  z                       |¦  «        ¦  «         ŒÇ||fS )a:  
    Computes the Gauss-Chebyshev quadrature [1]_ points and weights of
    the second kind.

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

    The Gauss-Chebyshev quadrature of the second kind approximates the
    integral:

    .. math::
        \int_{-1}^{1} \sqrt{1-x^2} f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of `U_n`
    and the weights `w_i` are given by:

    .. math::
        w_i = \frac{\pi}{n+1} \sin^2 \left(\frac{i}{n+1}\pi\right)

    Parameters
    ==========

    n : the order of quadrature

    n_digits : number of significant digits of the points and weights to return

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_chebyshev_u
    >>> x, w = gauss_chebyshev_u(3, 5)
    >>> x
    [0.70711, 0, -0.70711]
    >>> w
    [0.3927, 0.7854, 0.3927]

    >>> x, w = gauss_chebyshev_u(6, 5)
    >>> x
    [0.90097, 0.62349, 0.22252, -0.22252, -0.62349, -0.90097]
    >>> w
    [0.084489, 0.27433, 0.42658, 0.42658, 0.27433, 0.084489]

    See Also
    ========

    gauss_legendre, gauss_laguerre, gauss_hermite, gauss_gen_laguerre, gauss_chebyshev_t, gauss_jacobi, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Chebyshev%E2%80%93Gauss_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/chebyshev2_rule/chebyshev2_rule.html
    r   r   )r4   r   r   r   r   r5   r   r   r6   s        r&   Úgauss_chebyshev_ur:   �  sÀ   € ðz 
€BØ
€AÝ�1�a˜‘c‰]Œ]ð Hð HˆØ
�	Š	•3�q˜!�AœE™'‘{¥1¤4Ñ'Ñ(Ô(×+Ò+¨HÑ5Ô5Ñ6Ô6Ð6Ø	�Š•!”$˜�!œ%™‘.¥ Q¥q¤t¡V¨Q­q¬u©WÑ%5Ñ!6Ô!6¸Ñ!9Ñ9×<Ò<¸XÑFÔFÑGÔGÐGÐGØˆqˆ5€Lr(   c           	      ót  — t          d¦  «        }t          | |||d¬¦  «        }|                     |¦  «        }t          | dz   |||d¬¦  «        }g }g }	|                     ¦   «         D �]L}
t	          |
t
          ¦  «        r(|
                     t          j        d|dz   z  z  ¦  «        }
| 	                    |
 
                    |¦  «        ¦  «         |	 	                    d| z  |z   |z   dz    | |z   |z   t          j        z   z  t          | |z   dz   ¦  «        t          | |z   dz   ¦  «        z  z  t          | |z   |z   t          j        z   ¦  «        t          | dz   ¦  «        z  z  d||z   z  z  |                     ||
¦  «        |                     ||
¦  «        z  z   
                    |¦  «        ¦  «         �ŒN||	fS )a  
    Computes the Gauss-Jacobi quadrature [1]_ points and weights.

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

    The Gauss-Jacobi quadrature of the first kind approximates the integral:

    .. math::
        \int_{-1}^1 (1-x)^\alpha (1+x)^\beta f(x)\,dx \approx
            \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of
    `P^{(\alpha,\beta)}_n` and the weights `w_i` are given by:

    .. math::
        w_i = -\frac{2n+\alpha+\beta+2}{n+\alpha+\beta+1}
              \frac{\Gamma(n+\alpha+1)\Gamma(n+\beta+1)}
              {\Gamma(n+\alpha+\beta+1)(n+1)!}
              \frac{2^{\alpha+\beta}}{P'_n(x_i)
              P^{(\alpha,\beta)}_{n+1}(x_i)}

    Parameters
    ==========

    n : the order of quadrature

    alpha : the first parameter of the Jacobi Polynomial, `\alpha > -1`

    beta : the second parameter of the Jacobi Polynomial, `\beta > -1`

    n_digits : number of significant digits of the points and weights to return

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy import S
    >>> from sympy.integrals.quadrature import gauss_jacobi
    >>> x, w = gauss_jacobi(3, S.Half, -S.Half, 5)
    >>> x
    [-0.90097, -0.22252, 0.62349]
    >>> w
    [1.7063, 1.0973, 0.33795]

    >>> x, w = gauss_jacobi(6, 1, 1, 5)
    >>> x
    [-0.87174, -0.5917, -0.2093, 0.2093, 0.5917, 0.87174]
    >>> w
    [0.050584, 0.22169, 0.39439, 0.39439, 0.22169, 0.050584]

    See Also
    ========

    gauss_legendre, gauss_laguerre, gauss_hermite, gauss_gen_laguerre,
    gauss_chebyshev_t, gauss_chebyshev_u, gauss_lobatto

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gauss%E2%80%93Jacobi_quadrature
    .. [2] https://people.sc.fsu.edu/~jburkardt/cpp_src/jacobi_rule/jacobi_rule.html
    .. [3] https://people.sc.fsu.edu/~jburkardt/cpp_src/gegenbauer_rule/gegenbauer_rule.html
    r   Tr   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r
   r   )r   r0   Úbetar    r   r!   r"   Úpnr#   r$   r%   s              r&   Úgauss_jacobir>   Æ  s»  € õN 	ˆc‰
Œ
€AÝ�A�u˜d A¨TÐ2Ñ2Ô2€AØ	
�Š�‰Œ€BÝ	�Q�q‘S˜%  q°Ð	5Ñ	5Ô	5€BØ	€BØ
€AØ�\Š\‰^Œ^ð Lñ LˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�ŠØ�‰s�5‰y˜‰~˜aÑÐ  A e¡G¨D¡Lµ´Ñ$6Ñ7Ý�1�U‘7˜1‘9ÑÔ�e A d¡F¨1¡H™oœoÑ-ñ/å�1�U‘7˜4‘<¥¤Ñ%Ñ&Ô&¥u¨Q¨q©S¡z¤zÑ1ñ3ð ��d‘
‰Oñð  "Ÿwšw q¨!™}œ}¨r¯wªw°q¸!©}¬}Ñ<ñ>÷ @AºqÀ¹{¼{ñ		Lô 	Lð 	Lñ 	Lð
 ˆqˆ5€Lr(   c           	      ób  — t          d¦  «        }t          | dz
  |d¬¦  «        }|                     |¦  «        }g }g }|                     ¦   «         D ]²}t	          |t
          ¦  «        r(|                     t          j        d|dz   z  z  ¦  «        }| 	                    | 
                    |¦  «        ¦  «         | 	                    d| | dz
  z  |                     ||¦  «        dz  z  z   
                    |¦  «        ¦  «         Œ³|                     dd¦  «         | 	                    d¦  «         |                     dt          d¦  «        | | dz
  z  z   
                    |¦  «        ¦  «         | 	                    t          d¦  «        | | dz
  z  z   
                    |¦  «        ¦  «         ||fS )	a	  
    Computes the Gauss-Lobatto quadrature [1]_ points and weights.

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

    The Gauss-Lobatto quadrature approximates the integral:

    .. math::
        \int_{-1}^1 f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i)

    The nodes `x_i` of an order `n` quadrature rule are the roots of `P'_(n-1)`
    and the weights `w_i` are given by:

    .. math::
        &w_i = \frac{2}{n(n-1) \left[P_{n-1}(x_i)\right]^2},\quad x\neq\pm 1\\
        &w_i = \frac{2}{n(n-1)},\quad x=\pm 1

    Parameters
    ==========

    n : the order of quadrature

    n_digits : number of significant digits of the points and weights to return

    Returns
    =======

    (x, w) : the ``x`` and ``w`` are lists of points and weights as Floats.
             The points `x_i` and weights `w_i` are returned as ``(x, w)``
             tuple of lists.

    Examples
    ========

    >>> from sympy.integrals.quadrature import gauss_lobatto
    >>> x, w = gauss_lobatto(3, 5)
    >>> x
    [-1, 0, 1]
    >>> w
    [0.33333, 1.3333, 0.33333]
    >>> x, w = gauss_lobatto(4, 5)
    >>> x
    [-1, -0.44721, 0.44721, 1]
    >>> w
    [0.16667, 0.83333, 0.83333, 0.16667]

    See Also
    ========

    gauss_legendre,gauss_laguerre, gauss_gen_laguerre, gauss_hermite, gauss_chebyshev_t, gauss_chebyshev_u, gauss_jacobi

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Gaussian_quadrature#Gauss.E2.80.93Lobatto_rules
    .. [2] https://web.archive.org/web/20200118141346/http://people.math.sfu.ca/~cbm/aands/page_888.htm
    r   r   Tr   r   r   r   éÿÿÿÿ)r   r   r   r   r   r   r   r   r   r   r   r   Úinsertr   s           r&   Úgauss_lobattorB     s~  € õv 	ˆc‰
Œ
€AÝ�a˜‘c˜1 DÐ)Ñ)Ô)€AØ	
�Š�‰Œ€BØ	€BØ
€AØ�]Š]‰_Œ_ð >ð >ˆÝ�a�Ñ Ô ð 	8Ø—’¥¤ b¨8°A©:Ñ&6Ñ 6Ñ7Ô7ˆAØ
�	Š	�!—#’#�h‘-”-Ñ Ô Ð Ø	�Š�!�Q˜˜!™‘W˜qŸvšv a¨™|œ|¨Q™Ñ.Ñ/×2Ò2°8Ñ<Ô<Ñ=Ô=Ð=Ð=à‡I‚Iˆa�ÑÔÐØ‡I‚Iˆa�L„L€LØ‡H‚HˆQ•�1‘”�q˜!˜A™#‘w‘×"Ò" 8Ñ,Ô,Ñ-Ô-Ð-Ø‡H‚H�a�‰dŒd�A�q˜‘s‘G‰n×Ò Ñ)Ô)Ñ*Ô*Ð*Øˆqˆ5€Lr(   N)Ú
sympy.corer   r   r   Ú(sympy.functions.combinatorial.factorialsr   Ú(sympy.functions.elementary.trigonometricr   r   Ú(sympy.functions.elementary.miscellaneousr	   Ú'sympy.functions.special.gamma_functionsr
   Úsympy.polys.orthopolysr   r   r   r   Úsympy.polys.rootoftoolsr   r'   r,   r.   r2   r8   r:   r>   rB   © r(   r&   ú<module>rK      sb  ðØ #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø >Ð >Ð >Ð >Ð >Ð >Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9ð?ð ?ð ?ð ?ð ?ð ?ð ?ð ?ð ?ð ?ð ?ð ?à *Ð *Ð *Ð *Ð *Ð *ðEð Eð EðPFð Fð FðRIð Ið IðXOð Oð OðdDð Dð DðNBð Bð BðJVð Vð VðrJð Jð Jð Jð Jr(   