§
    PŠtj™  ã                   ól  — d Z ddlmZ ddlmZmZmZmZ ddlm	Z	 ddl
mZmZmZ ddlmZ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 ddlmZmZ ddl m!Z!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z- ddl.m/Z/ dZ0d„ Z1d„ Z2d$d„Z3d%d„Z4d%d„Z5d%d„Z6d%d„Z7d%d„Z8d%d„Z9d%d „Z:d%d!„Z;d%d"„Z<d#„ Z=dS )&a  
This module contains the implementation of the internal helper functions for the lie_group hint for
dsolve. These helper functions apply different heuristics on the given equation
and return the solution. These functions are used by :py:meth:`sympy.solvers.ode.single.LieGroup`

References
=========

- `abaco1_simple`, `function_sum` and `chi`  are referenced from E.S Cheb-Terrab, L.G.S Duarte
and L.A,C.P da Mota, Computer Algebra Solving of First Order ODEs Using
Symmetry Methods, pp. 7 - pp. 8

- `abaco1_product`, `abaco2_similar`, `abaco2_unique_unknown`, `linear`  and `abaco2_unique_general`
are referenced from E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
ODE Patterns, pp. 7 - pp. 12

- `bivariate` from Lie Groups and Differential Equations pp. 327 - pp. 329

é    )Úislice)ÚAddÚSÚMulÚPow)Úfactor_terms)ÚFunctionÚAppliedUndefÚexpand)ÚEqualityÚEq)ÚSymbolÚWildÚDummyÚsymbols)ÚexpÚlog)Ú	integrate)ÚPoly)ÚcancelÚdiv)ÚcollectÚpowsimpÚseparatevarsÚsimplify)Úsolve)Úpdsolve)Únumbered_symbols)Ú_preprocessÚ	ode_orderé   )Úcheckinfsol)	Úabaco1_simpleÚabaco1_productÚabaco2_similarÚabaco2_unique_unknownÚabaco2_unique_generalÚlinearÚfunction_sumÚ	bivariateÚchic                 ó¬  ‡‡‡— t          d¦  «        }t          d¦  «        }|j        Š|j        d         Š|d         Š|d         }g }|s'	 t          | ||d|¬¦  «        }n# t          $ r Y d S w xY w|D �]M}	|	 |‰|¦  «                                      |‰¦  «        }
|	 |‰|¦  «                                      |‰¦  «        }t          ||
z  ¦  «        |k    rŒf ‰‰‰¦  «                             ‰¦  «        |
z   ‰‰‰¦  «                             ‰¦  «        |z  z   }t          | ‰‰‰¦  «        ¬¦  «        j	        }t          |dz
   ‰‰‰¦  «        ¬¦  «        j	        }d	„ ||fD ¦   «         }t          d
¦  «        }t          d¦  «        }t          d¦  «        }|d         }|d         }	 t          ||z
  ||z
  g‰‰d¬¦  «        }|g k    r�Œ]	 |d         }|‰         }|‰         }t          |                     ‰¦  «        |                     ‰¦  «        |z  z   ¦  «        }t          |                     ‰¦  «        |                     ‰¦  «        |z  z   ¦  «        }|rä|rât          ||z                       ‰|f‰|fg¦  «        ¦  «        }t          |||gd¬¦  «        }|rŸt          d||         z  |¦  «        |z   t          |d         ||         z  |¦  «        z
  }|                     ||f||fg¦  «        }	 t          |‰¦  «        }ˆˆfd„|D ¦   «         c S # t          $ r |                     |¦  «         Y �ŒÌw xY w�ŒÒ|r3t#           ‰‰¦  «        t          ||z
  ‰¦  «        d         ¦  «        gc S |r3t#           ‰‰¦  «        t          ||z
  ‰¦  «        d         ¦  «        gc S �Œ># t          $ r Y �ŒKw xY w|rˆˆˆfd„|D ¦   «         S d S )NÚxiÚetar   ÚyÚhr!   )ÚhintÚfuncÚorderÚmatch)r2   c                 ó,   — g | ]}t          |¦  «        ‘ŒS © )Ú_lie_group_remove)Ú.0Úcoords     úY/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/solvers/ode/lie_group.pyú
<listcomp>z0_ode_lie_group_try_heuristic.<locals>.<listcomp>P   s!   € ÐAÐAÐA°Õ% eÑ,Ô,ÐAÐAÐAó    ÚrÚsÚC1éÿÿÿÿT)Údict)r   rA   Úcoeffc                 óB   •— g | ]}t           ‰‰¦  «        |¦  «        ‘ŒS r6   )r   )r8   ÚsolÚfÚxs     €€r:   r;   z0_ode_lie_group_try_heuristic.<locals>.<listcomp>o   s)   ø€ Ð>Ð>Ð>°#¥ 1 1 Q¡4¤4¨¡¤Ð>Ð>Ð>r<   c           
      ój   •— g | ]/}t          |                     ‰ ‰‰¦  «        ¦  «        d ¦  «        ‘Œ0S )r   )r   Úsubs)r8   rD   rE   rF   r/   s     €€€r:   r;   z0_ode_lie_group_try_heuristic.<locals>.<listcomp>z   s9   ø€ Ð<Ð<Ð<¨S•�3—8’8˜A˜q˜q ™tœtÑ$Ô$ aÑ(Ô(Ð<Ð<Ð<r<   )r	   r2   ÚargsÚinfinitesimalsÚ
ValueErrorrH   r   Údiffr   Úrhsr   r   r   r   r   ÚNotImplementedErrorÚappendr   )ÚeqÚ	heuristicr2   r4   Úinfr-   r.   r0   ÚtempsolÚinfsimÚxiinfÚetainfÚrpder=   r>   Únewcoordr?   ÚrcoordÚscoordrD   ÚxsubÚysubÚnumÚdenomÚdiffeqÚsepÚdeqÚsdeqrE   rF   r/   s                               @@@r:   Ú_ode_lie_group_try_heuristicrc   6   sj  øøø€ å	�$‰Œ€BÝ
�5‰/Œ/€CØŒ	€AØŒ	�!Œ€AØˆcŒ
€AØˆcŒ
€AØ€GØð ð	Ý  ¨)¸$ÀaÈuÐUÑUÔUˆCˆCøÝð 	ð 	ð 	Ø�4�4ð	øøøàð 2<ñ 2<ˆØ˜˜˜1˜d™œÔ$×*Ò*¨4°Ñ3Ô3ˆØ˜˜˜Q ™œÔ&×,Ò,¨T°1Ñ5Ô5ˆõ
 �F˜5‘LÑ!Ô! QÒ&Ð&ØØˆq��A‰wŒw�|Š|˜A‰Œ˜uÑ$ q q¨¨A¡w¤w§|¢|°A¡¤°vÑ'=Ñ=ˆÝ�D˜q˜q  A™wœwÐ'Ñ'Ô'Ô+ˆÝ�D˜1‘H 1 1 Q¨¡7¤7Ð+Ñ+Ô+Ô/ˆØAÐA¸1¸a¸&ÐAÑAÔAˆÝ�#‰JŒJˆÝ�#‰JŒJˆÝ�D‰\Œ\ˆØ˜!”ˆØ˜"”ˆð 	<Ý˜˜V™ Q¨¡ZÐ0°!°Q¸TÐBÑBÔBˆCØ�bŠyˆyÙð ð
 �a”&ˆCØ�q”6ˆDØ�q”6ˆDÝ˜6Ÿ;š; q™>œ>¨F¯KªK¸©N¬N¸1Ñ,<Ñ<Ñ=Ô=ˆCÝ˜VŸ[š[¨™^œ^¨f¯kªk¸!©n¬n¸QÑ.>Ñ>Ñ?Ô?ˆEØð <�uð <Ý! 3 u¡9×"2Ò"2°Q¸°IÀÀ4¸yÐ3IÑ"JÔ"JÑKÔK�Ý" 6°A°q°6ÀÐEÑEÔE�Øð 
?å# Q s¨1¤v¡X°Ñ2Ô2°RÑ7½)ÀCÈÄLÐQTÐUVÔQWÑDWÐYZÑ:[Ô:[Ñ[�CàŸ(š( Q¨ K°!°V°Ð#=Ñ>Ô>�Cð?Ý$ S¨!™}œ}˜ð  ?Ð>Ð>Ð>Ð>¸Ð>Ñ>Ô>Ð>Ð>Ð>øõ /ð ,ð ,ð ,ØŸš sÑ+Ô+Ð+Ð+Ñ+ð,øøøñ
?ð ð <Ý˜1˜1˜Q™4œ4¥ v°¡{°AÑ!6Ô!6°qÔ!9Ñ:Ô:Ð;Ð;Ð;Ð;àð <Ý˜1˜1˜Q™4œ4¥ v°¡{°AÑ!6Ô!6°qÔ!9Ñ:Ô:Ð;Ð;Ð;Ð;ñ<øõ7 #ð 	ð 	ð 	Ø‰Hð	øøøð> ð =Ø<Ð<Ð<Ð<Ð<Ð<°GÐ<Ñ<Ô<Ð<Øˆ4s6   ÁA  Á 
A.Á-A.Æ-!N1Ë<LÌM Ì?M Î1
N?Î>N?c                 ó&  — t           }i }|j        }|j        d         }|                     |¦  «        }t	          d¦  «        }	t	          d¦  «        }
|d         }|d         }|                     dd ¦  «        }|r,t          ||d                  ||d                  z  ¦  «         }n%t          d¦  «        }|                      ||¦  «        }|�’|�� |	| ||¦  «        ¦  «        t          |¦  «         |
| ||¦  «        ¦  «        t          |¦  «        ig}t          t          || ¦  «        | ||¦  «        d¬¦  «        d         d         rd	gt          |¦  «        z   }||d
œ}d }|D ])}t          t          || ¦  «        ||||¦  «        }|r|c S Œ*|S )Nr   r-   r.   r/   ÚdÚer!   )r2   r3   Úuser_defined)r0   r/   )Úlie_heuristicsr2   rI   rL   r	   Úpopr   r   rH   r   r"   r   Úlistrc   )r>   r2   r3   r4   Ú
heuristicsrR   rE   rF   Údfr-   r.   ÚxisÚetasr/   r0   rD   rQ   s                    r:   Ú_ode_lie_groupro   ~   s£  € å€JØ
€CØŒ	€AØŒ	�!Œ€AØ	�Š�1‰Œ€BÝ	�$‰Œ€BÝ
�5‰/Œ/€CØ
�Œ+€CØ�Œ<€DØ�	Š	�#�tÑÔ€AØð Ý�e˜E #œJÔ'¨¨e°C¬jÔ(9Ñ9Ñ:Ô:Ð:ˆˆå�#‰JŒJˆØ�FŠF�4˜‰OŒOˆà
€˜4Ð+Ø��1�a�a˜‘d”d‘”�Q˜s™VœV S S¨¨A¨A¨a©D¬D¡\¤\µ1°T±7´7Ð;Ð<ˆå•r˜"˜a‘y”y #¨A¨A¨a©D¬D¸Ð:Ñ:Ô:¸1Ô=¸aÔ@ð 	=Ø(Ð)­D°Ñ,<Ô,<Ñ<ˆJà˜!ÐÐ€Eð €CØð ð ˆ	Ý*­2¨b°!©9¬9°iÀÀuÈcÑRÔRˆØð 	ØˆJˆJˆJð	à€Jr<   NÚdefaultc                 ó  ‡— t          | t          ¦  «        r| j        | j        z
  } |st	          | ¦  «        \  } }|j        }t          |¦  «        dk    rt          d¦  «        ‚|d         }|st          | |¦  «        }|dk    rt          d¦  «        ‚| 
                    |¦  «        }t          d|g¬¦  «        }t          d|g¬¦  «        }	|r|d         }
