o
    §ƒðjk  ã                   @   s  d Z ddlmZ ddl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mZ ddlmZ dd	lmZmZmZmZmZmZmZ d
d„ Zdd„ Zd)dd„Zdd„ Zd*dd„Zd+dd„Z dd„ Z!dd„ Z"dd„ Z#dd „ Z$d!d"„ Z%d#d$„ Z&d,d%d&„Z'd'd(„ Z(dS )-aô  
Algorithms for solving the Risch differential equation.

Given a differential field K of characteristic 0 that is a simple
monomial extension of a base field k and f, g in K, the Risch
Differential Equation problem is to decide if there exist y in K such
that Dy + f*y == g and to find one if there are some.  If t is a
monomial over k and the coefficients of f and g are in k(t), then y is
in k(t), and the outline of the algorithm here is given as:

1. Compute the normal part n of the denominator of y.  The problem is
then reduced to finding y' in k<t>, where y == y'/n.
2. Compute the special part s of the denominator of y.   The problem is
then reduced to finding y'' in k[t], where y == y''/(n*s)
3. Bound the degree of y''.
4. Reduce the equation Dy + f*y == g to a similar equation with f, g in
k[t].
5. Find the solutions in k[t] of bounded degree of the reduced equation.

See Chapter 6 of "Symbolic Integration I: Transcendental Functions" by
Manuel Bronstein.  See also the docstring of risch.py.
é    )Úmul)Úreduce)Úoo)ÚDummy)ÚPolyÚgcdÚZZÚcancel)ÚimÚre)Úsqrt)Úgcdex_diophantineÚfrac_inÚ
derivationÚsplitfactorÚNonElementaryIntegralExceptionÚDecrementLevelÚrecognize_log_derivativec                 C   sÖ   | j rtS |t||ƒkr|  |¡ ¡ d d S g }|}|  |¡}d}|j r<| ||f¡ || }|d9 }|  |¡}|j s%d}td|ƒ}t|ƒdkri| ¡ }	||	d  }
|  |
¡}|j rc||	d 7 }|
}t|ƒdksI|S )aY  
    Computes the order of a at p, with respect to t.

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

    For a, p in k[t], the order of a at p is defined as nu_p(a) = max({n
    in Z+ such that p**n|a}), where a != 0.  If a == 0, nu_p(a) = +oo.

    To compute the order at a rational function, a/b, use the fact that
    nu_p(a/b) == nu_p(a) - nu_p(b).
    r   é   é   )	Úis_zeror   r   Úas_polyÚETÚremÚappendÚlenÚpop)ÚaÚpÚtÚ
power_listÚp1ÚrÚtracks_powerÚnÚproductÚfinalÚproductf© r(   ú•/tmp/claude-1000/-var-www-html-academy/3f42efd1-c2b7-4d08-9b05-30d86bb35479/scratchpad/piper/venv/lib/python3.10/site-packages/sympy/integrals/rde.pyÚorder_at)   s2   

ü

úr*   c                 C   s   | j rtS | |¡|  |¡ S )z¤
    Computes the order of a/d at oo (infinity), with respect to t.

    For f in k(t), the order or f at oo is defined as deg(d) - deg(a), where
    f == a/d.
    )r   r   Údegree)r   Údr   r(   r(   r)   Úorder_at_ooT   s   r-   Nc                    sF  |pt dƒ}t|ˆ ƒ\}}t|| ˆ j¡ƒ}| |¡}| t||ƒ¡‰t| ˆ¡ ˆ j¡ˆ ˆ j¡ˆ ˆ j¡ƒ\}}	ˆt|ˆ jƒt	ˆˆ ƒ   ˆ j¡ 
