ó
    ‹*£hÓE  ã                   óZ  • S r SSKJr  SSKJrJr  SSKJrJrJ	r	J
r
  SSKJr  SSKJr  SSKJrJr  SSKJrJrJrJrJrJrJrJrJrJr  SS	KJr  SS
KJ r J!r!J"r"J#r#  SSK$J%r%J&r&J'r'J(r(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  S r4S r5SS jr6S r7S r8S\Rr                  4S jr:S r;g)aÆ  
This File contains helper functions for nth_linear_constant_coeff_undetermined_coefficients,
nth_linear_euler_eq_nonhomogeneous_undetermined_coefficients,
nth_linear_constant_coeff_variation_of_parameters,
and nth_linear_euler_eq_nonhomogeneous_variation_of_parameters.

All the functions in this file are used by more than one solvers so, instead of creating
instances in other classes for using them it is better to keep it here as separate helpers.

é    )ÚCounter)ÚAddÚS)ÚdiffÚexpandÚ_mexpandÚ
expand_mul)ÚEq)Údefault_sort_key)ÚDummyÚWild)
ÚexpÚcosÚcoshÚimÚlogÚreÚsinÚsinhÚatan2Ú	conjugate)ÚIntegral)ÚPolyÚRootOfÚrootofÚroots)ÚcollectÚsimplifyÚseparatevarsÚpowsimpÚtrigsimp)Únumbered_symbols)Úsolve)Ú	wronskiané   )Úsub_func_doit)Úget_numbered_constantsc                 ót  • UR                   S   nUR                  nUS:  a  [        S5      eU S:X  a  gUS:X  a  X0R                  ;   a  ggU R                  (       a.  U R                  U" U5      5      (       a  gX2-  U R                   ;   $ U R                  (       a  U R                  5       X24:H  $ US:X  a  X0:H  $ g)a  
Linear Euler ODEs have the form  K*x**order*diff(y(x), x, order) = F(x),
where K is independent of x and y(x), order>= 0.
So we need to check that for each term, coeff == K*x**order from
some K.  We have a few cases, since coeff may have several
different types.
r   zorder should be greater than 0TFr%   )ÚargsÚfuncÚ
ValueErrorÚfree_symbolsÚis_MulÚhasÚis_PowÚas_base_exp)Úcoeffr*   ÚorderÚxÚfs        Ú]/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sympy/solvers/ode/nonhomogeneous.pyÚ
_test_termr6      s«   € ð 	�	‰	�!‰€AØ�	‰	€AØˆqƒyÜÐ9Ó:Ð:Ø�ƒzØØ�ƒzØ×"Ñ"Ó"ØØØ‡|‡|Ø�9‰9‘Q�q“T�?‰?ØØ‰x˜5Ÿ:™:Ñ%Ð%Ø	��Ø× Ñ Ó" q jÑ0Ð0Ø	�!‹Ø‰zÐØó    c                 ó&  • UR                   S   nUR                  n[        R                  [	        S5      peU H5  nUS:¼  d  M  XRU   [        X6-  X75      -  X6* -  -  R                  5       -  nM7     [        XV5      n[        UR                  5       5       Vs/ s H  n[        XX5      PM     n	n/ n
[        [        XR                  5       S-  S95      nUR                  5         [        U	5      n[        R                  n[        nUR!                  5        GH)  u  nn[        U5       GH  n[#        U[$        5      (       a4  XÓU-  UR'                  5       -  -  nUS:w  a  [)        S5      eSUS4/U
-   n
MM  UR*                  (       a-  XÞ" U5      U-  X?-  -  UR'                  5       -  -  nXS4/U
-   n
M‹  [-        U5      n[/        U5      nXÞ" U5      U-  UU-  -  UR'                  5       [1        [3        U5      U" U5      -  5      -  UR'                  5       [5        UU" U5      -  5      -  -   -  -  nUUU4/U
-   n
GM     GM,     [7        U" U5      U5      n/ nU
 H®  u  nnnUS:X  a"  UR9                  U" U5      U-  UU-  -  5        M/  U" U5      U-  UU-  -  [1        [3        U5      U" U5      -  5      -  nUU;   a9  U" U5      U-  UU-  -  [5        UU" U5      -  5      -  nUR9                  U5        M�  UR9                  U5        M°     UU4$ s  snf )a  
Returns the solution of homogeneous part of the linear euler ODE and
the list of roots of characteristic equation.

The parameter ``match_obj`` is a dict of order:coeff terms, where order is the order
of the derivative on each term, and coeff is the coefficient of that derivative.

r   r3   é   )Únumr%   zValue should be 1)r)   r*   r   ÚZeror   r   r   r   ÚrangeÚdegreer   Úlistr'   Úreverser   r   ÚitemsÚ
isinstancer   Úpopr+   Úis_realr   r   r   Úabsr   r
   Úappend)Úeqr*   Ú	match_objr3   r4   ÚchareqÚsymbolÚiÚkÚchareqrootsÚcollecttermsÚ	constantsÚ	charrootsÚgsolÚlnÚrootÚmultiplicityÚrerootÚimrootÚgensolsÚsin_formÚcos_forms                         r5   Ú!_get_euler_characteristic_eq_solsrY   :   sé  € ð 	�	‰	�!‰€AØ�	‰	€Aô —V‘VœU 3›ZˆFãˆØ��6Ø ‘|¤D¨©°AÓ$9Ñ9¸!¸W¹*ÑD×LÑLÓNÑNŠFñ ô �&Ó!€FÜ.3°F·M±M³OÔ.DÓEÒ.D¨”6˜&Ö$Ñ.D€KÐEØ€Lô Ô+¨B·M±M³OÀAÑ4EÑFÓG€IØ×ÑÔô ˜Ó$€IÜ�6‰6€DÜ	€BØ'Ÿo™o×/ÑˆˆlÜ�|×$ˆAÜ˜$¤×'Ñ'Ø˜D™ I§M¡M£OÑ3Ñ3�Ø 1Ó$Ü$Ð%8Ó9Ð9Ø!" D¨! ˜~°Ñ<’Ø——Ø˜˜1›˜q™ !¡'Ñ*¨Y¯]©]«_Ñ<Ñ<�Ø!"¨! ˜~°Ñ<’ä˜D›�Ü˜D›�Ø˜˜1›˜q™ A v¡IÑ.Ø—M‘M“O¤c¬#¨f«+±b¸³eÑ*;Ó&<Ñ<Ø—m‘m“o¬¨F±2°a³5©LÓ(9Ñ9ñ:ñ;ñ ;�ð "# F¨FÐ 3Ð4°|ÑC“ô %ñ 0ô$ ‰a�‹d�D‹>€Dà€Gã)Ñˆˆ6�6Ø�Q‹;Ø�N‰N™2˜a›5 !™8 A v¡IÑ-Ö.á˜!“u˜a‘x  6¡	Ñ)¬#¬c°&«k¹"¸Q»%Ñ.?Ó*@Ñ@ˆHØ˜7Ó"Ù˜a›5 !™8 A v¡IÑ-¬c°&¹¸A»±,Ó.?Ñ?�Ø—‘˜xÖ(à—‘˜xÖ(ñ *ð �ˆ=ÐùòW Fs   ÂLc                 ó¶  • UR                   nUR                  S   nUn	Sn
[        X(5      nU(       a  [        U5      n[	        USSS9nU(       d,  [        S[        U5      -   S-   S-   [        U 5      -   S-   5      e[        U5      U:w  a,  [        S[        U5      -   S-   S-   [        U 5      -   S-   5      e[        R                  U-  nU HL  nX¬[        [        U Vs/ s H  oîU:w  d  M
  UPM     snU5      U	S	   -  U-  U5      -  U-  X”   -  -  n
US	-  nMN     U(       a  [        U
5      n
[	        U
SS
9n
[        U" U5      UR                  U
-   5      $ s  snf )a‘  
Helper function for the method of variation of parameters and nonhomogeneous euler eq.

See the
:py:meth:`~sympy.solvers.ode.single.NthLinearConstantCoeffVariationOfParameters`
docstring for more information on this method.

The parameter are ``match_obj`` should be a dictionary that has the following
keys:

``list``
A list of solutions to the homogeneous equation.

``sol``
The general solution.

r   T)ÚdeepÚ	recursiveúCannot find z: solutions to the homogeneous equation necessary to apply zvariation of parameters to z (Wronskian == 0)ú (number of terms != order)éÿÿÿÿ)r[   )r*   r)   r$   r   r!   ÚNotImplementedErrorÚstrÚlenr   ÚNegativeOner   r
   Úrhs)rF   r*   r   Úhomogen_solr2   rG   Úsimplify_flagr4   r3   ÚrÚpsolÚwrÚ
negonetermrJ   Úsols                  r5   Ú_solve_variation_of_parametersrl   |   s�  € ð$ 	�	‰	€AØ�	‰	�!‰€AØ€AØ€DÜ	�5Ó	€BæÜ�b‹\ˆô �b˜t¨tÑ4ˆÞô " .´3°u³:Ñ"=ØDñ#Eà%ñ#&ä(+¨B«ñ#0à2Eñ#Fó Gð 	Gô ˆ5ƒz�UÓÜ! .´3°u³:Ñ"=ØDñ#Eà%ñ#&ô 	ˆB‹ñ#ð 0ñ#0ó 1ð 	1ô —‘ Ñ'€JÛˆØœ8¤I¹eÓ.Pºe°sÈaÁx¯s¹eÑ.PÐRSÓ$TÐUVÐWYÑUZÑ$ZÐ[]Ñ$]Ð_`ÓaÑaÐbcÑcÐdeÑdlÑlÑlˆØ�bÑŠ
ñ ö Ü˜‹~ˆÜ˜ 4Ñ(ˆÜ‰a�‹d�K—O‘O dÑ*Ó+Ð+ùò /Qs   Ã	EÃ*Ec           
      óZ  • UR                   S   n[        R                  [        S5      pTU R	                  5        H,  n[        U[        5      (       d  US:  a  M   X@U   XV-  -  -  nM.     [        XE5      n[        USS9n[        U5      U:w  a2  [        UR                  5       5       Vs/ s H  n[        XH5      PM     nn[        S UR                  5        5       5      (       + n	[        U5      n
/ n/ n/ nU GH¨  nXê;  a  M  U
R!                  U5      n[        U5       GH|  nU	(       a+  UR#                  X6-  [%        Xã-  5      -  5        XnS4/U-   nM6  ['        U5      n[)        U5      nUR+                  [,        5      (       aE  UR+                  [,        5      (       a+  UR#                  X6-  [%        Xã-  5      -  5        XnS4/U-   nM«  Xí;   a  UUU4/U-   nM»  US:X  a-  UR#                  X6-  [%        UU-  5      -  5        UUS4/U-   nMî  UR#                  [/        U5      5        UR#                  X6-  [%        UU-  5      -  [1        [3        U5      U-  5      -  5        UR#                  X6-  [%        UU-  5      -  [5        UU-  5      -  5        UUU4/U-   nGM     GM«     XË4$ s  snf )aM  
Returns the roots of characteristic equation of constant coefficient
linear ODE and list of collectterms which is later on used by simplification
to use collect on solution.

The parameter `r` is a dict of order:coeff terms, where order is the order of the
derivative on each term, and coeff is the coefficient of that derivative.

r   r3   T)Úmultiplec              3   ó8   #   • U  H  oR                   v •  M     g 7f©N)rC   )Ú.0rJ   s     r5   Ú	<genexpr>Ú4_get_const_characteristic_eq_sols.<locals>.<genexpr>Ê   s   é € ÐGÒ3F¨a§	¦	Ò3Fùs   ‚)r)   r   r;   r   ÚkeysrA   ra   r   r   rb   r<   r=   r   ÚallÚ
all_coeffsr   rB   rE   r   r   r   r.   r   r   r   rD   r   )rg   r*   r2   r3   rH   rI   rJ   rL   rK   Úchareq_is_complexrO   rM   rV   Úconjugate_rootsrR   rS   rT   rU   s                     r5   Ú!_get_const_characteristic_eq_solsry   ¯   s}  € ð 	�	‰	�!‰€Aä—V‘VœU 3›ZˆFà�V‰VŽXˆÜ�aœ×Ñ  Q£Ùà˜‘d˜6™9‘nÑ$ŠFñ	 ô �&Ó!€Fô ˜¨Ñ.€KÜ
ˆ;Ó˜5Ó Ü27¸¿¹»Ô2HÓIÒ2H¨Q”v˜fÖ(Ñ2HˆÐIäÑG°6×3DÑ3DÔ3FÓGÓGÔGÐô ˜Ó$€Ið €LØ€GØ€OäˆàÓ ÙØ —}‘} TÓ*ˆÜ�|×$ˆAÞ Ø—‘˜q™t¤C¨©£KÑ/Ô0Ø!"¨! ˜~°Ñ<�ÙÜ˜“XˆFÜ˜“XˆFØ�z‰zœ%× Ñ  V§Z¡Z´×%6Ñ%6ð —‘˜q™t¤C¨©£KÑ/Ô0Ø!"¨! ˜~°Ñ<’àÓ*Ø%&¨°Ð$7Ð#8¸<Ñ#G�LÙØ˜Q“;Ø—N‘N 1¡4¬¨F°1©H«Ñ#5Ô6Ø%&¨° NÐ#3°lÑ#B�LÙØ×&Ñ&¤y°£Ô7Ø—‘˜q™t¤C¨¨q©£MÑ1´C¼¸F»Àa¹Ó4HÑHÔIØ—‘˜q™t¤C¨¨q©£MÑ1´C¸FÀa¹KÓ4HÑHÔIð "# F¨FÐ 3Ð4°|ÑC“ô3 %ñ ð> Ð Ð ùòW Js   Â)J(c           
      ód  • UR                   nUR                  S   nUR                  [        S9  UR	                  5         [        U 5      S:X  a  U S   R                  U" U5      :X  d   eU S   R                  n [        U 5      n U Hd  u  pVn[        XU-  [        Xd-  5      -  [        [        U5      U-  5      -  5      n [        XU-  [        Xd-  5      -  [        Xt-  5      -  5      n Mf     U H"  u  pVn[        XU-  [        Xd-  5      -  5      n M$     [        U 5      n [        U" U5      U 5      $ )aP  
Helper function which collects the solution on
collectterms. Ideally this should be handled by odesimp.It is used
only when the simplify is set to True in dsolve.

The parameter ``collectterms`` is a list of tuple (i, reroot, imroot) where `i` is
the multiplicity of the root, reroot is real part and imroot being the imaginary part.

r   )Úkeyr%   )r*   r)   Úsortr   r?   rb   Úlhsrd   r	   r   r   r   rD   r   r    r
   )rk   r*   rM   r4   r3   rJ   rT   rU   s           r5   Ú_get_simplified_solr~   ø   s  € ð 	�	‰	€AØ�	‰	�!‰€AØ×ÑÔ*ÐÑ+Ø×ÑÔÜˆs‹8�q‹=˜S ™VŸZ™Z©1¨Q«4Ó/Ð/Ð/Ø
ˆa‰&�*‰*€CÜ
�S‹/€CÛ)Ñˆ�6Ü�c˜a™4¤ F¡H£Ñ-¬c´#°f³+¸a±-Ó.@Ñ@ÓAˆÜ�c˜a™4¤ F¡H£Ñ-¬c°&±(«mÑ;Ó<Šñ *ó *Ñˆ�6Ü�c˜a™4¤ F¡H£Ñ-Ó.Šñ *ä
�#‹,€CÜ‰a�‹d�C‹=Ðr7   Nc                 ó  ^^^	^
^^^• [        SU/S9m[        SU/S9m[        U SS9n 0 nS[        4U
UU4S jjm
[        5       4U	4S jjm	UU4S	 jmT
" X5      US
'   US
   (       a¡  [        5       n[        R
                  " U 5       Hy  nT	" Xa5      nT[        R                  LaJ  [        U4S jU 5       5      (       a0  U Vs1 s H  o�U-  iM	     nn[        U4S jU 5       5      (       a  M0  UR                  U5      nM{     XTS'   U$ s  snf )aP  
Returns a trial function match if undetermined coefficients can be applied
to ``expr``, and ``None`` otherwise.

A trial expression can be found for an expression for use with the method
of undetermined coefficients if the expression is an
additive/multiplicative combination of constants, polynomials in `x` (the
independent variable of expr), `\sin(a x + b)`, `\cos(a x + b)`, and
`e^{a x}` terms (in other words, it has a finite number of linearly
independent derivatives).

Note that you may still need to multiply each term returned here by
sufficient `x` to make it linearly independent with the solutions to the
homogeneous equation.

This is intended for internal use by ``undetermined_coefficients`` hints.

SymPy currently has no way to convert `\sin^n(x) \cos^m(y)` into a sum of
only `\sin(a x)` and `\cos(b x)` terms, so these are not implemented.  So,
for example, you will need to manually convert `\sin^2(x)` into `[1 +
\cos(2 x)]/2` to properly apply the method of undetermined coefficients on
it.

Examples
========

>>> from sympy import log, exp
>>> from sympy.solvers.ode.nonhomogeneous import _undetermined_coefficients_match
>>> from sympy.abc import x
>>> _undetermined_coefficients_match(9*x*exp(x) + exp(-x), x)
{'test': True, 'trialset': {x*exp(x), exp(-x), exp(x)}}
>>> _undetermined_coefficients_match(log(x), x)
{'test': False}

Úa)ÚexcludeÚbr   )ÚcombineÚreturnc                 ó>  >^• U R                  T5      (       d  gU R                  (       a   [        UU4S jU R                   5       5      $ U R                  (       a€  U R                  [
        [        5      (       aA  SnU R                   H/  nUR                  [
        [        5      (       d  M$  U(       a    gSnM1     [        UU4S jU R                   5       5      $ U R                  (       a\  U R                  [
        [        [        [        [        4;   =(       a-    [        U R                  S   R                  TT-  T-   5      5      $ U R                  (       aG  U R                  R                   (       a,  U R                  R"                  (       a  U R                  S:¼  a  gU R                  (       aE  U R                  R$                  (       a*  [        U R                  R                  TT-  T-   5      5      $ U R                   =(       d    [        U R$                  5      $ )zF
Test if ``expr`` fits the proper form for undetermined coefficients.
Tc              3   ó6   >#   • U  H  nT" UT5      v •  M     g 7frp   © ©rq   rJ   r6   r3   s     €€r5   rr   ÚG_undetermined_coefficients_match.<locals>._test_term.<locals>.<genexpr>B  ó   øé € Ð;²¨A‘z ! Q×'Ð'²ùó   ƒFc              3   ó6   >#   • U  H  nT" UT5      v •  M     g 7frp   r‡   rˆ   s     €€r5   rr   r‰   N  rŠ   r‹   r   )r.   Úis_Addru   r)   r-   r   r   Úis_Functionr*   r   r   r   ÚboolÚmatchr/   ÚbaseÚ	is_SymbolÚ
is_IntegerÚ	is_number)Úexprr3   Ú	foundtrigrJ   r6   r€   r‚   s    `  €€€r5   r6   Ú4_undetermined_coefficients_match.<locals>._test_term;  sT  ù€ ð �x‰x˜�{‰{ØØ�;�;ÜÕ;°·²Ó;Ó;Ð;Ø�;�;Ø�x‰xœœS×!Ñ!Ø!�	ð Ÿœ�AØ—u‘uœS¤#—“Þ$Ù#(à(,šIñ #ô Õ;°·²Ó;Ó;Ð;Ø××Ø—9‘9¤¤c¬3´´dÐ ;Ñ;÷ 5Ü˜Ÿ	™	 !™×*Ñ*¨1¨Q©3°©7Ó3Ó4ð5à�;�;˜4Ÿ9™9×.×.°4·8±8×3F×3FØ—‘˜A“ØØ�;�;˜4Ÿ9™9×.×.Ü˜Ÿ™Ÿ™ q¨¡s¨Q¡wÓ/Ó0Ð0Ø�~‰~×5¤ d§n¡nÓ!5Ð5r7   c                 ó  >• S n[        U 5      n U R                  (       aR  U R                   H@  nU" XA5      U;   a  M  UR                  U" XA5      5        UR	                  T" XAU5      5      nMB     U$ U" X5      nUR	                  U15      n[        5       nXV:w  ak  UR                  5       nU R                  U5      n U" X5      nUR                  (       a  UR	                  T" XAU5      5      nOUR                  U5        XV:w  a  Mk  UnU$ )aA  
Returns a set of trial terms for undetermined coefficients.

The idea behind undetermined coefficients is that the terms expression
repeat themselves after a finite number of derivatives, except for the
coefficients (they are linearly dependent).  So if we collect these,
we should have the terms of our trial function.
c                 óÚ   • [         R                  nU R                  (       a1  U R                   H  nUR	                  U5      (       d  M  X#-  nM!     U$ U R	                  U5      (       a  U nU$ )z}
Returns the expression without a coefficient.

Similar to expr.as_independent(x)[1], except it only works
multiplicatively.
)r   ÚOner-   r)   r.   )r•   r3   ÚtermrJ   s       r5   Ú_remove_coefficientÚU_undetermined_coefficients_match.<locals>._get_trial_set.<locals>._remove_coefficientb  sV   € ô —5‘5ˆDØ�{�{ØŸœ�AØ—u‘u˜Q—x“xØ™	šñ #ð
 ˆKð —‘˜!—‘Ø�ØˆKr7   )r	   r�   r)   ÚaddÚunionÚsetÚcopyr   )r•   r3   Úexprsrœ   r›   ÚtmpsetÚoldsetÚ_get_trial_sets          €r5   r¥   Ú8_undetermined_coefficients_match.<locals>._get_trial_setY  sð   ø€ ò	ô  ˜$ÓˆØ�;�;ØŸ	œ	�Ù& tÓ/°5Ó8Ùà—I‘IÑ1°$Ó:Ô;Ø!ŸK™K©°tÀÓ(FÓG’Eñ "ð* ˆñ ' tÓ/ˆDØ—[‘[ $ Ó(ˆFÜ“UˆFØÓ"ð  Ÿ™›�Ø—y‘y “|�Ù*¨4Ó3�Ø—;—;Ø#Ÿ\™\©.¸À&Ó*IÓJ‘Fà—J‘J˜tÔ$ð Õ"ð ˆEØˆr7   c                 óD   >• [        [        TTU 5      5      R                  $ )zYThis function checks whether the given trialset contains any root
of homogeneous equation)r   r&   Úis_zero)r›   Úeq_homogeneousr*   s    €€r5   Úis_homogeneous_solutionÚA_undetermined_coefficients_match.<locals>.is_homogeneous_solution‹  s   ø€ ô ”m N°D¸$Ó?Ó@×HÑHÐHr7   Útestc              3   ó4   >#   • U  H  nT" U5      v •  M     g 7frp   r‡   )rq   Útsrª   s     €r5   rr   Ú3_undetermined_coefficients_match.<locals>.<genexpr>œ  s   øé € ÐDÂ¸"Ñ1°"×5Ð5Âùs   ƒÚtrialset)
r   r    r�   r    r   Ú	make_argsr   r;   ÚanyrŸ   )r•   r3   r*   r©   ÚretdictÚtemp_setrJ   Úactr®   r¥   r6   r€   r‚   rª   s     ``     @@@@@r5   Ú _undetermined_coefficients_matchr¶     sü   þ€ ôH 	ˆS˜1˜#Ñ€AÜˆS˜1˜#Ñ€AÜ�4 Ñ'€DØ€Gð6œt÷ 6ñ 6ô< '*£e÷ 0ödIñ
 ! Ó)€GˆF�OØˆv‡ô “5ˆÜ—’˜tÖ$ˆAÙ  Ó&ˆCØ¤Q§V¡VÒ+ÜÔDÁÓD×DÑDÙ*-Ó.ª# B˜Rœ4©#�CÐ.ô ÔDÁÓD×DÓDà—~‘~ cÓ*ŠHñ %ð '�
ÑØ€Nùò	 /s   ÃD
c                 ól  • Un[        S[        S9n/ nUS   nUS   n	UR                  n
UR                  S   n[	        U5      U:w  a,  [        S[        U5      -   S-   S-   [        U 5      -   S	-   5      eSnU H&  n[        U5      nUR                  U5        XÎU-  -  nM(     [        X
" U5      U5      n[        [        [        US/[	        U5      S
-   -  5      5      5      n[        U5      n[        R                  " U5       HH  n[!        USU/S9nUR#                  UU   5      (       a  UUU   ==   US   -  ss'   M=  US   UUU   '   MJ     [%        [        UR'                  5       5      U5      nU(       d  [        SU -  5      eUR)                  U5      n[+        U
" U5      U	R,                  U-   5      $ )aï  
Helper function for the method of undetermined coefficients.

See the
:py:meth:`~sympy.solvers.ode.single.NthLinearConstantCoeffUndeterminedCoefficients`
docstring for more information on this method.

The parameter ``trialset`` is the set of trial functions as returned by
``_undetermined_coefficients_match()['trialset']``.

The parameter ``match`` should be a dictionary that has the following
keys:

``list``
A list of solutions to the homogeneous equation.

``sol``
The general solution.

r€   )Úclsr>   rk   r   r]   z9 solutions to the homogeneous equation necessary to applyz undetermined coefficients to r^   r%   T)ÚdictÚsymbolsr1   zfCould not solve `%s` using the method of undetermined coefficients (unable to solve for coefficients).)r"   r   r*   r)   rb   r`   ra   ÚnextrE   r&   r¹   r>   Úzipr   r   r±   r   Úgetr#   ÚvaluesÚsubsr
   rd   )rF   r*   r2   r�   r°   rg   ÚcoeffsÚ	coefflistrV   rP   r4   r3   Ú	trialfuncrJ   ÚcÚeqsÚ
coeffsdictÚsÚ	coeffvalsrh   s                       r5   Ú _solve_undetermined_coefficientsrÈ   ¤  sÆ  € ð* 	€AÜ˜c¤uÑ-€FØ€IØ�‰i€GØˆU‰8€DØ�	‰	€AØ�	‰	�!‰€Aä
ˆ7ƒ|�uÓÜ! .´3°u³:Ñ"=ØCñ#Dà(ñ#)ä+.¨r«7ñ#3ð 	&ñ#&ó 'ð 	'ð
 €IÛˆÜ�‹LˆØ×Ñ˜ÔØ�q‘SÑŠ	ñ ô
 ˜˜A˜a›D )Ó
,€Cä”dœ3˜x¨!¨¬c°(«m¸aÑ.?Ñ)@ÓAÓBÓC€Jä
�3‹-€Cä�]Š]˜3ÖˆÜ˜ °¨sÑ3ˆØ�>‰>˜!˜A™$×ÑØ�q˜‘tÓ  '¡
Ñ*Õà  ™zˆJ�q˜‘tÓñ  ô ”d˜:×,Ñ,Ó.Ó/°Ó;€IæÜ!ð2à46ñ7ó8ð 	8ð
 �>‰>˜)Ó$€Dä‰a�‹d�D—H‘H˜t‘OÓ$Ð$r7   )T)<Ú__doc__Úcollectionsr   Ú
sympy.corer   r   Úsympy.core.functionr   r   r   r	   Úsympy.core.relationalr
   Úsympy.core.sortingr   Úsympy.core.symbolr   r   Úsympy.functionsr   r   r   r   r   r   r   r   r   r   Úsympy.integralsr   Úsympy.polysr   r   r   r   Úsympy.simplifyr   r   r   r    r!   Úsympy.utilitiesr"   Úsympy.solvers.solversr#   Úsympy.matricesr$   Ú	subscheckr&   Úsympy.solvers.ode.oder'   r6   rY   rl   ry   r~   r;   r¶   rÈ   r‡   r7   r5   Ú<module>rÙ      sƒ   ðñ	õ  ß ß BÓ BÝ $Ý /ß )÷÷ ÷ å $ß 5Ó 5ß MÕ MÝ ,Ý 'Ý $Ý $Ý 8òò:?ôD0,òfD!òRð4 48ÈÏÉô Oód@%r7   