|d	         }n´t          t          | ¦  «        |¦  «                             ||z  |	z   ¦  «        }|r t          ||	         ||         z  ¦  «         }
n7	 t!          | |¦  «        }|d         }
n# t          $ r t          d
¦  «        ‚w xY wt#          d	¦  «        }|
                     ||¦  «        }
t#          d¦  «        }|
 
                    |¦  «        }|
 
                    |¦  «        }d|
z                       ||f||fg¦  «                             ||¦  «        }|
|||||dœ}|dk    rfg Št&          D ]I}t)          ¦   «         d|z            } ||d¬¦  «        }|r!‰                     ˆfd„|D ¦   «         ¦  «         ŒJ‰r‰S t          d¦  «        ‚|dk    rCt&          D ],}t)          ¦   «         d|z            } ||d¬¦  «        Š‰r‰c S Œ-t          d¦  «        ‚|t&          vrt          d|z   ¦  «        ‚t)          ¦   «         d|z            } ||d¬¦  «        Š‰r‰S t          d¦  «        ‚)a}  
    The infinitesimal functions of an ordinary differential equation, `\xi(x,y)`
    and `\eta(x,y)`, are the infinitesimals of the Lie group of point transformations
    for which the differential equation is invariant. So, the ODE `y'=f(x,y)`
    would admit a Lie group `x^*=X(x,y;\varepsilon)=x+\varepsilon\xi(x,y)`,
    `y^*=Y(x,y;\varepsilon)=y+\varepsilon\eta(x,y)` such that `(y^*)'=f(x^*, y^*)`.
    A change of coordinates, to `r(x,y)` and `s(x,y)`, can be performed so this Lie group
    becomes the translation group, `r^*=r` and `s^*=s+\varepsilon`.
    They are tangents to the coordinate curves of the new system.

    Consider the transformation `(x, y) \to (X, Y)` such that the
    differential equation remains invariant. `\xi` and `\eta` are the tangents to
    the transformed coordinates `X` and `Y`, at `\varepsilon=0`.

    .. math:: \left(\frac{\partial X(x,y;\varepsilon)}{\partial\varepsilon
                }\right)|_{\varepsilon=0} = \xi,
              \left(\frac{\partial Y(x,y;\varepsilon)}{\partial\varepsilon
                }\right)|_{\varepsilon=0} = \eta,

    The infinitesimals can be found by solving the following PDE:

        >>> from sympy import Function, Eq, pprint
        >>> from sympy.abc import x, y
        >>> xi, eta, h = map(Function, ['xi', 'eta', 'h'])
        >>> h = h(x, y)  # dy/dx = h
        >>> eta = eta(x, y)
        >>> xi = xi(x, y)
        >>> genform = Eq(eta.diff(x) + (eta.diff(y) - xi.diff(x))*h
        ... - (xi.diff(y))*h**2 - xi*(h.diff(x)) - eta*(h.diff(y)), 0)
        >>> pprint(genform)
        /d               d           \                     d              2       d                       d             d
        |--(eta(x, y)) - --(xi(x, y))|*h(x, y) - eta(x, y)*--(h(x, y)) - h (x, y)*--(xi(x, y)) - xi(x, y)*--(h(x, y)) + --(eta(x, y)) = 0
        \dy              dx          /                     dy                     dy                      dx            dx

    Solving the above mentioned PDE is not trivial, and can be solved only by
    making intelligent assumptions for `\xi` and `\eta` (heuristics). Once an
    infinitesimal is found, the attempt to find more heuristics stops. This is done to
    optimise the speed of solving the differential equation. If a list of all the
    infinitesimals is needed, ``hint`` should be flagged as ``all``, which gives
    the complete list of infinitesimals. If the infinitesimals for a particular
    heuristic needs to be found, it can be passed as a flag to ``hint``.

    Examples
    ========

    >>> from sympy import Function
    >>> from sympy.solvers.ode.lie_group import infinitesimals
    >>> from sympy.abc import x
    >>> f = Function('f')
    >>> eq = f(x).diff(x) - x**2*f(x)
    >>> infinitesimals(eq)
    [{eta(x, f(x)): exp(x**3/3), xi(x, f(x)): 0}]

    References
    ==========

    - Solving differential equations by Symmetry Groups,
      John Starrett, pp. 1 - pp. 14

    r!   z(ODE's have only one independent variabler   z?Infinitesimals for only first order ODE's have been implementedÚa©ÚexcludeÚbr0   r/   z9Infinitesimals for the first order ODE could not be foundÚu)r0   r2   ÚhxÚhyr/   ÚhinvÚallÚlie_heuristic_T)Úcompc                 ó   •— g | ]}|‰v¯|‘Œ	S r6   r6   )r8   rR   Úxietas     €r:   r;   z"infinitesimals.<locals>.<listcomp>  s#   ø€ Ð%QÐ%QÐ%Q¨cÀÈ5Ð@PÐ@P cÐ@PÐ@PÐ@Pr<   z3Infinitesimals could not be found for the given ODErp   FzHeuristic not recognized: z;Infinitesimals could not be found using the given heuristic)Ú
isinstancer   ÚlhsrM   r   rI   ÚlenrK   r    rN   rL   r   r   r   r4   r   r   r   rH   rh   ÚglobalsÚextend)rP   r2   r3   r1   r4   Ú	variablesrF   rl   rr   ru   r0   r/   rD   rv   rw   rx   ry   rQ   ÚfunctionÚinflistr~   s                       @r:   rJ   rJ   ¢   s±  ø€ õ| �"•hÑÔð ØŒV�b”f‰_ˆØð #Ý˜r‘?”?‰ˆˆDØ”	€IÝ
ˆ9�~„~˜ÒÐÝÐCÑDÔDÐDà�aŒLˆØð 	(Ý˜b $Ñ'Ô'ˆEØ�AŠ:ˆ:Ý%ð ':ñ ;ô ;ð ;ð —’˜1‘”ˆBå�S R DÐ)Ñ)Ô)ˆAÝ�S R DÐ)Ñ)Ô)ˆAØð $Ø˜#”J�Ø˜#”J��å¥ r¡
¤
¨BÑ/Ô/×5Ò5°a¸±d¸Q±hÑ?Ô?�Øð 	#Ý! %¨¤(¨5°¬8Ñ"3Ñ4Ô4Ð4�A�Að#Ý# B¨™mœm˜ð
   œF˜˜øõ	 /ð Bð Bð BÝ1ð 3Añ Bô Bð BðBøøøõ
 ˜#‘J”J�Ø—F’F˜4 ‘O”O�å�c‘
”
ˆAØ—’˜‘”ˆBØ—’˜‘”ˆBØ�q‘S—J’J  A ¨¨A¨Ð/Ñ0Ô0×6Ò6°q¸!Ñ<Ô<ˆDØ T°¸2ÀAÈtÐTÐTˆEØ�uŠ}ˆ}Ø�Ý!/ð Sð S�IÝ&™yœyÐ)9¸IÑ)EÔF�HØ&˜h u°4Ð8Ñ8Ô8�GØð SØŸšÐ%QÐ%QÐ%QÐ%Q°WÐ%QÑ%QÔ%QÑRÔRÐRøØð )Ø �Lå-ð /(ñ )ô )ð )ð ˜Ò"Ð"Ý!/ð %ð %�IÝ&™yœyÐ)9¸IÑ)EÔF�HØ$˜H U°Ð7Ñ7Ô7�EØð %Ø$˜˜˜ð%õ *ð +%ñ &ô &ð &ð �^Ð+Ð+Ý Ð!=ÀÑ!DÑEÔEÐEõ #™9œ9Ð%5¸Ñ%<Ô=�Ø ˜ ¨TÐ2Ñ2Ô2�Øð -Ø �Lå$ð &,ñ -ô -ð -s   Ä7E ÅE*Fc                 ó¨  — g }| d         }| d         }| d         }|j         d         }| d         }| d         } t          d¦  «        ||¦  «        }	 t          d¦  «        ||¦  «        }
|j        }||vr_	 t          t	          ||¦  «        ¦  «        }|	t
          j        |