ˆ ˆ j¡¡}
t|
|ƒ}
|
j |¡sgtdˆ jƒˆ|ffS dd„ |
 ¡ D ƒ}tt‡ ‡‡fdd„|D ƒtdˆ jƒƒ}t	|ˆ ƒ}|ˆ ||  }|| }|j|dd�\}}|||ffS )aˆ  
    Weak normalization.

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

    Given a derivation D on k[t] and f == a/d in k(t), return q in k[t]
    such that f - Dq/q is weakly normalized with respect to t.

    f in k(t) is said to be "weakly normalized" with respect to t if
    residue_p(f) is not a positive integer for any normal irreducible p
    in k[t] such that f is in R_p (Definition 6.1.1).  If f has an
    elementary integral, this is equivalent to no logarithm of
    integral(f) whose argument depends on t has a positive integer
    coefficient, where the arguments of the logarithms not in k(t) are
    in k[t].

    Returns (q, f - Dq/q)
    Úzr   c                 S   s    g | ]}|t v r|d kr|‘qS )r   )r   ©Ú.0Úir(   r(   r)   Ú
<listcomp>†   s     z#weak_normalizer.<locals>.<listcomp>c                    s,   g | ]}t ˆt|ˆ jƒtˆˆ ƒ  ˆƒ‘qS r(   )r   r   r   r   )r0   r$   ©ÚDEr   Úd1r(   r)   r2   ˆ   s   , T©Úinclude)r   r   r   Údiffr   Úquor   r   r   r   Ú	resultantÚexprÚhasÚ
real_rootsr   r   r	   )r   r,   r4   r.   ÚdnÚdsÚgÚ
d_sqf_partÚa1Úbr"   ÚNÚqÚdqÚsnÚsdr(   r3   r)   Úweak_normalizer`   s.   

ÿ"
ÿ

ÿ
rI   c                 C   sÈ   t ||ƒ\}}t ||ƒ\}}| |¡}	| | |j¡¡ |	 |	 |j¡¡¡}
||
 }||
 }| |¡d r7t‚|| }|j|dd�\}}||  |t|
|ƒ |  }|j|dd�\}}|||f||f|
fS )a  
    Normal part of the denominator.

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

    Given a derivation D on k[t] and f, g in k(t) with f weakly
    normalized with respect to t, either raise NonElementaryIntegralException,
    in which case the equation Dy + f*y == g has no solution in k(t), or the
    quadruplet (a, b, c, h) such that a, h in k[t], b, c in k<t>, and for any
    solution y in k(t) of Dy + f*y == g, q = y*h in k<t> satisfies
    a*Dq + b*q == c.

    This constitutes step 1 in the outline given in the rde.py docstring.
    r   Tr6   )	r   r   r8   r   r9   Údivr   r	   r   )ÚfaÚfdÚgaÚgdr4   r>   r?   ÚenÚesr   Úhr   ÚcÚcaÚcdÚbaÚbdr(   r(   r)   Únormal_denom“   s   
&rW   Úautoc                 C   sl  |dkr|j }|dkrt|j|jƒ}n2|dkr#t|jd d |jƒ}n"|dv r?| ¡  |¡}| ¡  |¡}	| ||	td|jƒfS td| ƒ‚t|||jƒt|||jƒ }
t|||jƒt|||jƒ }td|td|
ƒ ƒ}|
�svdd	lm	} |dkrÐ|j
 t|j|jƒ¡}t|ƒ�@ t| d¡ | d¡ |  d¡ |jƒ\}}t||jƒ\}}||||||ƒ}|d
urÀ|\}}}|dkrÀt||ƒ}W d
  ƒ n1 sÊw   Y  n¦|dk�rv|j
 t|jd d |jƒ¡}t|ƒ�… tt| tdƒ¡ | tdƒ¡ |  tdƒ¡ ƒ|jƒ\}}tt| tdƒ¡ | tdƒ¡ |  tdƒ¡ ƒ|jƒ\}}t||jƒ\}}ttd|jƒ| ||ƒ�rf||ttdƒ|jƒ | ||  || |||ƒ}|d
u�rf|\}}}|dk�rft||ƒ}W d
  ƒ n	1 �sqw   Y  td|
 || ƒ}|| }||  }| | }|| |¡ t||jƒ|  t||ƒ |¡ |  }|| |  |¡}	|}|||	|fS )a  
    Special part of the denominator.

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

    case is one of {'exp', 'tan', 'primitive'} for the hyperexponential,
    hypertangent, and primitive cases, respectively.  For the
    hyperexponential (resp. hypertangent) case, given a derivation D on
    k[t] and a in k[t], b, c, in k<t> with Dt/t in k (resp. Dt/(t**2 + 1) in
    k, sqrt(-1) not in k), a != 0, and gcd(a, t) == 1 (resp.
    gcd(a, t**2 + 1) == 1), return the quadruplet (A, B, C, 1/h) such that
    A, B, C, h in k[t] and for any solution q in k<t> of a*Dq + b*q == c,
    r = qh in k[t] satisfies A*Dr + B*r == C.

    For ``case == 'primitive'``, k<t> == k[t], so it returns (a, b, c, 1) in
    this case.

    This constitutes step 2 of the outline given in the rde.py docstring.
    rX   ÚexpÚtanr   r   )Ú	primitiveÚbasez@case must be one of {'exp', 'tan', 'primitive', 'base'}, not %s.r   ©Úparametric_log_derivNéÿÿÿÿ)Úcaser   r   Úto_fieldr9   Ú