|i}|s|gS |r||vr|                     |¦  «         n# t          $ r Y nw xY w||z  }|j        }||vrs	 t          t	          ||¦  «        ¦  «        }|	t
          j        |
| 	                    ||¦  «        i}|s|gS |r||vr|                     |¦  «         n# t          $ r Y nw xY w| |z  }|j        }||vr_	 t          t	          ||¦  «        ¦  «        }|	||
t
          j        i}|s|gS |r||vr|                     |¦  «         n# t          $ r Y nw xY w| |d	z  z  }|j        }||vrs	 t          t	          ||¦  «        ¦  «        }|	| 	                    ||¦  «        |
t
          j        i}|s|gS |r||vr|                     |¦  «         n# t          $ r Y nw xY w|r|S d
S )aD  
    The first heuristic uses the following four sets of
    assumptions on `\xi` and `\eta`

    .. math:: \xi = 0, \eta = f(x)

    .. math:: \xi = 0, \eta = f(y)

    .. math:: \xi = f(x), \eta = 0

    .. math:: \xi = f(y), \eta = 0

    The success of this heuristic is determined by algebraic factorisation.
    For the first assumption `\xi = 0` and `\eta` to be a function of `x`, the PDE

    .. math:: \frac{\partial \eta}{\partial x} + (\frac{\partial \eta}{\partial y}
                - \frac{\partial \xi}{\partial x})*h
                - \frac{\partial \xi}{\partial y}*h^{2}
                - \xi*\frac{\partial h}{\partial x} - \eta*\frac{\partial h}{\partial y} = 0

    reduces to `f'(x) - f\frac{\partial h}{\partial y} = 0`
    If `\frac{\partial h}{\partial y}` is a function of `x`, then this can usually
    be integrated easily. A similar idea is applied to the other 3 assumptions as well.


    References
    ==========

    - E.S Cheb-Terrab, L.G.S Duarte and L.A,C.P da Mota, Computer Algebra
      Solving of First Order ODEs Using Symmetry Methods, pp. 8


    r/   r0   r2   r   rw   rx   r-   r.   é   N)
rI   r	   Úfree_symbolsr   r   r   ÚZerorO   rN   rH   )r4   r|   r~   r/   r0   r2   rF   rw   rx   r-   r.   ÚhysymÚfxrR   ÚfactorÚfacsymÚfys                    r:   Úlie_heuristic_abaco1_simpler�   .  s!  € ðF €EØˆcŒ
€AØˆcŒ
€AØ�Œ=€DØŒ	�!Œ€AØ	ˆtŒ€BØ	ˆtŒ€BØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€CàŒO€EØ�€~€~ð		"Ý•Y˜r 1Ñ%Ô%Ñ&Ô&ˆBð •q”v˜s BÐ'ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!øøõ #ð 	ð 	ð 	ØˆDð	øøøð �‰T€FØÔ €FØ�€€ð		"Ý•Y˜v qÑ)Ô)Ñ*Ô*ˆBð •q”v˜s B§G¢G¨A¨tÑ$4Ô$4Ð5ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!øøõ #ð 	ð 	ð 	ØˆDð	øøøð ˆS�‰U€FØÔ €FØ�€€ð		"Ý•Y˜v qÑ)Ô)Ñ*Ô*ˆBð �r˜3¥¤Ð'ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!øøõ #ð 	ð 	ð 	ØˆDð	øøøð ˆS�!�Q‘$‰Z€FØÔ €FØ�€€ð		"Ý•Y˜v qÑ)Ô)Ñ*Ô*ˆBð �r—w’w˜q $Ñ'Ô'¨­a¬fÐ5ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!øøõ #ð 	ð 	ð 	ØˆDð	øøøð ð Øˆðð sH   Á6C Ã
CÃCÃ%E Å
EÅEÅ)F7 Æ7
GÇGÇH> È>
IÉ
Ic                 ó4  — g }| d         }| d         }| d         }| d         }|j         d         } t          d¦  «        ||¦  «        } t          d¦  «        ||¦  «        }	t          t          |¦  «                             |¦  «                             |¦  «        |dz  z  d	||g¬
¦  «        }
|
rª|
d         r¢|
|         }t          |d||z  z                       |¦  «        z  ¦  «        }|j        }||vrdt          t          ||¦  «        ¦  «        }|	t          j
        |||z                       ||¦  «        i}
|s|
gS |r|
|vr|                     |
¦  «         t          d¦  «        }t          t          |¦  «                             |¦  «                             |¦  «        |dz  z  d	||g¬
¦  «        }
|
rÛ|
d         rÓ|
|         }t          |d||z  z                       |¦  «        z  ¦  «        }|j        }||vr•t          t          ||¦  «        ¦  «        }||z  }|                     ||f||fg¦  «                             ||¦  «        }|	|                     ||¦  «        |t          j
        i}
|s|
gS |r|
|vr|                     |
¦  «         |r|S dS )aû  
    The second heuristic uses the following two assumptions on `\xi` and `\eta`

    .. math:: \eta = 0, \xi = f(x)*g(y)

    .. math:: \eta = f(x)*g(y), \xi = 0

    The first assumption of this heuristic holds good if
    `\frac{1}{h^{2}}\frac{\partial^2}{\partial x \partial y}\log(h)` is
    separable in `x` and `y`, then the separated factors containing `x`
    is `f(x)`, and `g(y)` is obtained by

    .. math:: e^{\int f\frac{\partial}{\partial x}\left(\frac{1}{f*h}\right)\,dy}

    provided `f\frac{\partial}{\partial x}\left(\frac{1}{f*h}\right)` is a function
    of `y` only.

    The second assumption holds good if `\frac{dy}{dx} = h(x, y)` is rewritten as
    `\frac{dy}{dx} = \frac{1}{h(y, x)}` and the same properties of the first assumption
    satisfies. After obtaining `f(x)` and `g(y)`, the coordinates are again
    interchanged, to get `\eta` as `f(x)*g(y)`


    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 7 - pp. 8

    r/   r0   ry   r2   r   r-   r.   rˆ   T©rA   r   rB   r!   Úu1N)rI   r	   r   r   rL   r   r‰   r   r   r   rŠ   rH   rO   r   )r4   r|   r~   r/   r0   ry   r2   rF   r-   r.   rR   rŒ   ÚgyÚgysymsr“   Úetavals                   r:   Úlie_heuristic_abaco1_productr—   •  s¾  € ð> €EØˆcŒ
€AØˆcŒ
€AØ�Œ=€DØ�Œ=€DØŒ	�!Œ€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cõ �˜Q™œŸš Q™œ×-Ò-¨aÑ0Ô0°!°Q±$Ñ6¸TÈAÈqÈ6Ð
RÑ
RÔ
R€CØ
ð 
"ˆs�7Œ|ð 
"Ø�ŒVˆÝ�b˜1˜b ™d™8Ÿ/š/¨!Ñ,Ô,Ñ-Ñ.Ô.ˆØ”ˆØ�Fˆ?ˆ?Ý•Y˜r 1Ñ%Ô%Ñ&Ô&ˆBØ�œ  R¨¡U§L¢L°°DÑ$9Ô$9Ð:ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!å	ˆt‰Œ€BÝ
�˜T™œŸš¨Ñ*Ô*×0Ò0°Ñ3Ô3°T¸1±WÑ<À4ÐRSÐUVÐQWÐ
XÑ
XÔ
X€CØ
ð "ˆs�7Œ|ð "Ø�ŒVˆÝ�b˜1˜b ™g™;×,Ò,¨QÑ/Ô/Ñ0Ñ1Ô1ˆØ”ˆØ�Fˆ?ˆ?Ý•Y˜r 1Ñ%Ô%Ñ&Ô&ˆBØ˜‘UˆFØ—k’k A r 7¨Q°¨FÐ"3Ñ4Ô4×:Ò:¸2¸qÑAÔAˆFØ˜Ÿš A tÑ,Ô,¨bµ!´&Ð9ˆCØð Ø�u�Øð "˜ 5Ð(Ð(Ø—’˜SÑ!Ô!Ð!àð Øˆðð r<   c           	      ó¶  ‡‡‡ — | d         }| d         }| d         }| d         }|j         d         Š| d         Š  t          d¦  «        ‰|¦  «        } t          d¦  «        ‰|¦  «        }|                     ¦   «         �rWt          d	¦  «        \  }}	}
}}}||	|z
  |z  z   ||d
z  z  z
  ||z  z
  |
|z  z
  }t	          |¦  «                             ¦   «         \  }}t          |‰‰ ¦  «                             ¦   «         } t          d¦  «        ‰‰ ¦  «        } t          d¦  «        ‰‰ ¦  «        }|                     ‰¦  «        |                     ‰ ¦  «        |                     ‰¦  «        z
  |z  z   |                     ‰ ¦  «        |d
z  z  z
  ||z  z
  ||z  z
  }t          d¦  «        }t          d¦  «        }t          |dz   ¦  «        D �]Š‰rT|t          ˆˆˆ fd„t          ‰dz   ¦  «        D ¦   «         Ž z  }|t          ˆˆˆ fd„t          ‰dz   ¦  «        D ¦   «         Ž z  }|                     ||||i¦  «                             ¦   «                              ¦   «         \  }}t          |¦  «        }|                     ‰‰ ¦  «        r*|j        r#t          |‰‰ ¦  «                             ¦   «         }|�r|j                             |j        ¦  «        ‰‰ hz
  }t)          |                     ¦   «         g|¢R Ž }t-          |t.          ¦  «        r|d         }t1          |                     ¦   «         ¦  «        rž|                     |¦  «        }|                     |¦  «        }t2                               |d¦  «        }||                     |¦  «                             ‰ |¦  «        ||                     |¦  «                             ‰ |¦  «        i}|gc S �ŒdS dS )aÔ  
    The third heuristic assumes the infinitesimals `\xi` and `\eta`
    to be bi-variate polynomials in `x` and `y`. The assumption made here
    for the logic below is that `h` is a rational function in `x` and `y`
    though that may not be necessary for the infinitesimals to be
    bivariate polynomials. The coefficients of the infinitesimals
    are found out by substituting them in the PDE and grouping similar terms
    that are polynomials and since they form a linear system, solve and check
    for non trivial solutions. The degree of the assumed bivariates
    are increased till a certain maximum value.

    References
    ==========
    - Lie Groups and Differential Equations
      pp. 327 - pp. 329

    r0   rw   rx   r2   r   r/   r-   r.   zetax etay etad xix xiy xidrˆ   ÚdetaÚdxiÚxi0Úeta0r!   c           	      ó˜   •— g | ]F}t          d t          |¦  «        z   dz   t          ‰|z
  ¦  «        z   ¦  «        ‰|z  z  ‰‰|z
  z  z  ‘ŒGS )Úxi_Ú_©r   Ústr©r8   ÚpowerÚirF   r/   s     €€€r:   r;   z+lie_heuristic_bivariate.<locals>.<listcomp>
  si   ø€ ð /ð /ð /àõ ˜5¥3 u¡:¤:Ñ-°Ñ3µc¸!¸e¹)±n´nÑDÑEÔEÀaÈÁhÑNÈqÐSTÐW\ÑS\É~Ñ]ð/ð /ð /r<   c           	      ó˜   •— g | ]F}t          d t          |¦  «        z   dz   t          ‰|z
  ¦  «        z   ¦  «        ‰|z  z  ‰‰|z
  z  z  ‘ŒGS )Úeta_rŸ   r    r¢   s     €€€r:   r;   z+lie_heuristic_bivariate.<locals>.<listcomp>  sk   ø€ ð /ð /ð /àõ ˜6¥C¨¡J¤JÑ.°Ñ4µs¸1¸u¹9±~´~ÑEÑFÔFÀqÈ%ÁxÑOÐPQÐTUÐX]ÑT]ÑP^Ñ^ð/ð /ð /r<   N)rI   r	   Úis_rational_functionr   r   Úas_numer_denomr   Útotal_degreerL   r   Úranger   rH   Údoitr   Úis_polynomialÚis_AddÚas_dictr‰   Úunionr   Úvaluesr   rj   ÚanyrA   Úfromkeys)!r4   r|   r0   rw   rx   r2   r-   r.   ÚetaxÚetayÚetadÚxixÚxiyÚxidÚipder]   r^   Údegr™   rš   ÚxieqÚetaeqÚpdenÚpolyyÚsymsetÚsoldictÚxiredÚetaredÚdict_rR   r¤   rF   r/   s!                                 @@@r:   Úlie_heuristic_bivariaterÄ   Þ  s  øøø€ ð& 	ˆcŒ
€AØ	ˆtŒ€BØ	ˆtŒ€BØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà×ÒÑÔñ *!õ +2Ð2NÑ*OÔ*OÑ'ˆˆd�D˜#˜s CØ�t˜c‘z 1‘nÑ$ s¨1¨a©4¡xÑ/°#°b±&Ñ8¸4À¹7ÑBˆÝ˜D‘\”\×0Ò0Ñ2Ô2‰
ˆˆUÝ�3˜˜1‰oŒo×*Ò*Ñ,Ô,ˆØ�x˜ÑÔ  1Ñ%Ô%ˆØ�h�u‰oŒo˜a Ñ#Ô#ˆØ—	’	˜!‘” §	¢	¨!¡¤¨s¯xªx¸©{¬{Ñ :¸AÑ=Ñ=ÀÇÂÈ!ÁÄÈaÐQRÉdÑ@RÑRØ�"‰fñØ˜B‘wñˆå�e‰}Œ}ˆÝ�v‘”ˆå�s˜Q‘w‘”ð 	!ñ 	!ˆAØð 0Ø�ð /ð /ð /ð /ð /ð /å!& q¨1¡u¡¤ð/ñ /ô /ð 0ñ 0�ð �ð /ð /ð /ð /ð /ð /å!& q¨1¡u¡¤ð/ñ /ô /ð 0ñ 0�ð  Ÿ9š9 c¨4°°uÐ%=Ñ>Ô>×CÒCÑEÔE×UÒUÑWÔW‰KˆD�%Ý˜$‘<”<ˆDð ×!Ò! ! QÑ'Ô'ð 3¨D¬Kð 3Ý˜T 1 aÑ(Ô(×0Ò0Ñ2Ô2�Øñ !ØÔ*×0Ò0°Ô1CÑDÔDÈÈ1ÀvÑM�Ý §¢¡¤Ð8°Ð8Ð8Ð8�Ý˜g¥tÑ,Ô,ð )Ø% aœj�GÝ�w—~’~Ñ'Ô'Ñ(Ô(ð !Ø ŸIšI gÑ.Ô.�EØ"ŸZšZ¨Ñ0Ô0�Fõ !ŸMšM¨&°!Ñ4Ô4�EØ §¢¨EÑ 2Ô 2× 7Ò 7¸¸4Ñ @Ô @Ø˜EŸJšJ uÑ-Ô-×2Ò2°1°dÑ;Ô;ð=�Cà˜5�L�L�LùðU*!ð *!ð	!ð 	!r<   c           	      ó2  ‡‡‡— | d         }| d         }| d         }|j         d         Š| d         Š t          d¦  «        ‰|¦  «        } t          d¦  «        ‰|¦  «        }|                     ¦   «         �r�t          d¦  «        \  }}}	|||	z  z   ||z  z
  }
t	          |
¦  «                             ¦   «         \  }}t          |‰‰¦  «                             ¦   «         } t          d	¦  «        ‰‰¦  «        }|                     ‰¦  «        }|                     ‰¦  «        }|||z  z   ||z  z
  }
t          d	¦  «        }t          d
|d
z   ¦  «        D �]ÂŠ|t          ˆˆˆfd„t          ‰d
z   ¦  «        D ¦   «         Ž z  }t	          |
                     ||i¦  «                             ¦   «         ¦  «                             ¦   «         \  }}t          |¦  «        }|                     ‰‰¦  «        �r"|j        �rt          |‰‰¦  «                             ¦   «         }|rõ|j        ‰‰hz
  }t'          |                     ¦   «         g|¢R Ž }t+          |t,          ¦  «        r|d         }t/          |                     ¦   «         ¦  «        rŒ|                     |¦  «        }t0                               |d
¦  «        }|                     |¦  «        }t5          ||¦  «        \  }}||                     ‰|¦  «        ||                     ‰|¦  «         i}|gc S �ŒÂdS dS )a»  
    The aim of the fourth heuristic is to find the function `\chi(x, y)`
    that satisfies the PDE `\frac{d\chi}{dx} + h\frac{d\chi}{dx}
    - \frac{\partial h}{\partial y}\chi = 0`.

    This assumes `\chi` to be a bivariate polynomial in `x` and `y`. By intuition,
    `h` should be a rational function in `x` and `y`. The method used here is
    to substitute a general binomial for `\chi` up to a certain maximum degree
    is reached. The coefficients of the polynomials, are calculated by by collecting
    terms of the same order in `x` and `y`.

    After finding `\chi`, the next step is to use `\eta = \xi*h + \chi`, to
    determine `\xi` and `\eta`. This can be done by dividing `\chi` by `h`
    which would give `-\xi` as the quotient and `\eta` as the remainder.


    References
    ==========
    - E.S Cheb-Terrab, L.G.S Duarte and L.A,C.P da Mota, Computer Algebra
      Solving of First Order ODEs Using Symmetry Methods, pp. 8

    r0   rx   r2   r   r/   r-   r.   zschi, schix, schiyr+   r!   c           	      ó˜   •— g | ]F}t          d t          |¦  «        z   dz   t          ‰|z
  ¦  «        z   ¦  «        ‰|z  z  ‰‰|z
  z  z  ‘ŒGS )Úchi_rŸ   r    r¢   s     €€€r:   r;   z%lie_heuristic_chi.<locals>.<listcomp>R  si   ø€ ð +ð +ð +àõ �v¥ E¡