ValueErrorr*   ÚminÚprder^   r,   r   r   Úevalr
   r   r   r   Úmaxr   )r   rU   rV   rS   rT   r4   r`   r   ÚBÚCÚnbÚncr$   r^   ÚdcoeffÚalphaaÚalphadÚetaaÚetadÚAÚQÚmr.   ÚbetaaÚbetadrD   ÚpNÚpnrQ   r(   r(   r)   Úspecial_denom¸   sj   ÿ
,

€ø€


<<0



€õ
2rw   Fc              	      s”  |dkrˆ j }|  ˆ j¡}| ˆ j¡}|r!t‡ fdd„|D ƒƒ}n| ˆ j¡}t| ˆ j¡ ¡  ¡  |  ˆ j¡ ¡  ¡  ƒ}	|dkratd|t||d ƒ ƒ}
||d kr_|	jr_td|	|| ƒ}
|
S |dk�rŒ||krrtd|| ƒ}
n	td|| d ƒ}
t	ˆ j
ˆ jˆ jd  ƒ\}}ˆ j}tˆ ƒ�ñ t	|	ˆ jƒ\}}||d krÑddlm} z|||||fgˆ ƒ\\}}}W n	 ty¾   Y n£w t|ƒdkrÉtd	ƒ‚t|
|d ƒ}
nˆ||k�rQdd
lm} |||ˆ ƒ}|du�ri|\}}|dk�rq| t|ˆ ƒ |¡ || |¡   ¡  | ¡ |  ¡   }t	|ˆ jƒ\}}ddlm} z|||||fgˆ ƒ\\}}}W n
 t�y4   Y nEw t|ƒdk�r@td	ƒ‚t|
|d  ¡ ƒ}
W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S 1 �s…w   Y  |
S |dk�rddlm} td|t||ƒ ƒ}
||k�rt	ˆ j
 tˆ jˆ jƒ¡ˆ jˆ jd  ƒ\}}tˆ ƒ�= t	|	ˆ jƒ\}}|||||ˆ ƒ}|du�rí|\} }}| dk�rõt|
|ƒ}
W d  ƒ |
S W d  ƒ |
S W d  ƒ |
S 1 �sw   Y  |
S |dv �rDˆ j
 ˆ j¡}ˆ j
 ¡ }t|	| ƒ}	td|t|| d |ƒ ƒ}
||| d k�rB|	j�rBtd|	|| ƒ}
|
S td| ƒ‚)am  
    Bound on polynomial solutions.

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

    Given a derivation D on k[t] and ``a``, ``b``, ``c`` in k[t] with ``a != 0``, return
    n in ZZ such that deg(q) <= n for any solution q in k[t] of
    a*Dq + b*q == c, when parametric=False, or deg(q) <= n for any solution
    c1, ..., cm in Const(k) and q in k[t] of a*Dq + b*q == Sum(ci*gi, (i, 1, m))
    when parametric=True.

    For ``parametric=False``, ``cQ`` is ``c``, a ``Poly``; for ``parametric=True``, ``cQ`` is Q ==
    [q1, ..., qm], a list of Polys.

    This constitutes step 3 of the outline given in the rde.py docstring.
    rX   c                 3   s   � | ]	}|  ˆ j¡V  qd S ©N)r+   r   r/   ©r4   r(   r)   Ú	<genexpr>(  s   € zbound_degree.<locals>.<genexpr>r\   r   r   r[   )Úlimited_integratezLength of m should be 1©Ú!is_log_deriv_k_t_radical_in_fieldNrY   r]   )rZ   Úother_nonlinearzScase must be one of {'exp', 'tan', 'primitive', 'other_nonlinear', 'base'}, not %s.)r`   r+   r   rf   r	   r   ÚLCÚas_exprÚ
is_Integerr   r,   ÚTÚlevelr   rd   r{   r   r   rb   r}   r   r^   r9   r   )r   rC   ÚcQr4   r`   Ú
parametricÚdaÚdbÚdcÚalphar$   rn   ro   Út1rl   rm   r{   ÚzaÚzdrr   r}   rp   Úaar.   Úbetars   rt   r^   ÚdeltaÚlamr(   ry   r)   Úbound_degree  sæ   ÿN
´
ÿÿ


ÿÿÿ
ÿÿ
ÛCÌ
ñCÊ
óCÆ
÷CÓ
êCÕ
èCÞ
ßC½C
ä
,




øí
ýñ
ùê
ô
ýÿr‘   c                 C   s  t d|jƒ}t d|jƒ}t d|jƒ}	 |jr||d||fS |dk du r%t‚|  |¡}| |¡js2t‚|  |¡| |¡| |¡} }}|  |j¡dkr`| ¡  | ¡}| ¡  | ¡}|||||fS t	|| |ƒ\}	}
|t
| |ƒ7 }|
t
|	|ƒ }||  |j¡8 }|||	 7 }|| 9 }q)aª  
    Rothstein's Special Polynomial Differential Equation algorithm.

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

    Given a derivation D on k[t], an integer n and ``a``,``b``,``c`` in k[t] with
    ``a != 0``, either raise NonElementaryIntegralException, in which case the
    equation a*Dq + b*q == c has no solution of degree at most ``n`` in
    k[t], or return the tuple (B, C, m, alpha, beta) such that B, C,
    alpha, beta in k[t], m in ZZ, and any solution q in k[t] of degree
    at most n of a*Dq + b*q == c must be of the form
    q == alpha*h + beta, where h in k[t], deg(h) <= m, and Dh + B*h == C.

    This constitutes step 4 of the outline given in the rde.py docstring.
    r   r   T)r   r   r   r   r   r   r9   r+   ra   r   r   )r   rC   rR   r$   r4   Úzeror‰   rŽ   r@   r"   r.   r(   r(   r)   Úspdeƒ  s.   
"ér“   c                 C   s¬   t d|jƒ}|jsT| |j¡|  |j¡ }d|  kr |ks#t‚ t‚t | |j¡ ¡ |  |j¡ ¡  |j|  |jdd�}|| }|d }|t||ƒ | |  }|jr	|S )aì  
    Poly Risch Differential Equation - No cancellation: deg(b) large enough.

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

    Given a derivation D on k[t], ``n`` either an integer or +oo, and ``b``,``c``
    in k[t] with ``b != 0`` and either D == d/dt or
    deg(b) > max(0, deg(D) - 1), either raise NonElementaryIntegralException, in
    which case the equation ``Dq + b*q == c`` has no solution of degree at
    most n in k[t], or a solution q in k[t] of this equation with
    ``deg(q) < n``.
    r   F©Úexpandr   )r   r   r   r+   r   r   r   r   ©rC   rR   r$   r4   rE   rr   r   r(   r(   r)   Úno_cancel_b_large²  s   ÿ.ÿ÷r—   c                 C   sV  t d|jƒ}|js©|dkrd}n| |j¡|j |j¡ d }d|  kr*|ks-t‚ t‚|dkrPt | |j¡ ¡ ||j |j¡ ¡   |j|  |jdd�}nC|  |j¡| |j¡kr^t‚|  |j¡dkr}||  |j|j	d  ¡| |j|j	d  ¡fS t | |j¡ ¡ |  |j¡ ¡  |jdd�}|| }|d }|t
||ƒ | |  }|jr	|S )a˜  
    Poly Risch Differential Equation - No cancellation: deg(b) small enough.

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

    Given a derivation D on k[t], ``n`` either an integer or +oo, and ``b``,``c``
    in k[t] with deg(b) < deg(D) - 1 and either D == d/dt or
    deg(D) >= 2, either raise NonElementaryIntegralException, in which case the
    equation Dq + b*q == c has no solution of degree at most n in k[t],
    or a solution q in k[t] of this equation with deg(q) <= n, or the
    tuple (h, b0, c0) such that h in k[t], b0, c0, in k, and for any
    solution q in k[t] of degree at most n of Dq + bq == c, y == q - h
    is a solution in k of Dy + b0*y == c0.
    r   r   Fr”   )r   r   r   r+   r,   r   r   r   r‚   rƒ   r   r–   r(   r(   r)   Úno_cancel_b_smallÐ  s6   ÿ0ÿÿ$ÿér˜   c           
      C   sp  t d|jƒ}t|  |j¡ ¡  |j |j¡ ¡  ƒ}|jr#|jr#|}nd}|js¶t	|| 