¤
Ñ*¨SÑ0µ3°q¸5±y±>´>ÑAÑBÔBÀ1ÀeÁ8ÑKÈAÐPQÐTYÑPYÉNÑZð+ð +ð +r<   N)rI   r	   r§   r   r   r¨   r   r©   rL   r   rª   r   rH   r«   r   r¬   r­   r®   r‰   r   r°   r   rj   r±   rA   r²   r   )r4   r|   r0   rx   r2   r-   r.   ÚschiÚschixÚschiyÚcpder]   r^   rº   r+   ÚchixÚchiyÚchieqÚcnumÚcdenÚcpolyÚsolsymsrÀ   rÃ   ÚxicÚetacrR   r¤   rF   r/   s                              @@@r:   Úlie_heuristic_chirÕ   &  s  øøø€ ð0 	ˆcŒ
€AØ	ˆtŒ€BØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà×ÒÑÔñ %%Ý$Ð%9Ñ:Ô:Ñˆˆe�UØ�q˜‘w‰  D¡Ñ(ˆÝ˜D‘\”\×0Ò0Ñ2Ô2‰
ˆˆUÝ�3˜˜1‰oŒo×*Ò*Ñ,Ô,ˆà�h�u‰oŒo˜a Ñ#Ô#ˆØ�xŠx˜‰{Œ{ˆØ�xŠx˜‰{Œ{ˆØ�a˜‘f‰}˜r #™vÑ%ˆÝ�u‘”ˆÝ�q˜# ™'Ñ"Ô"ð 	%ñ 	%ˆAØ•Sð +ð +ð +ð +ð +ð +å" 1 q¡5™\œ\ð+ñ +ô +ð ,ñ ,ˆEõ   §	¢	¨3°¨-Ñ 8Ô 8× =Ò =Ñ ?Ô ?Ñ@Ô@×OÒOÑQÔQ‰JˆD�$Ý˜$‘<”<ˆDØ×!Ò! ! QÑ'Ô'ñ %¨D¬Kñ %Ý˜T 1 aÑ(Ô(×0Ò0Ñ2Ô2�Øð %Ø#Ô0°A°q°6Ñ9�GÝ# E§L¢L¡N¤NÐ=°WÐ=Ð=Ð=�GÝ! '­4Ñ0Ô0ð -Ø")¨!¤*˜Ý˜7Ÿ>š>Ñ+Ô+Ñ,Ô,ð %Ø %§
¢
¨7Ñ 3Ô 3˜Ý $§¢¨g°qÑ 9Ô 9˜Ø %§
¢
¨5Ñ 1Ô 1˜õ %(¨¨q¡M¤M™	˜˜TØ" D§I¢I¨a°Ñ$6Ô$6¸¸S¿XºXÀaÈÑ=NÔ=NÐ<NÐO˜Ø #˜u˜˜˜ùðK%%ð %%ð	%ð 	%r<   c                 óp  ‡‡— g }| d         }| d         }| d         }|j         d         Š| d         Š t          d¦  «        ‰|¦  «        } t          d¦  «        ‰|¦  «        }||fD �]L}|d|z                       ‰d	¦  «        z  }	t          d|	z                       ‰¦  «        d
‰‰g¬¦  «        }
|
�rú|
d         �rñ|
‰                              ‰¦  «        �rÕ|
‰                              ‰¦  «        �r¹t          d¦  «        }	 |t          |
‰         ‰¦  «        z  }d||
‰         z  |
d         z  z  }t          ||	z  |z
  ¦  «        }t          |                     ‰d	¦  «        |z
  ¦  «        }|�r*|s|                     |d¦  «        }||z  }n;t          ||¦  «        }|r'|d         }|                     ||¦  «        }||z  |z  }n�Œd||k    r,|                     ‰‰¦  «        }|                     ‰‰¦  «        }t          ||z   ¦  «        }|j        rt          ˆˆfd„|j         D ¦   «         Ž }||k    r%||                     ‰|¦  «        |t          j        i}n$||                     ‰|¦  «        |t          j        i}|s|gc S |                     |¦  «         n# t           $ r Y nw xY w|r|c S �ŒNdS )a/  
    This heuristic uses the following two assumptions on `\xi` and `\eta`

    .. math:: \eta = 0, \xi = f(x) + g(y)

    .. math:: \eta = f(x) + g(y), \xi = 0

    The first assumption of this heuristic holds good if

    .. math:: \frac{\partial}{\partial y}[(h\frac{\partial^{2}}{
                \partial x^{2}}(h^{-1}))^{-1}]

    is separable in `x` and `y`,

    1. The separated factors containing `y` is `\frac{\partial g}{\partial y}`.
       From this `g(y)` can be determined.
    2. The separated factors containing `x` is `f''(x)`.
    3. `h\frac{\partial^{2}}{\partial x^{2}}(h^{-1})` equals
       `\frac{f''(x)}{f(x) + g(y)}`. From this `f(x)` can be determined.

    The second assumption holds good if `\frac{dy}{dx} = h(x, y)` is rewritten as
    `\frac{dy}{dx} = \frac{1}{h(y, x)}` and the same properties of the first
    assumption satisfies. After obtaining `f(x)` and `g(y)`, the coordinates
    are again interchanged, to get `\eta` as `f(x) + g(y)`.

    For both assumptions, the constant factors are separated among `g(y)`
    and `f''(x)`, such that `f''(x)` obtained from 3] is the same as that
    obtained from 2]. If not possible, then this heuristic fails.


    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 7 - pp. 8

    r0   r2   ry   r   r/   r-   r.   r!   rˆ   Tr’   rB   Úkc                 ó@   •— g | ]}|                      ‰‰¦  «        ¯|‘ŒS r6   ©Úhas)r8   ÚargrF   r/   s     €€r:   r;   z.lie_heuristic_function_sum.<locals>.<listcomp>º  s+   ø€ Ð&SÐ&SÐ&S¨sÀSÇWÂWÈQÐPQÁ]Ä]Ð&S sÐ&SÐ&SÐ&Sr<   N)rI   r	   rL   r   rÚ   r   r   r   rH   r   r   Úis_Mulr   r   rŠ   rO   rN   )r4   r|   r~   r0   r2   ry   r-   r.   Úodefacr�   r`   r×   r”   ÚfddrŒ   ÚcheckrD   r–   rR   rF   r/   s                      @@r:   Úlie_heuristic_function_sumrà   m  s   øø€ ðL €EØˆcŒ
€AØ�Œ=€DØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà�d�)ð )ñ )ˆØ˜!˜F™(Ÿš¨¨AÑ.Ô.Ñ/ˆÝ˜A˜f™HŸ?š?¨1Ñ-Ô-°DÀ1ÀaÀ&ÐIÑIÔIˆØñ #	*�3�w”<ñ #	* C¨¤F§J¢J¨q¡M¤Mñ #	*°c¸!´f·j²jÀ±m´mñ #	*Ý�c‘
”
ˆAð!*Ø•y  Q¤¨Ñ+Ô+Ñ+�ð ˜˜3˜qœ6™ # g¤,Ñ.Ñ/�Ý˜c &™j¨2™oÑ.Ô.�Ý  §¢¨¨A¡¤°Ñ!4Ñ5Ô5�Øñ *Ø ð 
%ØŸWšW Q¨™]œ]˜Ø  ™d˜˜å# E¨1™oœo˜Øð %Ø"% a¤&˜CØ!#§¢¨¨C¡¤˜BØ"$ Q¡$¨¡˜B˜Bá$Ø ’~�~ØŸWšW Q¨™]œ]˜ØŸWšW Q¨™]œ]˜Ý)¨"¨r©'Ñ2Ô2�FØ”}ð UÝ!$Ð&SÐ&SÐ&SÐ&SÐ&S°f´kÐ&SÑ&SÔ&SÐ!T˜Ø ’~�~Ø" F§K¢K°°4Ñ$8Ô$8¸"½q¼vÐF˜˜à! 6§;¢;¨q°$Ñ#7Ô#7¸½q¼vÐF˜Øð *Ø #˜u˜˜˜àŸš SÑ)Ô)Ð)øøõ? 'ð ð ð Ø�ðøøøðB ð 	ØˆLˆLˆLñ	ðQ)ð )s   ÄJÊ
J+Ê*J+c                 ó˜	  — | d         }| d         }| d         }| d         }| d         }|j         d         }| d         } t          d¦  «        ||¦  «        }	 t          d	¦  «        ||¦  «        }
t          |                     |¦  «        |                     |d
¦  «        z  ¦  «        }|                     |¦  «        }|                     |¦  «        }|                     |¦  «        sÐ|                     |¦  «        s»t          d|g¬¦  «        }t          d|g¬¦  «        }t          d||g¬¦  «        }|                     ||t          ||z  ¦  «        z  z   ¦  «        } 	 t          t          | |         | |         z  ¦  «         |¦  «        | |         z  }| |         |z  }|	||
|igS # t          $ r Y n¬w xY wt          ||z  ¦  «        }|                     |¦  «        s�t          ||z  |                     |¦  «        z
  |z
  ||z   z  ¦  «        }|                     |¦  «        s;	 t          t          ||¦  «        ¦  «        }| |z  }|	||
|igS # t          $ r Y nw xY wt          |                     |¦  «        |                     |d
¦  «        z  ¦  «        }|                     |¦  «        }|                     |¦  «        }|                     |¦  «        sù|                     |¦  «        sät          d|g¬¦  «        }t          d|g¬¦  «        }t          d||g¬¦  «        }|                     ||t          ||z  ¦  «        z  z   ¦  «        } 	 t          t          | |         | |         z  ¦  «         |¦  «        | |         z  }| |         |z  }|
| 
                    ||¦  «        |	| 
                    ||¦  «        igS # t          $ r Y dS w xY wt          ||z  ¦  «        }|                     |¦  «        sÐt          ||                     |¦  «        z  |                     |¦  «        z
  |                     |¦  «        z
  ||z   z  ¦  «        }|                     |¦  «        sf	 t          t          ||¦  «        ¦  «        }| |z  }|
| 
                    ||¦  «        |	| 
                    ||¦  «        igS # t          $ r Y dS w xY wdS dS )aW  
    This heuristic uses the following two assumptions on `\xi` and `\eta`

    .. math:: \eta = g(x), \xi = f(x)

    .. math:: \eta = f(y), \xi = g(y)

    For the first assumption,

    1. First `\frac{\frac{\partial h}{\partial y}}{\frac{\partial^{2} h}{
       \partial yy}}` is calculated. Let us say this value is A

    2. If this is constant, then `h` is matched to the form `A(x) + B(x)e^{
       \frac{y}{C}}` then, `\frac{e^{\int \frac{A(x)}{C} \,dx}}{B(x)}` gives `f(x)`
       and `A(x)*f(x)` gives `g(x)`

    3. Otherwise `\frac{\frac{\partial A}{\partial X}}{\frac{\partial A}{
       \partial Y}} = \gamma` is calculated. If

       a] `\gamma` is a function of `x` alone

       b] `\frac{\gamma\frac{\partial h}{\partial y} - \gamma'(x) - \frac{
       \partial h}{\partial x}}{h + \gamma} = G` is a function of `x` alone.
       then, `e^{\int G \,dx}` gives `f(x)` and `-\gamma*f(x)` gives `g(x)`

    The second assumption holds good if `\frac{dy}{dx} = h(x, y)` is rewritten as
    `\frac{dy}{dx} = \frac{1}{h(y, x)}` and the same properties of the first assumption
    satisfies. After obtaining `f(x)` and `g(x)`, the coordinates are again
    interchanged, to get `\xi` as `f(x^*)` and `\eta` as `g(y^*)`

    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 10 - pp. 12

    r0   rw   rx   r2   ry   r   r/   r-   r.   rˆ   ÚArs   ÚBÚCN)rI   r	   r   rL   rÚ   r   r4   r   r   rN   rH   )r4   r|   r0   rw   rx   r2   ry   rF   r/   r-   r.   r�   ÚfactorxÚfactoryrâ   rã   rä   ÚtauÚgxÚgammaÚtauints                        r:   Úlie_heuristic_abaco2_similarrë   Ç  sô  € ðL 	ˆcŒ
€AØ	ˆtŒ€BØ	ˆtŒ€BØ�Œ=€DØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cå�A—F’F˜1‘I”I˜aŸfšf Q¨™lœlÑ*Ñ+Ô+€FØ�kŠk˜!‰nŒn€GØ�kŠk˜!‰nŒn€GØ�:Š:�a‰=Œ=ð 0 §¢¨A¡¤ð 0Ý�˜q˜cÐ"Ñ"Ô"ˆÝ�˜q˜cÐ"Ñ"Ô"ˆÝ�˜q !˜fÐ%Ñ%Ô%ˆØ—’˜˜A�c ! A¡#™hœh™J™Ñ'Ô'ˆð	(Ý•y  q¤¨%°¬(Ñ!2Ñ3Ô3Ð3°QÑ7Ô7¸¸a¼Ñ@ˆCð �q”˜#‘ˆBØ˜˜c 2Ð&Ð'Ð'øõ	 #ð 	ð 	ð 	ØˆDð	øøøõ �w˜w‘Ñ'Ô'ˆØ�yŠy˜‰|Œ|ð 		0Ý˜U 2™X¨¯
ª
°1©¬Ñ5¸Ñ:¸QÀ¹YÑGÑHÔHˆFØ—:’:˜a‘=”=ð 0ð0Ý�i¨°Ñ2Ô2Ñ3Ô3�Cð ˜˜e™�BØ  c¨2Ð.Ð/Ð/øõ	 +ð ð ð Ø�Dðøøøõ �D—I’I˜a‘L”L §¢¨1¨a¡¤Ñ0Ñ1Ô1€FØ�kŠk˜!‰nŒn€GØ�kŠk˜!‰nŒn€GØ�:Š:�a‰=Œ=ð L §¢¨A¡¤ð LÝ�˜q˜cÐ"Ñ"Ô"ˆÝ�˜q˜cÐ"Ñ"Ô"ˆÝ�˜q !˜fÐ%Ñ%Ô%ˆØ—’˜˜A�c ! A¡#™hœh™J™Ñ'Ô'ˆð	DÝ•y  q¤¨%°¬(Ñ!2Ñ3Ô3Ð3°QÑ7Ô7¸¸a¼Ñ@ˆCð �q”˜#‘ˆBØ˜#Ÿ(š( 1 dÑ+Ô+¨R°·²¸¸DÑ1AÔ1AÐBÐCÐCøõ	 #ð 	ð 	ð 	ØˆDˆDð	øøøõ �w˜w‘Ñ'Ô'ˆØ�yŠy˜‰|Œ|ð 
	LÝ˜U 4§9¢9¨Q¡<¤<Ñ/°%·*²*¸Q±-´-Ñ?À$Ç)Â)ÈAÁ,Ä,ÑNØ�u‘ññ ô ˆFà—:’:˜a‘=”=ð LðLÝ�i¨°Ñ2Ô2Ñ3Ô3�Cð ˜˜e™�BØ  #§(¢(¨1¨dÑ"3Ô"3°R¸¿ºÀÀDÑ9IÔ9IÐJÐKÐKøõ	 +ð ð ð Ø�D�Dðøøøð
	Lð 
	LðLð LsH   Å 6F( Æ(
F5Æ4F5È&I É
IÉIÍ6O  Ï 
OÏOÑ%R7 Ò7
SÓSc                 ó  — | d         }| d         }| d         }| d         }|j         d         }| d         } t          d¦  «        ||¦  «        } t          d¦  «        ||¦  «        }	g }
|                     t          ¦  «        D ]_}|                     ¦   «         \  }}|                     |¦  «        r1|                     |¦  «        r|j        s|
                     |¦  «         Œ`|                     t          ¦  «        D ]&}|j	        }||v r||v r|
                     |¦  «         Œ'|
D �]X}t          |                     |¦  «        |                     |¦  «        z  ¦  «        }t          |d	||g¬
¦  «        }|�r|d         �r||         }d||         |d         z  z  }|                     |¦  «        |z  |                     |¦  «        |z  z
  ||z  z
  ||z  z
  }t          |¦  «        s|||	|                     ||¦  «        igc S d|z  }d|z  }|                     |¦  «        |                     |¦  «        |dz  z  z
  ||z  z
  ||z  z
  }t          t          |¦  «        ¦  «        s||                     ||¦  «        |	|igc S �Œbd|z  }|                     |¦  «        |                     |¦  «        |z  z   |z
  ||z  z
  }t          |¦  «        s'|t           j        |	|                     ||¦  «        igc S | }|                     |¦  «         |z  |                     |¦  «        |dz  z  z
  ||z  z
  |z
  }t          t          |¦  «        ¦  «        s'||                     ||¦  «        |	t           j        igc S �ŒZdS )a¡  
    This heuristic assumes the presence of unknown functions or known functions
    with non-integer powers.

    1. A list of all functions and non-integer powers containing x and y
    2. Loop over each element `f` in the list, find `\frac{\frac{\partial f}{\partial x}}{
       \frac{\partial f}{\partial x}} = R`

       If it is separable in `x` and `y`, let `X` be the factors containing `x`. Then

       a] Check if `\xi = X` and `\eta = -\frac{X}{R}` satisfy the PDE. If yes, then return
          `\xi` and `\eta`
       b] Check if `\xi = \frac{-R}{X}` and `\eta = -\frac{1}{X}` satisfy the PDE.
           If yes, then return `\xi` and `\eta`

       If not, then check if

       a] :math:`\xi = -R,\eta = 1`

       b] :math:`\xi = 1, \eta = -\frac{1}{R}`

       are solutions.

    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 10 - pp. 12

    r0   rw   rx   r2   r   r/   r-   r.   Tr’   rB   r@   r!   rˆ   N)rI   r	   Úatomsr   Úas_base_exprÚ   Ú