|j¡|j 
|j¡ d ƒ}d|  krE|ksHt‚ t‚t||j |j¡ ¡  |  |j¡ ¡  ƒ}|jre|||fS |dkrt | |j¡ ¡ | |j|  |jdd�}	n!| 
|j¡|j 
|j¡d kr�t‚| |j¡ ¡ |  |j¡ ¡  }	||	 }|d }|t|	|ƒ | |	  }|jr(|S )a™  
    Poly Risch Differential Equation - No cancellation: deg(b) == deg(D) - 1

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

    Given a derivation D on k[t] with deg(D) >= 2, n either an integer
    or +oo, and b, c in k[t] with deg(b) == deg(D) - 1, either raise
    NonElementaryIntegralException, in which case the equation Dq + b*q == c has
    no solution of degree at most n in k[t], or a solution q in k[t] of
    this equation with deg(q) <= n, or the tuple (h, m, C) such that h
    in k[t], m in ZZ, and C in k[t], and for any solution q in k[t] of
    degree at most n of Dq + b*q == c, y == q - h is a solution in k[t]
    of degree at most m of Dy + b*y == C.
    r   r_   r   Fr”   )r   r   r	   r   r   r,   r�   Úis_positiver   rf   r+   r   r   )
rC   rR   r$   r4   rE   ÚlcÚMrr   Úur   r(   r(   r)   Úno_cancel_equalÿ  s0   ($ÿ*
, ír�   c                 C   s^  ddl m} t|ƒ�& t| |jƒ\}}||||ƒ}|dur)|\}}|dkr)tdƒ‚W d  ƒ n1 s3w   Y  |jr=|S || |j¡k rGt‚t	d|jƒ}	|js­| |j¡}
||
k r\t‚t|ƒ� t| 
¡ |jƒ\}}t|||||ƒ\}}W d  ƒ n1 sw   Y  t	| ¡ | ¡  |j|
  |jdd�}|	|7 }	|
d }|| | t||ƒ 8 }|jrP|	S )a³  
    Poly Risch Differential Equation - Cancellation: Primitive case.

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

    Given a derivation D on k[t], n either an integer or +oo, ``b`` in k, and
    ``c`` in k[t] with Dt in k and ``b != 0``, either raise
    NonElementaryIntegralException, in which case the equation Dq + b*q == c
    has no solution of degree at most n in k[t], or a solution q in k[t] of
    this equation with deg(q) <= n.
    r   r|   Nz7is_deriv_in_field() is required to  solve this problem.r   Fr”   )rd   r}   r   r   r   ÚNotImplementedErrorr   r+   r   r   r   ÚrischDEr€   r   )rC   rR   r$   r4   r}   rU   rV   rp   r.   rE   rr   Úa2aÚa2dÚsarH   Ústmr(   r(   r)   Úcancel_primitive.  s:   
€ú
þ&ör¤   c                 C   sÊ  ddl m} |j t|j|jƒ¡ ¡ }t|ƒ�1 t||jƒ\}}t| |jƒ\}}	|||	|||ƒ}
|
durA|
\}}}|dkrAt	dƒ‚W d  ƒ n1 sKw   Y  |j
rU|S || |j¡k r_t‚td|jƒ}|j
sã| |j¡}||k rtt‚|  ¡ }t|ƒ�6 t||jƒ\}}|| || t||jƒ  }|| }t| ¡ |jƒ\}}t|||||ƒ\}}W d  ƒ n1 sµw   Y  t| ¡ | ¡  |j|  |jdd�}||7 }|d }|| | t||ƒ 8 }|j
rh|S )a¼  
    Poly Risch Differential Equation - Cancellation: Hyperexponential case.

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

    Given a derivation D on k[t], n either an integer or +oo, ``b`` in k, and
    ``c`` in k[t] with Dt/t in k and ``b != 0``, either raise
    NonElementaryIntegralException, in which case the equation Dq + b*q == c
    has no solution of degree at most n in k[t], or a solution q in k[t] of
    this equation with deg(q) <= n.
    r   r]   Nz6is_deriv_in_field() is required to solve this problem.r   Fr”   )rd   r^   r,   r9   r   r   r€   r   r   rž   r   r+   r   r   rŸ   r   )rC   rR   r$   r4   r^   Úetarn   ro   rU   rV   rp   r   rr   r.   rE   rB   Úa1aÚa1dr    r¡   r¢   rH   r£   r(   r(   r)   Ú
cancel_exp`  sF   

€ù
ø&	îr¨   c                 C   sš  | j s0|jdks|  |j¡td|j |j¡d ƒkr0|r)ddlm} || |||ƒS t| |||ƒS | j sB|  |j¡|j |j¡d k rµ|jdksP|j |j¡dkrµ|r_ddlm	} || |||ƒS t
| |||ƒ}t|tƒrm|S |\}}	}
t|ƒ�3 |	 |j¡|
 |j¡}	}
|	du rŒtdƒ‚|
du r”td	ƒ‚t|	|
||ƒ |j¡}W d  ƒ || S 1 s¬w   Y  || S |j |j¡dk�r|  |j¡|j |j¡d k�r||  |j¡ ¡  |j |j¡ ¡  k�r|  |j¡ ¡ jsñtd
ƒ‚|r÷tdƒ‚t| |||ƒ}t|tƒ�r|S |\}}}t| |||ƒ}|| S | j �rtdƒ‚|jdk�r2|�r+tdƒ‚t| |||ƒS |jdk�rF|�r?tdƒ‚t| |||ƒS td|j ƒ‚)a  
    Solve a Polynomial Risch Differential Equation with degree bound ``n``.

    This constitutes step 4 of the outline given in the rde.py docstring.

    For parametric=False, cQ is c, a Poly; for parametric=True, cQ is Q ==
    [q1, ..., qm], a list of Polys.
    r\   r   r   )Úprde_no_cancel_b_larger   )Úprde_no_cancel_b_smallNzb0 should be a non-Null valuezc0 should be a non-Null valuezResult should be a numberz0prde_no_cancel_b_equal() is not yet implemented.zWRemaining cases for Poly (P)RDE are not yet implemented (is_deriv_in_field() required).rY   zIParametric RDE cancellation hyperexponential case is not yet implemented.r[   zBParametric RDE cancellation primitive case is not yet implemented.zBOther Poly (P)RDE cancellation cases are not yet implemented (%s).)r   r`   r+   r   rf   r,   rd   r©   r—   rª   r˜   Ú
isinstancer   r   r   rb   Úsolve_poly_rder   Ú	is_numberÚ	TypeErrorrž   r�   r¨   r¤   )rC   r„   r$   r4   r…   r©   rª   ÚRrQ   Úb0Úc0Úyrr   rh   r(   r(   r)   r¬   œ  sf   
$$



úù4*
ÿr¬   c                 C   sÀ   t | ||ƒ\}\} }t| ||||ƒ\}\}}\}	}
}t||||	|
|ƒ\}}}}z	t||||ƒ}W n ty;   t}Y nw t|||||ƒ\}}}}}|jrO|}nt||||ƒ}|| | || fS )a  
    Solve a Risch Differential Equation: Dy + f*y == g.

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

    See the outline in the docstring of rde.py for more information
    about the procedure used.  Either raise NonElementaryIntegralException, in
    which case there is no solution y in the given differential field,
    or return y in k(t) satisfying Dy + f*y == g, or raise
    NotImplementedError, in which case, the algorithms necessary to
    solve the given Risch Differential Equation have not yet been
    implemented.
    )	rI   rW   rw   r‘   rž   r   r“   r   r¬   )rK   rL   rM   rN   r4   Ú_r   rU   rV   rS   rT   Úhnrp   rg   rh   Úhsr$   rr   r‰   rŽ   r²   r(   r(   r)   rŸ   ù  s    ûrŸ   rx   )rX   )rX   F)F))Ú__doc__Úoperatorr   Ú	functoolsr   Ú
sympy.corer   Úsympy.core.symbolr   Úsympy.polysr   r   r   r	   Ú$sympy.functions.elementary.complexesr
   r   Ú(sympy.functions.elementary.miscellaneousr   Úsympy.integrals.rischr   r   r   r   r   r   r   r*   r-   rI   rW   rw   r‘   r“   r—   r˜   r�   r¤   r¨   r¬   rŸ   r(   r(   r(   r)   Ú<module>   s.    $+
3
%
Tw///2
<]