is_IntegerrO   r
   r‰   r   rL   r   r   rH   r   r   ÚOne)r4   r|   r0   rw   rx   r2   rF   r/   r-   r.   ÚfunclistÚatomÚbaser   r…   ÚsymsrE   Úfracr`   Úxitry1Úetatry1Úpde1Úxitry2Úetatry2Úpde2ÚetatryÚpdeÚxitrys                               r:   Ú#lie_heuristic_abaco2_unique_unknownrÿ   3  s¥  € ð> 	ˆcŒ
€AØ	ˆtŒ€BØ	ˆtŒ€BØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà€HØ—’�‘”ð &ð &ˆØ×$Ò$Ñ&Ô&‰	ˆˆcØ�8Š8�A‰;Œ;ð 	&˜4Ÿ8š8 A™;œ;ð 	&Ø”>ð &Ø—’ Ñ%Ô%Ð%øà—G’G�LÑ)Ô)ð &ð &ˆØÔ$ˆØ�ˆ9ˆ9˜˜d˜˜Ø�OŠO˜HÑ%Ô%Ð%øàð ?ñ ?ˆÝ�a—f’f˜Q‘i”i §¢ q¡	¤	Ñ)Ñ*Ô*ˆÝ˜4 d°Q¸°FÐ;Ñ;Ô;ˆØñ 	?�3�w”<ñ 	?Ø˜”VˆFØ˜#˜aœ&  W¤Ñ-Ñ.ˆGØ—<’< ‘?”? 1Ñ$ v§{¢{°1¡~¤~°aÑ'7Ñ7¸&À¹)ÑCÀgÈbÁjÑPˆDÝ˜D‘>”>ð BØ˜V S¨'¯,ª,°q¸$Ñ*?Ô*?Ð@ÐAÐAÐAÐAØ�w‘YˆFØ˜‘hˆGØ—<’< ‘?”? f§k¢k°!¡n¤n°a¸±dÑ%:Ñ:¸VÀB¹YÑFÈÐQSÉÑSˆDÝ�F 4™LœLÑ)Ô)ð BØ˜VŸ[š[¨¨DÑ1Ô1°3¸Ð@ÐAÐAÐAÐAñBð ˜‘WˆFØ—+’+˜a‘.”. 6§;¢;¨q¡>¤>°!Ñ#3Ñ3°bÑ8¸6À"¹9ÑDˆCÝ˜C‘=”=ð @Ø�QœU C¨¯ª°Q¸Ñ)=Ô)=Ð>Ð?Ð?Ð?Ð?Ø�EˆEØ—:’:˜a‘=”=�. Ñ" E§J¢J¨q¡M¤M°!°Q±$Ñ$6Ñ6¸¸r¹ÑAÀ2ÑEˆCÝ�F 3™KœKÑ(Ô(ð ?Ø˜UŸZšZ¨¨4Ñ0Ô0°#µq´uÐ=Ð>Ð>Ð>Ð>ñ?ð-?ð ?r<   c                 óT  — | d         }| d         }| d         }|j         d         }| d         } t          d¦  «        ||¦  «        } t          d¦  «        ||¦  «        }|                     |¦  «        }	|                     |¦  «        |dz  z   }
|                     |¦  «        |dz  z
  }|	r|
r|sd	S |	                     |¦  «        }|	                     |¦  «        }|                     |¦  «        }|                     |¦  «        }|                     |¦  «        }t          d|z  ||z  z   ||z  z
  ||z  d|	z  z   |	z  z   ¦  «        |	z  d
|z  |z  z
  }|�sZt          d
|dz  z  |dz  d|z  z   |	z  d|z  z
  |	z  z   ¦  «        }|�r"t          d|z  d|
z  |dz  z
  |	z  z   |	z  d
|dz  z  z
  ¦  «        }|sõt          |d|z  d|z  |	z  z   |	d
z  z  |||	z  |z   z  z
  z  |                     |¦  «        dz  |	dz  z  z
  ¦  «        }|s¦t	          d|	d
z  z  |||	z  z
  z  |||	z  |z
  z  z   t          d¦  «        |	z  |z  z  ¦  «        }||vrd	 t          t          ||¦  «        ¦  «        }d|	d
z  z  |z  |z  }||vr||||                     ||¦  «        igS d	S # t          $ r Y d	S w xY wd	S d	S d	S d	S t          d|z  d|
z  |dz  z
  |	z  z   |	z  d
|dz  z  z
  ¦  «        }|�r@t          d|	d
z  z  |z  |dz  z
  |d|z  |dz  d|z  z   |	z  z
  |	z  d
|dz  z  z
  z  z   ¦  «        }|sþt          |	|z   |                     |¦  «        z  |                     |¦  «        ||z  z
  |	z  d
|z  |z  z   |	|z  d
|z  z
  |z  z   |z  z   ¦  «        }|s›t	          |	|z  |z
  |z  ||	|z  z   |z  z
  t          d¦  «        |	z  |z  z  ¦  «        }||vr_	 t          t          ||¦  «        ¦  «        }| |z  |z  }||vr||||                     ||¦  «        igS d	S # t          $ r Y d	S w xY wd	S d	S d	S d	S )aQ  
    This heuristic finds if infinitesimals of the form `\eta = f(x)`, `\xi = g(y)`
    without making any assumptions on `h`.

    The complete sequence of steps is given in the paper mentioned below.

    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 10 - pp. 12

    rw   rx   r2   r   r/   r-   r.   rˆ   Né   é   é   é   éüÿÿÿ)
rI   r	   rL   r   r   r   r   r   rH   rN   )r4   r|   rw   rx   r2   rF   r/   r-   r.   râ   rã   rä   ÚAxÚAyÚAxyÚAxxÚAyyÚDÚE1ÚE2ÚE3r–   Úxivals                          r:   Ú#lie_heuristic_abaco2_unique_generalr  �  s_  € ð 
ˆtŒ€BØ	ˆtŒ€BØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà
�Š�‰
Œ
€AØ
�Š�‰
Œ
�R˜‘UÑ€AØ
�Š�‰
Œ
�R˜‘UÑ€Aàð �!ð ˜ð Øˆà	
�Š�‰Œ€BØ	
�Š�‰Œ€BØ
�'Š'�!‰*Œ*€CØ
�'Š'�!‰*Œ*€CØ
�'Š'�!‰*Œ*€CÝ��3‘˜˜B™‘  B¡Ñ&¨"¨R©%°!°A±#©+°q©Ñ8Ñ9Ô9¸!Ñ;¸aÀ¹dÀ2¹gÑE€AØñ &PÝ�a˜˜A™‘g " a¡%¨!¨A©#¡+¨q¡°1°S±5Ñ!8¸!Ñ ;Ñ;Ñ<Ô<ˆØñ 	PÝ˜1˜S™5 A a¡C¨"¨a©%¡K°¡?Ñ2°AÑ5¸¸"¸a¹%¹Ñ?Ñ@Ô@ˆBØð PÝØ˜˜B™  2¡ a¡™¨¨A©Ñ-°°B°q±D¸2±I±Ñ>Ñ?À"Ç'Â'È!Á*Ä*ÈQÁ,ÈqÐRSÉtÑBSÑSñUô U�àð 
PÝ# Q q¨!¡t¡V¨R°"°Q±$©YÑ%7¸"¸bÀ¹dÀR¹i¹.Ñ%HÍ1ÈQÉ4Ì4ÐPQÉ6ÐRTÉ9Ñ$UÑVÔV�FØ ��ðPÝ%(­°6¸1Ñ)=Ô)=Ñ%>Ô%>˜Fð %' q¨!¡t¡G¨F¡N°2Ñ$5˜EØ ¨˜~˜~Ø)+¨U°C¸¿ºÀQÈÑ9MÔ9MÐ(NÐ'OÐ Oð  .˜~øõ	  3ð !ð !ð !Ø ˜D˜Dð!øøøð	Pð 	PðPð Pð
Pð 
Pà&�õ �q˜‘u  !¡ b¨!¡e¡¨Q™Ñ.°Ñ1°A°b¸!±e±GÑ;Ñ<Ô<ˆØñ 	PÝØ�!�Q‘$‘�q‘˜1˜a™4‘ " q¨¡u°°A±¸¸!¹±¸Q©Ñ'>ÀÑ&AÀAÀbÈ!ÁeÁGÑ&KÑ"LÑLñNô NˆBàð PÝØ�q‘S�6˜"Ÿ'š' !™*œ*Ñ$¨¯ª°©¬°b¸±dÑ):¸AÑ(=ÀÀ"ÁÀQÁÑ(FØ�r‘T˜A˜b™D‘[ "Ñ$ñ)%Ø&(ñ()ñ )ñ*ô *�ð ð 
PÝ# a¨¡d¨R¡i°¡^°r¸A¸b¹D±yÀ!±mÑ%CÅaÈÁdÄdÈ1ÁfÈQÁhÑ$OÑPÔP�FØ ��ðPÝ%(­°6¸1Ñ)=Ô)=Ñ%>Ô%>˜Fð &( C¨¡J¨q¡L˜EØ ¨˜~˜~Ø)+¨U°C¸¿ºÀQÈÑ9MÔ9MÐ(NÐ'OÐ Oð  .˜~øõ	  3ð !ð !ð !Ø ˜D˜Dð!øøøð	Pð 	PðPð Pð
Pð 
Pà&�s$   ÉJ Ê
J'Ê&J'Ï
P Ð
PÐPc                 óD  ‡‡‡— | d         }| d         }| d         }| d         }|j         d         Š| d         Š t          d¦  «        ‰|¦  «        } t          d¦  «        ‰|¦  «        }i }t          d	t          ¬
¦  «        Šˆfd„t	          ‰d¦  «        D ¦   «         }	|	\  }
}}}}}|||
z
  |z  z   |
‰z  |‰z  z   |z   |z  z
  |‰z  |‰z  z   |z   |z  z
  ||dz  z  z
  }|                     ¦   «         \  }}t          t          |¦  «        ¦  «        }|j        r||j         }|D ]r}|j	        r;t          ˆˆfd„|j         D ¦   «         Ž }||z  }||vr|||<   Œ3||xx         |z  cc<   ŒD||vrt          j        ||<   ŒX||xx         t          j        z  cc<   Œs|                     ¦   «         }t          ||	¦  «        }|rât          |t           ¦  «        r|d         }|                     ¦   «         }t#          d„ |D ¦   «         ¦  «        ršt%          t'          |	dgdz  ¦  «        ¦  «        }|
‰z  ||z  z   |z   }|‰z  ||z  z   |z   }|                     |¦  «        }|                     |¦  «        }|                     |¦  «        }|                     |¦  «        }||||igS dS dS )a  
    This heuristic assumes

    1. `\xi = ax + by + c` and
    2. `\eta = fx + gy + h`

    After substituting the following assumptions in the determining PDE, it
    reduces to

    .. math:: f + (g - a)h - bh^{2} - (ax + by + c)\frac{\partial h}{\partial x}
                 - (fx + gy + c)\frac{\partial h}{\partial y}

    Solving the reduced PDE obtained, using the method of characteristics, becomes
    impractical. The method followed is grouping similar terms and solving the system
    of linear equations obtained. The difference between the bivariate heuristic is that
    `h` need not be a rational function in this case.

    References
    ==========
    - E.S. Cheb-Terrab, A.D. Roche, Symmetries and First Order
      ODE Patterns, pp. 10 - pp. 12

    r0   rw   rx   r2   r   r/   r-   r.   Úc)Úclsc                 ó.   •— g | ]}t          ‰¦  «        ‘ŒS r6   )Únext)r8   rŸ   r   s     €r:   r;   z(lie_heuristic_linear.<locals>.<listcomp>ï  s   ø€ Ð9Ð9Ð9 �t�G‰}Œ}Ð9Ð9Ð9r<   é   rˆ   c                 ó@   •— g | ]}|                      ‰‰¦  «        °|‘ŒS r6   rÙ   )r8   ÚmrF   r/   s     €€r:   r;   z(lie_heuristic_linear.<locals>.<listcomp>ø  s*   ø€ ÐDÐDÐD !¸¿º¸aÀ¹¼ÐD˜AÐDÐDÐDr<   c              3   ó   K  — | ]}|V — Œd S )Nr6   )r8   Úts     r:   ú	<genexpr>z'lie_heuristic_linear.<locals>.<genexpr>
  s"   è è € Ð!Ð!�QˆqÐ!Ð!Ð!Ð!Ð!Ð!r<   r!   N)rI   r	   r   r   r   r¨   r   r   r­   rÜ   r   r   rð   r°   r   r   rj   r±   rA   ÚziprH   )r4   r|   r0   rw   rx   r2   r-   r.   Ú	coeffdictÚsymlistÚC0r?   ÚC2ÚC3ÚC4ÚC5rý   r^   ÚtermsÚtermÚremÚxypartÚsollistrÀ   ÚsubvalÚonedictr  r–   r   rF   r/   s                               @@@r:   Úlie_heuristic_linearr+  Ì  s  øøø€ ð0 	ˆcŒ
€AØ	ˆtŒ€BØ	ˆtŒ€BØ�Œ=€DØŒ	�!Œ€AØˆcŒ
€AØ	��$‰Œ˜˜4Ñ	 Ô	 €BØ
�(�5‰/Œ/˜!˜TÑ
"Ô
"€Cà€IÝ˜s­Ð.Ñ.Ô.€GØ9Ð9Ð9Ð9¥f¨W°aÑ&8Ô&8Ð9Ñ9Ô9€GØ$Ñ€BˆˆB��B˜Ø
��R‘˜‰{Ñ
˜b ™d R¨¡T™k¨BÑ.°Ñ2Ñ
2°b¸±d¸RÀ¹T±kÀBÑ6FÈÑ5JÑ
JÈRÐPQÐSTÑPTÉWÑ
T€CØ×#Ò#Ñ%Ô%�J€CˆÝ
•&˜‘+”+Ñ
Ô
€CØ
„zð -Ø”ˆØð 	-ð 	-ˆDØŒ{ð -ÝÐDÐDÐDÐDÐD t¤yÐDÑDÔDÐE�Ø˜c™�Ø Ð*Ð*Ø(+�I˜fÑ%Ð%à˜fÐ%Ð%Ô%¨Ñ,Ð%Ð%Ñ%Ð%à˜yÐ(Ð(Ý&'¤e�I˜d‘O�Oà˜d�O�O”O¥q¤uÑ,�O�O‘O�Oà×ÒÑ Ô €GÝ�G˜WÑ%Ô%€GØð .Ý�g�tÑ$Ô$ð 	!Ø˜a”jˆGØ—’Ñ!Ô!ˆÝÐ!Ð!˜&Ð!Ñ!Ô!Ñ!Ô!ð 	.Ý�3˜w¨¨¨A©Ñ.Ô.Ñ/Ô/ˆGØ�q‘D˜2˜d™7‘N RÑ'ˆEØ˜‘T˜B˜t™G‘^ bÑ(ˆFØ—J’J˜wÑ'Ô'ˆEØ—[’[ Ñ)Ô)ˆFØ—J’J˜wÑ'Ô'ˆEØ—[’[ Ñ)Ô)ˆFØ˜  VÐ,Ð-Ð-ð.ð .ð	.ð 	.r<   c                 óö  — t          | t          ¦  «        r| j        d         S | j        r9|                      t          ¦  «        }|r|D ]}|                      |d¦  «        } Œ| S | j        r:|                      ¦   «         \  }}t          |¦  «        }t          |¦  «        }||z  S | j	        rNg }| j        }|D ]9}t          | t          ¦  «        s"| 
                    t          |¦  «        ¦  «         Œ:t          |Ž S | S )a…  
    This function is strictly meant for internal use by the Lie group ODE solving
    method. It replaces arbitrary functions returned by pdsolve as follows:

    1] If coords is an arbitrary function, then its argument is returned.
    2] An arbitrary function in an Add object is replaced by zero.
    3] An arbitrary function in a Mul object is replaced by one.
    4] If there is no arbitrary function coords is returned unchanged.

    Examples
    ========

    >>> from sympy.solvers.ode.lie_group import _lie_group_remove
    >>> from sympy import Function
    >>> from sympy.abc import x, y
    >>> F = Function("F")
    >>> eq = x**2*y
    >>> _lie_group_remove(eq)
    x**2*y
    >>> eq = F(x**2*y)
    >>> _lie_group_remove(eq)
    x**2*y
    >>> eq = x*y**2 + F(x**3)
    >>> _lie_group_remove(eq)
    x*y**2
    >>> eq = (F(x**3) + y)*x**4
    >>> _lie_group_remove(eq)
    x**4*y

    r   )r   r
   rI   r­   rí   rH   Úis_Powrî   r7   rÜ   rO   r   )ÚcoordsÚsubfuncr2   ró   ÚexprÚmulargsÚ	coordargsrÛ   s           r:   r7   r7     s  € õ> �&�,Ñ'Ô'ð ØŒ{˜1Œ~ÐØ	Œð Ø—,’,�|Ñ,Ô,ˆØð 	.Øð .ð .�ØŸš T¨1Ñ-Ô-��ØˆØ	Œð Ø×'Ò'Ñ)Ô)‰
ˆˆdÝ  Ñ&Ô&ˆÝ  Ñ&Ô&ˆØ�T‰zÐØ	Œð ØˆØ”Kˆ	Øð 	7ð 	7ˆCÝ˜f¥lÑ3Ô3ð 7Ø—’Õ0°Ñ5Ô5Ñ6Ô6Ð6øÝ�Gˆ}ÐØ€Mr<   )NNrp   N)F)>Ú__doc__Ú	itertoolsr   Ú
sympy.corer   r   r   r   Úsympy.core.exprtoolsr   Úsympy.core.functionr	   r
   r   Úsympy.core.relationalr   r   Úsympy.core.symbolr   r   r   r   Úsympy.functionsr   r   Úsympy.integrals.integralsr   Úsympy.polysr   Úsympy.polys.polytoolsr   r   Úsympy.simplifyr   r   r   r   Úsympy.solversr   Úsympy.solvers.pder   Úsympy.utilitiesr   Úsympy.solvers.deutilsr   r    Úoder"   rh   rc   ro   rJ   r�   r—   rÄ   rÕ   rà   rë   rÿ   r  r+  r7   r6   r<   r:   ú<module>rD     sè  ððð ð& Ð Ð Ð Ð Ð à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø -Ð -Ð -Ð -Ð -Ð -Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ø .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø $Ð $Ð $Ð $Ð $Ð $Ð $Ð $Ø /Ð /Ð /Ð /Ð /Ð /Ø Ð Ð Ð Ð Ð Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -ðð ð ð ð ð ð ð ð ð ð ð à Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø Ð Ð Ð Ð Ð ð
€ðEð Eð EðP!ð !ð !ðHI-ð I-ð I-ð I-ðXeð eð eð eðNGð Gð Gð GðRF!ð F!ð F!ð F!ðPE%ð E%ð E%ð E%ðNXð Xð Xð XðtiLð iLð iLð iLðXK?ð K?ð K?ð K?ð\HPð HPð HPð HPðVF.ð F.ð F.ð F.ðR3ð 3ð 3ð 3ð 3r<   