a
    lº”hh‡ ã                
   @   sF  d Z ddlmZ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 ddlmZmZ dd	lmZ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%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z-m.Z. ddl/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z> ddl?m@Z@ ddlAmBZBmCZC ddlDmEZEmFZF ddlGmHZHmIZImJZJmKZKmLZL ddlMmNZN ddlOmPZPmQZQ ddlRZRe8dƒZSe8dƒZTedƒZUe8dƒZVe7dƒZWe7dƒZXed ƒ\
ZYZZZ[Z\Z]Z^Z_Z`ZaZbed!ƒ\ZcZdZed"Zfd#Zgd$Zhd%Zid&Zjd'Zkd(d)„ Zld»d+d,„Zmd¼d-d.„Znd/d0„ Zod1d2„ Zpd½d3d4„Zqg dfd5d6„Zrd7d8„ Zsd9d:„ ZteQd;d<„ ƒZueQd=d>„ ƒZveQd?d@„ ƒZweQdAdB„ ƒZxdCdD„ ZyeQdEdF„ ƒZzeQdGdH„ ƒZ{eQdIdJ„ ƒZ|eQdKdL„ ƒZ}dMdN„ Z~eQdOdP„ ƒZdQdR„ Z€eQdSdT„ ƒZeQdUdV„ ƒZ‚eQdWdX„ ƒZƒdYdZ„ Z„eQd[d\„ ƒZ…eQd]d^„ ƒZ†eQd_d`„ ƒZ‡dadb„ ZˆeQdcdd„ ƒZ‰eQdedf„ ƒZŠeQdgdh„ ƒZ‹eQdidj„ ƒZŒdkdl„ ZeQdmdn„ ƒZŽeQdodp„ ƒZeQdqdr„ ƒZdsdt„ Z‘eQdudv„ ƒZ’dwdx„ Z“dydz„ Z”d{d|„ Z•eQd}d~„ ƒZ–dd€„ Z—dd‚„ Z˜eQdƒd„„ ƒZ™eld…d†„ ƒZšeld‡dˆ„ ƒZ›eld‰dŠ„ ƒZœeld‹dŒ„ ƒZelddŽ„ ƒZželdd„ ƒZŸeld‘d’„ ƒZ eld“d”„ ƒZ¡eld•d–„ ƒZ¢eld—d˜„ ƒZ£eld™dš„ ƒZ¤eld›dœ„ ƒZ¥elddž„ ƒZ¦eldŸd „ ƒZ§eld¡d¢„ ƒZ¨eld£d¤„ ƒZ©eld¥d¦„ ƒZªeld§d¨„ ƒZ«eld©dª„ ƒZ¬eld«d¬„ ƒZ­eld­d®„ ƒZ®eld¯d°„ ƒZ¯eld±d²„ ƒZ°eld³d´„ ƒZ±eldµd¶„ ƒZ²eld·d¸„ ƒZ³d¹dº„ Z´dS )¾a‚  
This File contains test functions for the individual hints used for solving ODEs.

Examples of each solver will be returned by _get_examples_ode_sol_name_of_solver.

Examples should have a key 'XFAIL' which stores the list of hints if they are
expected to fail for that hint.

Functions that are for internal use:

1) _ode_solver_test(ode_examples) - It takes a dictionary of examples returned by
   _get_examples method and tests them with their respective hints.

2) _test_particular_example(our_hint, example_name) - It tests the ODE example corresponding
   to the hint provided.

3) _test_all_hints(runxfail=False) - It is used to test all the examples with all the hints
  currently implemented. It calls _test_all_examples_for_one_hint() which outputs whether the
  given hint functions properly if it classifies the ODE example.
  If runxfail flag is set to True then it will only test the examples which are expected to fail.

  Everytime the ODE of a particular solver is added, _test_all_hints() is to be executed to find
  the possible failures of different solver hints.

4) _test_all_examples_for_one_hint(our_hint, all_examples) - It takes hint as argument and checks
   this hint against all the ODE examples and gives output as the number of ODEs matched, number
   of ODEs which were solved correctly, list of ODEs which gives incorrect solution and list of
   ODEs which raises exception.

é    )Ú
DerivativeÚdiff)ÚMul)ÚEÚIÚRationalÚpi)ÚEqÚNe)ÚS)ÚDummyÚsymbols)ÚimÚre)ÚLambertWÚexpÚlog)ÚasinhÚcoshÚsinhÚtanh)ÚcbrtÚsqrt)Ú	Piecewise)ÚacosÚasinÚatanÚcosÚsecÚsinÚtan)ÚEiÚerfi)Úhyper)ÚIntegralÚ	integrate)Úrootof)ÚFunctionÚSymbol)ÚairyaiÚairybiÚbesseljÚbesselyÚ
lowergamma)ÚNonElementaryIntegral)Úclassify_odeÚdsolve)ÚallhintsÚ_remove_redundant_solutions)ÚFirstLinearÚODEMatchErrorÚSingleODEProblemÚSingleODESolverÚNthOrderReducible)Úcheckodesol)ÚraisesÚslowNÚxÚuÚyÚfÚgzC1:11úa b cz^Hint did not match the example {example}.

The ODE is:
{eq}.

The expected hint was
{our_hint}z•Different solution found from dsolve for example {example}.

The ODE is:
{eq}

The expected solution was
{sol}

What dsolve returned is:
{dsolve_sol}zFsolution found is not correct for example {example}.

The ODE is:
{eq}a  solution returned by dsolve is incorrect when using {hint}.

The ODE is:
{eq}

The expected solution was
{sol}

what dsolve returned is:
{dsolve_sol}

You can test this with:

eq = {eq}
sol = dsolve(eq, hint='{hint}')
print(sol)
print(checkodesol(eq, sol))

zñdsolve raised exception : {e}

when using {hint} for the example {example}

You can test this with:

from sympy.solvers.ode.tests.test_single import _test_an_example

_test_an_example('{hint}', example_name = '{example}')

The ODE is:
{eq}

zãTested hint was : {hint}

Total of {matched} examples matched with this hint.

Out of which {solve} gave correct results.

Examples which gave incorrect results are {unsolve}.

Examples which raised exceptions are {exceptions}
c                    s   ‡ fdd„}|ƒ S )Nc                     sÒ   ˆ ƒ } g }| d D ]º}| d | d | d | d | d |   dg ¡| d |   d| d ¡|| d |   dd¡| d |   dd	¡| d |   d
d¡| d |   dd¡| d |   dd¡| d dœ}| |¡ q|S )NÚexamplesÚeqÚsolÚXFAILÚfuncr:   FÚsimplify_flagTÚcheckodesol_XFAILÚdsolve_too_slowÚcheckodesol_too_slowÚhint)rB   rC   rD   rE   Úexample_namer:   rF   rG   rH   rI   rJ   )ÚgetÚappend)ÚsolverrA   ÚexampleÚtemp©rE   © úQ/var/www/auris/lib/python3.9/site-packages/sympy/solvers/ode/tests/test_single.pyÚinnerŸ   s"    õz _add_example_keys.<locals>.innerrR   )rE   rT   rR   rQ   rS   Ú_add_example_keysž   s    rU   Fc                 C   sR   | D ]H}|s|d s|r"|d s"qt |d |dd}|d dkrt|d ƒ qd S )Nr:   rJ   T)Úsolver_flagÚ	xpass_msgÚ )Ú_test_particular_exampleÚprint)Zode_examplesÚrun_slow_testrO   ÚresultrR   rR   rS   Ú_ode_solver_testµ   s    r]   c                 C   sB   t tƒdg }tƒ }|D ]$}| d¡sd|v r0qt||| ƒ qd S )NÚdefaultÚ	_IntegralZseries)Úlistr1   Ú_get_all_examplesÚendswithÚ_test_all_examples_for_one_hint)ÚrunxfailZ	all_hintsÚall_examplesÚour_hintrR   rR   rS   Ú_test_all_hints¿   s    rg   c                    s0   t |ƒtkr"t‡ fdd„|D ƒƒS ˆ  |¡S d S )Nc                 3   s   | ]}ˆ   |¡V  qd S ©N)Údummy_eq)Ú.0Zsub_dsol©Úexpected_solrR   rS   Ú	<genexpr>Ë   ó    z"_test_dummy_sol.<locals>.<genexpr>)Útyper`   Úanyri   )rl   Ú
dsolve_solrR   rk   rS   Ú_test_dummy_solÉ   s    rr   c                 C   s*   t ƒ }|D ]}|d |kr
t| |ƒ q
d S )NrK   )ra   rY   )rf   rK   re   rO   rR   rR   rS   Ú_test_an_exampleÐ   s    rs   c              
   C   s¤  |d }|d }|d }| |d v }|d }dddœ}|d }	|d	 }
|d
 }|d }d}|r„| t ||ƒvr„tj||| d}t|ƒ‚| t ||ƒv r ||d< z4|s´t|||	| d}nt|ƒdkrÊ|d }n|}W nv tyF } z\g }||d< |sút ¡  t	jt
|ƒ| ||d|d< |r.|s.t|d ƒ ‚ d}W Y d }~n
d }~0 0 |r„|g kr„d}t|ƒtkr¦|D ]4}| t¡rŒt||ƒ }n||v}|rn qÒqnn,||v}|D ]}| t¡r²t||ƒ }q²|ròtj||||d}t|ƒ‚dd„ tt|ƒƒD ƒ}t|ƒdkrd}|s„|
s„t|||dd|kr„||d< d}tj| |||d}|rxtj||d}t|ƒ‚nd| |d< |r |r |d |  |d < |S )!NrB   rC   rK   rD   rE   rX   )ÚmsgrW   rF   rG   rH   rI   T)rO   rB   rf   Ú
match_list©ÚsimplifyrJ   é   r   Úexception_list)ÚerJ   rO   rB   rt   F)rO   rB   rC   rq   c                 S   s   g | ]}d ‘qS )©Tr   rR   ©rj   ÚirR   rR   rS   Ú
<listcomp>  rn   z,_test_particular_example.<locals>.<listcomp>r{   )Úsolve_for_funcÚunsolve_list)rJ   rB   rC   rq   )rO   rB   zAssertionError: zis now passing for the hintrW   )r/   Úhint_messageÚformatÚAssertionErrorr0   ÚlenÚ	ExceptionÚ	tracebackÚ	print_excÚexception_msgÚstrrZ   ro   r`   Zhasr   rr   Úexpected_sol_messageÚranger8   Údsol_incorrect_msgÚcheckodesol_msg)rf   Úode_examplerV   rB   rl   rO   ÚxfailrE   r\   rF   rG   rH   rI   ZxpassÚmessagerq   rz   Zexpect_sol_checkZsub_solZexpected_checkodesolrR   rR   rS   rY   ×   s‚    


rY   c                 C   sê   |g krt ƒ }g g g   }}}|D ]~}| |d v }|r<|s<q"|rBq"t| |ƒ}|| dg ¡7 }|| dg ¡7 }|| dg ¡7 }|d ur"|d }	|	dkr"t|d ƒ q"|d u ræt|ƒ}
t|ƒt|ƒ t|ƒ }tj| |
|||d}	t|	ƒ d S )NrD   ru   r€   ry   rt   rX   )rJ   ÚmatchedZsolveZunsolveÚ
exceptions)ra   rY   rL   rZ   r„   Úcheck_hint_msgr‚   )rf   re   rd   ru   r€   ry   rŽ   r   r\   rt   Úmatch_countÚsolvedrR   rR   rS   rc   '  s,    
rc   c                     sÚ  t ttƒ t¡ttƒtƒ} t| ƒ‰ tt‡ fdd„ƒ tt‡ fdd„ƒ tt‡ fdd„ƒ tt‡ fdd„ƒ t ttƒ t¡ttƒttƒ  ttƒtƒ} t| ƒ‰ tt‡ fdd„ƒ t| ƒ‰ ˆ  	¡ du sÆJ ‚t ttƒ t¡ttƒ ttƒtƒ} | j
dksöJ ‚t ttƒ td	¡ttƒ td
¡ ttƒ td¡ ttƒtƒ} | j
d	ksBJ ‚t ttƒ td¡ttƒ td
¡ ttƒd
  ttƒtƒ} | jdksŠJ ‚t ttƒ td¡tttƒ td
¡  ttƒd
  ttƒtƒ} | jdksÖJ ‚d S )Nc                      s   ˆ   ¡ S rh   )ÚmatchesrR   ©rN   rR   rS   Ú<lambda>F  rn   z&test_SingleODESolver.<locals>.<lambda>c                      s   ˆ   ¡ S rh   ©Zget_general_solutionrR   r—   rR   rS   r˜   G  rn   c                      s   ˆ   ¡ S rh   )Ú_matchesrR   r—   rR   rS   r˜   H  rn   c                      s   ˆ   ¡ S rh   )Z_get_general_solutionrR   r—   rR   rS   r˜   I  rn   c                      s   ˆ   ¡ S rh   r™   rR   r—   rR   rS   r˜   R  rn   Frx   é   é   é   T)r5   r>   r;   r   r6   r9   ÚNotImplementedErrorr3   r4   r–   ÚorderZis_autonomous)ÚproblemrR   r—   rS   Útest_SingleODESolverA  s&    *"<8<r¡   c                   C   s   t tƒ d S rh   )r]   Ú)_get_examples_ode_sol_linear_coefficientsrR   rR   rR   rS   Útest_linear_coefficientsf  s    r£   c                  C   s”   t tƒ t¡t tƒt  } t| t tƒƒ}tt tƒ t¡ t tƒ }t|t tƒƒ}d}d}||vrh||vslJ ‚||vr|||vs€J ‚ttƒ ttƒ d S )NÚ(1st_homogeneous_coeff_subs_dep_div_indepÚ(1st_homogeneous_coeff_subs_indep_div_dep)r>   r;   r   r/   r]   Ú>_get_examples_ode_sol_1st_homogeneous_coeff_subs_dep_div_indepÚ0_get_examples_ode_sol_1st_homogeneous_coeff_best)Zeq1Zc1Zeq2Úc2ZsdiZsidrR   rR   rS   Útest_1st_homogeneous_coeff_odej  s    r©   c                   C   s   t tdd t tdd d S ©NT)r[   )r]   r¦   r§   rR   rR   rR   rS   Ú,test_slow_examples_1st_homogeneous_coeff_odey  s    r«   c                   C   s   t tƒ d S rh   ©r]   Ú;_get_examples_ode_sol_nth_linear_constant_coeff_homogeneousrR   rR   rR   rS   Ú*test_nth_linear_constant_coeff_homogeneous  s    r®   c                   C   s   t tdd d S rª   r¬   rR   rR   rR   rS   Ú8test_slow_examples_nth_linear_constant_coeff_homogeneous„  s    r¯   c                   C   s   t tƒ d S rh   )r]   Ú%_get_examples_ode_sol_2nd_linear_airyrR   rR   rR   rS   Útest_Airy_equation‰  s    r±   c                   C   s   t tƒ d S rh   )r]   Ú_get_examples_ode_sol_lie_grouprR   rR   rR   rS   Útest_lie_group  s    r³   c                  C   sb   t tƒ t¡} tt tƒ |  ttd t tƒ td t tƒ d  ƒ }t|ƒdksVJ ‚ttƒ d S )Nrœ   rx   )Ú
factorableÚseparable_reducedÚ	lie_groupZseparable_reduced_Integral)r>   r;   r   r    r/   r]   Ú'_get_examples_ode_sol_separable_reduced)ÚdfrB   rR   rR   rS   Útest_separable_reduced’  s    8r¹   c                   C   s   t tdd d S rª   )r]   r·   rR   rR   rR   rS   Ú$test_slow_examples_separable_reduced›  s    rº   c                   C   s   t tƒ d S rh   )r]   Ú,_get_examples_ode_sol_2nd_2F1_hypergeometricrR   rR   rR   rS   Útest_2nd_2F1_hypergeometric   s    r¼   c                  C   s
  t t d  tt ƒ t d¡ dtdƒd t   tt ƒ t ¡  tt ƒ } ttt ƒtttttdt d  t t d   t ƒƒdt d  d  t ƒ  ttdt d  t ƒd ƒ ttdt d  t ƒ d ƒ t	tdƒd dfdt ƒ ƒ}|t
| ddksòJ ‚t| |ƒd	ksJ ‚d S )
Nrx   rœ   éÿÿÿÿé   r›   )rx   Z2nd_hypergeometric_Integral)rJ   r{   )r;   r>   r   r   r	   ÚC1ÚC2r$   r   r#   r0   r8   ©rB   rC   rR   rR   rS   Ú$test_2nd_2F1_hypergeometric_integral¥  s,    F0ÿÿÿÿÿÿÿÿþrÂ   c                   C   s   t tƒ d S rh   )r]   Ú8_get_examples_ode_sol_2nd_nonlinear_autonomous_conservedrR   rR   rR   rS   Ú'test_2nd_nonlinear_autonomous_conserved®  s    rÄ   c               
   C   sÜ   t tƒ td¡tt tƒƒ } ttdttdtttƒtƒ  ƒ tt tƒfƒt	t ƒttdttdtttƒtƒ  ƒ tt tƒfƒt	t ƒg}t
| ddd}t||ƒD ]\}}| |¡s J ‚q t| dd„ |D ƒƒddgksØJ ‚d S )	Nrœ   rx   Ú+2nd_nonlinear_autonomous_conserved_IntegralF©rJ   rw   c                 S   s   g | ]}|  ¡ ‘qS rR   )Zdoit)rj   ÚsrR   rR   rS   r~   »  rn   zDtest_2nd_nonlinear_autonomous_conserved_integral.<locals>.<listcomp>r{   )r>   r;   r   r   r	   r$   r   r¿   Ú_urÀ   r0   Úzipri   r8   )rB   Úactualr•   ÚarÇ   rR   rR   rS   Ú0test_2nd_nonlinear_autonomous_conserved_integral³  s    44ÿrÌ   c                   C   s   t tƒ d S rh   )r]   Ú'_get_examples_ode_sol_2nd_linear_besselrR   rR   rR   rS   Útest_2nd_linear_bessel_equation¾  s    rÎ   c                  C   sˆ   t tƒt tƒt tƒ t¡  } tt tƒttƒƒtt tƒtttt ƒ ƒg}t| |dtƒ}|tt tƒtttt ƒ ƒgks|J ‚tt	ƒ d S ©Nrœ   )
r>   r;   r   r	   r   r¿   rÀ   r2   r]   Ú#_get_examples_ode_sol_nth_algebraic)ZeqnZsolnsZsolns_finalrR   rR   rS   Útest_nth_algebraicÃ  s    ÿ$rÑ   c                   C   s   t tdd d S rª   ©r]   Ú2_get_examples_ode_sol_nth_linear_var_of_parametersrR   rR   rR   rS   Ú>test_slow_examples_nth_linear_constant_coeff_var_of_parametersÎ  s    rÔ   c                   C   s   t tƒ d S rh   rÒ   rR   rR   rR   rS   Ú0test_nth_linear_constant_coeff_var_of_parametersÓ  s    rÕ   c                  C   s²   d} t tƒ td¡dt tƒ td¡  t tƒ t¡ dt  ttt ƒ }t|t tƒ| dd}t|t tƒ| dd}||ks~J ‚t||dddd	ks–J ‚t||dddd	ks®J ‚d S )
NZ:nth_linear_constant_coeff_variation_of_parameters_Integralé   rœ   r   TrÆ   F©rŸ   r   r{   )r>   r;   r   r   r   r0   r8   )rf   rB   Zsol_simpZ	sol_nsimprR   rR   rS   Ú@test_nth_linear_constant_coeff_variation_of_parameters__integral×  s    FrØ   c                   C   s   t tdd d S rª   ©r]   Ú_get_examples_ode_sol_1st_exactrR   rR   rR   rS   Útest_slow_examples_1st_exactå  s    rÛ   c                   C   s   t tƒ d S rh   rÙ   rR   rR   rR   rS   Útest_1st_exactê  s    rÜ   c                  C   sb   t ttƒƒttttƒƒ ttƒd  ttƒ t¡  } t| ttƒddd}t| |ddds^J ‚d S )Nrœ   FZ1st_exact_Integralrv   rx   r×   )r   r>   r;   r   r   r0   r8   )rB   Zsol_1rR   rR   rS   Útest_1st_exact_integralï  s    6rÝ   c                   C   s   t tdd d S rª   )r]   Ú)_get_examples_ode_sol_nth_order_reduciblerR   rR   rR   rS   Ú&test_slow_examples_nth_order_reducibleõ  s    rß   c                   C   s   t tdd d S rª   )r]   Ú:_get_examples_ode_sol_nth_linear_undetermined_coefficientsrR   rR   rR   rS   ÚFtest_slow_examples_nth_linear_constant_coeff_undetermined_coefficientsú  s    rá   c                   C   s   t tdd d S rª   ©r]   Ú_get_examples_ode_sol_separablerR   rR   rR   rS   Útest_slow_examples_separableÿ  s    rä   c                  C   sF   t tttƒtƒtttƒ tj t ƒ} d}|t| ƒv s:J ‚tt	ƒ d S )NÚ3nth_linear_constant_coeff_undetermined_coefficients)
r	   r   r>   r;   r   r   ÚHalfr/   r]   rà   )rB   rf   rR   rR   rS   Ú8test_nth_linear_constant_coeff_undetermined_coefficients  s    &rç   c                  C   sJ  dd„ } t }| |tttƒ ttƒ|ttƒtƒ ƒdks:J ‚| |tttƒ ttƒ|ttƒtƒ ƒdkshJ ‚| ttƒ|ttƒtƒ |ttƒtdƒ ƒdksšJ ‚| |tttƒ tdƒ|tt ttƒ tdƒ ƒdksÒJ ‚| |ttƒtdƒ|ttƒtdƒ |ttƒtdƒ ƒdksJ ‚| |ttƒtdƒ|ttƒtdƒ ƒdks>J ‚ttƒ d S )Nc                 S   s   t t| ttƒtƒƒ ¡ S rh   )r7   r5   r>   r;   rš   )rB   rR   rR   rS   r˜     rn   z*test_nth_order_reducible.<locals>.<lambda>Frœ   r   r›   T)r   r=   r>   r;   r<   r]   rÞ   )ÚFÚDrR   rR   rS   Útest_nth_order_reducible  s    ..28>.rê   c                   C   s   t tƒ d S rh   râ   rR   rR   rR   rS   Útest_separable  s    rë   c                   C   sH   t ttdt ƒt ƒ tƒttttdt ƒ ƒtƒ ks<J ‚ttƒ d S rÏ   )r%   r   r>   r;   r   r$   r]   Ú _get_examples_ode_sol_factorablerR   rR   rR   rS   Útest_factorable   s    <rí   c                   C   s   t tdd d S rª   )r]   rì   rR   rR   rR   rS   Útest_slow_examples_factorable&  s    rî   c                   C   s   t tƒ d S rh   )r]   Ú_get_examples_ode_sol_riccatirR   rR   rR   rS   Útest_Riccati_special_minus2+  s    rð   c                   C   s   t tƒ d S rh   )r]   Ú*_get_examples_ode_sol_1st_rational_riccatirR   rR   rR   rS   Útest_1st_rational_riccati/  s    rò   c                   C   s   t tƒ d S rh   )r]   Ú_get_examples_ode_sol_bernoullirR   rR   rR   rS   Útest_Bernoulli4  s    rô   c                   C   s   t tƒ d S rh   )r]   Ú _get_examples_ode_sol_1st_linearrR   rR   rR   rS   Útest_1st_linear8  s    rö   c                   C   s   t tƒ d S rh   )r]   Ú#_get_examples_ode_sol_almost_linearrR   rR   rR   rS   Útest_almost_linear<  s    rø   c                  C   sà   d} t tttƒtƒt ttƒtttƒttƒ d  tttƒtƒd d  ttƒƒ}t tttƒtƒt tttƒttƒd  ttttƒtƒd  d  ttƒƒ}| |vs¨J ‚| |vs´J ‚| d |vsÄJ ‚| d |vsÔJ ‚ttƒ d S )NÚ	Liouvillerœ   r_   )r/   r   r>   r;   r]   Ú_get_examples_ode_sol_liouville)rJ   Znot_Liouville1Znot_Liouville2rR   rR   rS   Útest_Liouville_ODE@  s     .ÿÿ&ÿÿrû   c                  C   sÈ   t dƒ\} }}}}tdƒ}d}tt|ƒ|dƒ|d  dtt|ƒ|dƒ |d   dt|ƒ  }|t|ƒv snJ ‚|||ƒ || t||ƒ|ƒ  ||d  t||ƒ|dƒ  }|t|ƒv s¼J ‚ttƒ d S )Nz	x t a b cr=   Únth_linear_euler_eq_homogeneousr›   é   rœ   é$   )r   r'   r   r>   r/   r]   Ú'_get_examples_ode_sol_euler_homogeneous)r;   ÚtrË   ÚbÚcr=   rf   rB   rR   rR   rS   Ú*test_nth_order_linear_euler_eq_homogeneousO  s    @>r  c                  C   sê   t dƒ\} }t ddd\}}}}d}| d tt| ƒ| dƒ d| d  tt| ƒ| dƒ  d	t| ƒ  |  }|t|t| ƒƒv s~J ‚|| d  tt| ƒ| dƒ ||  tt| ƒ| ƒ  |t| ƒ  |t| ƒ  }|t|t| ƒƒv sÞJ ‚ttƒ d S )
Nzx tza b c dT©ÚintegerÚ<nth_linear_euler_eq_nonhomogeneous_undetermined_coefficientsr›   rý   rœ   rþ   )r   r   r>   r/   r   r]   Ú._get_examples_ode_sol_euler_undetermined_coeff©r;   r   rË   r  r  Údrf   rB   rR   rR   rS   ÚGtest_nth_order_linear_euler_eq_nonhomogeneous_undetermined_coefficients]  s    DJr
  c                  C   s  t dƒ\} }t ddd\}}}}d}t| d tt| ƒ| dƒ d|  tt| ƒ| ƒ  dt| ƒ  | d ƒ}|t|t| ƒƒv s~J ‚t|| d	  tt| ƒ| d	ƒ || d  tt| ƒ| dƒ  ||  tt| ƒ| ƒ  |t| ƒ  | t| ƒ ƒ}|t|t| ƒƒv süJ ‚ttƒ d S )
Nzx, tz
a, b, c, dTr  Ú:nth_linear_euler_eq_nonhomogeneous_variation_of_parametersrœ   é   é   r   )r   r	   r   r>   r/   r   r]   Ú$_get_examples_ode_sol_euler_var_parar  rR   rR   rS   ÚEtest_nth_order_linear_euler_eq_nonhomogeneous_variation_of_parametersk  s    Dhr  c                  C   s   dd„ t dƒD ƒ\} }}}}dttƒtdtttƒtƒ t dtd  tttƒttƒ  dƒtttƒttttddƒ   ƒgdœtd	ttƒ dtttƒtƒ t  dtd  tttƒttƒ  dƒtttƒtttƒ ttd	   ƒgdœtd
ttƒ dtttƒtƒ t  td tttƒttƒ  dƒtttƒttt	tƒ  td  ƒgdœtdttƒ dtttƒtƒ t  dtd  tttƒttƒ  td	 tttƒtttƒ  dƒtttƒttd  tt  t
td	   ƒgdœtdttƒ dtttƒtƒ t  dtd  tttƒttƒ  td	 tttƒtttƒ  dƒtttƒtd ttt	tƒ  t
t	tƒd    ƒgdœtd tttƒtdƒ ttttƒtƒ  dttƒ  tttƒttd  ttd	   ƒgdœttƒtd  ttƒ td¡ ttƒt ttƒ t¡  ttƒttƒ  tttƒttt	tƒƒ ttt	tƒƒ  ƒgddgdœtd ttƒ td¡ tttƒ t¡  ttƒ tttƒtt tt|    t
t|   tt|   tt|   tt|   ƒgddœttttƒ tttƒtttƒttt  t
t  ƒgdœdœ	dœS )Nc                 S   sJ   g | ]B}t td  dtd   dtd   dtd   dt  d |ƒ‘qS )	rÖ   é   r›   éG   r   éš   rœ   éx   rx   ©r&   r;   ©rj   ÚnrR   rR   rS   r~   |  rn   z;_get_examples_ode_sol_euler_homogeneous.<locals>.<listcomp>rÖ   rü   éýÿÿÿrœ   r   rÁ   r   r›   é   rx   iƒÿÿÿé=   r  é	   Z2nd_power_series_regularr  ©rB   rC   rD   T©rB   rC   rG   )	Zeuler_hom_01Zeuler_hom_02Zeuler_hom_03Zeuler_hom_04Zeuler_hom_05Zeuler_hom_06Zeuler_hom_07Zeuler_hom_08Zeuler_hom_09©rJ   rE   rA   )r‹   r>   r;   r	   r   r¿   rÀ   r   r   r   ÚC3r   r   ÚC4ÚC5ÚC6r   )Úr1Úr2Úr3Úr4Úr5rR   rR   rS   rÿ   z  sD    6 þB"þ>"þ\*þ\2þ4"þH*ý0Ný	þÓýrÿ   c                   C   s"  dt tƒttd tt tƒttƒ ttt tƒtƒ  dƒtt tƒttttƒ  ttƒd d  ƒgdœttd tt tƒttƒ dt tt tƒtƒ  dt tƒ  td ƒtt tƒtttt  tddƒtd    ƒgdœttd tt tƒttƒ ttt tƒtƒ  dt tƒ  ttƒt ƒtt tƒtttd   ttƒd d  ttƒd  t ƒgdœttd tt tƒttƒ dt tt tƒtƒ  dt tƒ  ttƒd ttƒ ƒtt tƒttd  ttd   tddƒttƒd   tdd	ƒttƒd   tdd
ƒttƒ  tddƒ ƒgdœttd tt tƒtttƒ dtd  tt tƒttƒ  dt tt tƒtƒ  dt tƒ  ttƒƒtt tƒtt ttd   ttd   tddƒttƒ  tddƒ ƒgdœdtd  t tƒ td¡ t tƒ t	dt ƒt
tdt ƒd ƒ  tt tƒt	tƒtt
ttƒd ƒ ttttƒd ƒ  t	dƒttƒ ttdt ƒd ƒ d   ƒgdœdtd  t tƒ td¡ t tƒ t
tdt ƒd ƒ tt tƒtt	tƒ t
ttƒd ƒ tt	tƒ tttƒd ƒ  dt
tdt ƒd ƒ d  dttdt ƒd ƒ d  ƒgdœdœdœS )Nr  rœ   rx   rÁ   r   r›   r  é   é    é@   r¾   é   r  é   rþ   rÖ   )Zeuler_undet_01Zeuler_undet_02Zeuler_undet_03Zeuler_undet_04Zeuler_undet_05Zeuler_undet_06Zeuler_undet_07r  )r>   r;   r	   r   r¿   rÀ   r   r   r  r   r   r   rR   rR   rR   rS   r  µ  s2    .*þB,þB:þNjþ`FþBbþ6zþàýr  c                   C   s  dt tƒttd tt tƒttƒ dt tt tƒtƒ  dt tƒ  td ƒtt tƒtttt  td d   ƒgdœtdtd  tt tƒttƒ dt tt tƒtƒ  dt tƒ  td ttƒ ƒtt tƒttd  tt  tttƒ d  dttƒ d  dttƒ dt   dttƒ dtd    ƒgdœttd tt tƒttƒ dt tt tƒtƒ  dt tƒ  td ttƒ ƒtt tƒtttt  tttƒ  dttƒ   ƒgdœtd tt tƒttƒ dt tt tƒtƒ  dt tƒ  ttƒ tt tƒtt ttd   ttƒd  t	ddƒ ƒgdœttƒ ttt tƒtdfƒ tt tƒtƒ t  tt tƒttttƒ  ttƒ t
tƒ ƒgdœtd t tƒ td¡ tt tƒ t¡  dt tƒ  dt  tt tƒttdttƒ ƒ ttdttƒ ƒ  dd	t   ƒgdœd
œdœS )Nr  rœ   r›   r   r  rÁ   r  rx   rÖ   )Zeuler_var_01Zeuler_var_02Zeuler_var_03Zeuler_var_04Zeuler_var_05Zeuler_var_06r  )r>   r;   r	   r   r¿   rÀ   r   r   r   r   r!   r   r   rR   rR   rR   rS   r  â  s,    B&þNjþJ2þ@4þ0*þ<>þæýr  c                   C   sä   dt tƒttt tƒ t¡ t tƒ t tƒd  dƒtt tƒdtt d  ƒgdgdœt tƒ t¡tt tƒ  tt tƒtttt ƒ ƒgdœt tƒt tƒ t¡ d tt tƒttdt  ƒ ƒtt tƒttdt  ƒƒgdœdœd	œS )
NÚ	Bernoullirœ   r   rx   rµ   r  rÁ   )Zbernoulli_01Zbernoulli_02Zbernoulli_03r  )r>   r;   r	   r   r¿   r=   r   r   rR   rR   rR   rS   ró   	  s    *ýþ4þôýró   c                   C   s†   dt tƒddt tƒ t¡ t tƒd  t tƒt  dtd   tt tƒtdƒ tttdƒttƒ d  ƒ d dt  ƒgdœidœS )	NZRiccati_special_minus2Z
riccati_01rœ   r   éþÿÿÿr›   rÁ   r  )r>   r;   r   r	   r   r    r¿   r   rR   rR   rR   rS   rï   #  s    4<þÿýrï   c                   C   sn  dt tƒtt tƒ t¡t tƒd  d dƒtt tƒtdƒt tdtdƒ t ƒ  ttdtdƒ t ƒ  ƒgdœt tƒd tt tƒtƒ dt tƒ t  dtd   tt tƒdt t ttt   ƒgdœdtd  tt tƒtƒ tdt tƒ tt tƒtƒ d   t tƒd t tƒ  tt tƒtdtd   tt  ƒgdœt tƒ t¡d d	t tƒ  t tƒd  tt tƒdt d
ttƒ  tttƒ  ƒgdœtd dt dt  t tƒ  t tƒd  tt tƒtƒ tt tƒtttd  d  ttd  d  ƒgdœtd tt tƒtƒ td  tdt tƒd  tt tƒtƒ   t tƒ tt tƒttt t d  ttd  d  ƒgdœt tƒd  tt tƒtƒ dtd  dt  d td d dt d d    tt tƒdt t dt  dtd	   dtd   dtd
   dtd   dt  d dt td  dt t  d
t  dtd   dtd	   dtd   dtd
   dtd   d
t  d  ƒgdœtt tƒtƒd
td  d t tƒd  t  dtd  t d
 t tƒ ttd    d
td  dt  d ttd d    tt tƒt td
  td  dt  d tt t td  td
  td  dt  d  ƒgdœtt tƒtƒdt t tƒd d  t  tt tƒt t ttd   t ttd  d  ƒgdœttt tƒtƒtt tƒ t	d
ƒd dt   td t	dƒd
  t tƒd  dt d
 t	dƒd    t	d	ƒd  dtd  dt  d dtd
  dtd     ƒtt tƒdt td  dt td   d t td   d!t td"   d#t td$   d%t td   d&t td   d't td   d(t td   d)t td	   d*t td   d+t td
   d,t td   d-t t  d.t  ttdt ƒ  dtdt ƒ  td/t td  d0t td   d1t td"   d2t td$   d3t td   d%t td   d4t td   d5t td   d6t td	   d7t td   d8t td
   d9t td   d9t t  d:t  tdt ƒ   ƒgdœd;œ
d<œS )=NZ1st_rational_riccatirœ   r   rÁ   r›   r-  rx   r  rÖ   r   é   é   r¾   r  é<   é^   éH   é!   r  é   é9   é:   é   i  iì  iô  r'  r  é(   r  rý   i¤  i|  r+  i0H  é
   i– iFî i4å" i˜<… iî±i2Òi"0Â	iÐimë–i…^Èé   éŒ   iH  i  i<Z  i8X iÄ4 iLžB i¾‹¦ i|Mi:£óiÑù )
Zrational_riccati_01Zrational_riccati_02Zrational_riccati_03Zrational_riccati_04Zrational_riccati_05Zrational_riccati_06Zrational_riccati_07Zrational_riccati_08Zrational_riccati_09Zrational_riccati_10r  )
r>   r;   r	   r   r   r¿   r   r   r   r   rR   rR   rR   rS   rñ   2  sä    "Dþ4"þN"þ(*þ8.þF.þ@ÿÿJÿÿF
ÿ
ÿÿÿÿý	Jÿ&ÿJÿÿý(4þJÿ
ÿ.ÿFÿÿÿÿþþþþý
ýýýýPÿÿÿÿþþþ
þý
ýüýËýrñ   c                   C   s”   dt tƒdtt tƒ t¡tt tƒ  td ƒtt tƒttttd d ƒ  tdƒttƒ ttdƒt d ƒ d  ttd  d ƒ ƒgdœidœS )NÚ
1st_linearZ	linear_01rœ   rÁ   r  )	r>   r;   r	   r   r¿   r   r   r   r"   rR   rR   rR   rS   rõ     s    "\þÿýrõ   c                  C   sž
  t dƒ} tdƒ\}}}}}dttƒttƒttƒttƒ t¡  tttƒdƒtttƒtt ƒgg d¢dœttƒttƒ t¡ttƒt  d  tttƒttdƒttƒ t	tdƒt d ƒ  t
td  d ƒ ƒtttƒdƒgg d¢dœttƒ t¡ttƒtd   ttƒ td¡tttƒ   tttƒttt ƒ ttt ƒ  ƒtttƒtt
td	  d	 ƒ ƒgd
œttƒ t¡ttƒtd   ttƒ td¡ttƒ  tttƒtt
td	  d	 ƒ ƒtttƒtttƒ tttƒ  ƒgd
œttƒ t¡d d ttƒ t¡d d  tttƒtt ƒtttƒtt ƒtttƒtdt  ƒtttƒtdt  ƒgd
œttƒ td¡t
ttƒƒ ttƒ t¡ tttƒtt ttt ƒtt  ƒd  ƒƒtttƒtt ttt ƒtt  ƒd  ƒƒtttƒtƒgddœttƒ t¡d d ttƒttƒ t¡ d  tttƒtt ƒtttƒttdt  ƒ ƒtttƒttdt  ƒƒtttƒtt ƒgd
œtttƒtƒd dtttƒtƒd   d tttƒtt ƒtttƒtt ƒgd
œttƒd tttƒtƒd  dttƒd  tttƒtƒd   ttƒd tttƒtƒd   dttƒ tttƒtƒd   dttƒ tttƒtƒd	   dttƒ tttƒtƒ  tttƒtƒd  dtttƒtƒd   d tttƒtt ƒtttƒttdt  ƒ ƒtttƒttdt  ƒƒtttƒtt ƒgd
œtd ttƒd  dtd  ttƒ tttƒtdfƒ  td tttƒtdfƒd   dtd	  ttƒ tttƒtƒ  dtd	  tttƒtƒ tttƒtdfƒ  dtd  ttƒd   dtd  ttƒ tttƒtdfƒ  td tttƒtƒd   dt ttƒ tttƒtƒ  dttƒd   tttƒttdtƒ ttdtƒ  ƒtttƒtttd	ƒtƒ tttd	ƒtƒ  ƒgddœttƒ td¡t
ttƒƒ ttƒ td¡t
ttƒƒ  tttƒtttttdt ƒ tt  ƒd  ƒƒtttƒtttttdt ƒ tt  ƒd  ƒƒtttƒttdtttdt ƒ tt  ƒ  ƒƒtttƒttdtttdt ƒ tt  ƒ  ƒƒgddœt
ttƒ t¡ƒttƒd  ttdt| d ƒ | ttƒfƒtt ƒgdgdœttƒ t¡d ttƒd	  tttƒdtd dt t  td   ƒgdgdœttƒ t¡d ttƒ tttƒtd d tt d  td d  ƒgd
œttƒ t¡d ttƒd  tttƒtt
tƒ ƒtttƒtt
t ƒ ƒgd
œttƒ t¡d ttƒd	  tttƒdtd dt t  td   ƒgd
œttƒ t¡|td  |td	   |td   |t  | d  tttƒttdt||t  |td   |td	   |td   ƒ tƒ ƒgddœttdt ƒttttƒƒƒƒtttƒtttttdt ƒƒ tƒ ƒtttƒttttdt ƒƒtƒ ƒgddœtttƒtƒd td	  tttƒtdttddƒ  d  ƒtttƒtdttddƒ  d  ƒgd
œtttƒ td¡ tttƒ  tttƒtt
t ƒ tt
tƒ  ƒgd
œdœdœS )zß some hints are marked as xfail for examples because they missed additional algebraic solution
    which could be found by Factorable hint. Fact_01 raise exception for
    nth_linear_constant_coeff_undetermined_coefficientsr=   za0, a1, a2, a3, a4r´   r   )Ú	separableÚ	1st_exactr<  r,  Ú1st_homogeneous_coeff_bestr¥   r¤   r¶   r  Ú1nth_linear_constant_coeff_variation_of_parametersr  rå   r  rœ   )r,  r<  r¶   r   rÁ   rx   r›   T©rB   rC   r:   r  rÖ   r¾   r  r½   ©rB   rC   rH   r¶   g      à¿r  )Zfact_01Zfact_02Zfact_03Zfact_04Zfact_05Zfact_06Zfact_07Zfact_08Zfact_09Zfact_10Zfact_11Zfact_12Zfact_13Zfact_14Zfact_15Zfact_16Zfact_17Zfact_18Zfact_19Zfact_20r  )r   r   r>   r;   r   r	   r¿   r   r   r"   r   r)   rÀ   r*   r   r   r   r   r+   r,   r.   r$   r   r   )r=   Za0Za1Za2Úa3Za4rR   rR   rS   rì   Ž  s   ý$Pý8Dþ4@þ*Jþ(,,ýù.Tþ*"þ2ÿÿÿÿÿÿþÿþýýý*(þûFÿÿ ÿÿÿÿþÿþýýý$,þ÷60000üø(ý*ý.þ,þ*þ@LýJýFþ$þ€ ùýrì   c                  C   s¨  ddl m}  tddd}tdƒ}|tƒ t¡}d|tƒtd |tƒd  | |tƒd	  d
 t|tƒttd	t ƒ d
 t	d
d	ƒ ƒt|tƒdt
d	ƒt  ttd	t ƒ d
 t	d
d	ƒ  d ƒt|tƒdt
d	ƒt  ttd	t ƒ d
 t	d
d	ƒ  d ƒgdœt|tƒ | dt |tƒd   d
 t|tƒt
td| dt ƒ  tdt ƒ ƒ ƒt|tƒt
td| dt ƒ  tdt ƒ ƒƒgdœt| t|tƒ  d
 t|tƒt| tƒ tt ƒ ƒgdœtt|tƒƒ | t|tƒƒ d	t  t|tƒttt tt	d	dƒ  ƒƒgdœt|tt|tƒtƒ |tƒ   t|tƒtƒ |tƒ d t|tƒtttt|d
 dƒf| t | t d
 ttƒ |d
  dfƒ tt ƒ ƒgdœdœdœS )Nr   )r!   ÚAT©Zpositiver>   Zalmost_linearrœ   r   rx   r½   rÁ   r›   éüÿÿÿ)Zalmost_lin_01Zalmost_lin_02Zalmost_lin_03Zalmost_lin_04Zalmost_lin_05r  )Ú'sympy.functions.special.error_functionsr!   r(   r'   r;   r   r	   r¿   r   r   r   r   r   r   )r!   rD  r>   r	  rR   rR   rS   r÷   )  s<    &&::þþ	&\þ þ&$þ:8ÿÿþèýr÷   c                  C   s–  t dƒ} tdƒ}dttƒtttƒtƒt tttƒttƒd  tttƒtƒd d  tttƒttttt   ƒƒgdœttt	ttƒ ƒ ttƒtttƒttttt   ƒƒgdœtttƒtƒt tttƒttƒd  tttƒtƒd d  t	ttƒ ƒ t	ttƒƒ  
¡ tttƒttttt   ƒƒgdœtttƒttƒdttƒ tttƒtƒd   dt tttƒtƒ  tttƒtttttƒ  ƒ ƒtttƒtttttƒ  ƒƒgdœttttƒttƒ tttƒ tttƒtƒd   ttttƒtƒ  tttƒtttt	t ƒ  ƒ ƒtttƒtttt	t ƒ  ƒƒgdœttt	ttƒƒ  tt¡dƒtttƒtttt  ƒƒgdœtttƒtƒt tttƒttƒd  tttƒtƒd d  t	ttƒ ƒ t	ttƒƒ tttƒttttt   ƒƒgdœtd tttƒtƒ | ttƒ ttƒd  tttƒtƒd   tttƒtdfƒ tttttddƒtd d ƒ  tt	|d d ƒt	|d |  d ƒ |ttƒfƒ dƒgdœd	œd
œS )Nr  r=   rù   rœ   rÁ   rx   r   r   )Zliouville_01Zliouville_02Zliouville_03Zliouville_04Zliouville_05Zliouville_06Zliouville_07Zliouville_08r  )r(   r   r>   r;   r   r	   r   r¿   rÀ   r   Úexpandr   r-   r   r.   )r  Z_yrR   rR   rS   rú   T  s<    :þþXþB<þB@þþTþPXþÛýrú   c                  C   sð  t dƒ\} }}}tdƒ}tdƒ}dttƒttƒttƒ t¡ ttƒ tt¡ ttƒd  ttƒ t¡t  tttƒttd d  ƒtttƒttt  ƒgdœttƒttƒ t¡ ttƒ tt¡ ttƒd  tttƒttt  ƒgdœttƒttƒ t¡ ttƒ tt¡ tttƒttt  ƒgdœt|  ||ƒ |¡ t	ddƒ| |d  ||ƒ |¡ ||ƒ ||¡ ƒt||ƒtƒt||ƒtt|  | |d  d| |d    ƒg||ƒd	œdt
ttƒƒ ttƒ t¡ tttƒtƒgd
gdœtttƒƒt tttƒƒt  tttƒttd d  ƒtttƒttd d  ƒgdœttttƒtƒtttƒtƒƒtttƒtttƒ ƒgdœttƒ t¡t tttƒtt t ƒgdœttƒttƒ t¡ tttƒtƒgdœtttƒƒt tttƒƒt  tttƒttd d  ƒtttƒttd d  ƒgdœttƒttƒttƒ t¡  tttƒdƒtttƒtt ƒgg d¢dœttttƒ tttƒtttƒttt  ttd   t ƒgdgdœttttttƒtƒ tƒt ttƒƒtttƒttttƒ  ttƒ ttƒ ƒgdgdœtttƒ t¡dƒtttƒtƒgdœtdttƒ t¡ d dƒtttƒttt	ddƒ  ƒgdœtdttƒ t¡ dƒtttƒttt	ddƒ  ƒgdœtdttƒ t¡ d dƒtttƒttd  ƒgdœttttƒ t¡ d dƒtttƒtttƒ ƒgdœttƒ t¡tt| t ƒ  tttƒtt| t d t| t ƒ |d  t|d dƒftd d dfƒ ƒgdœttƒ t¡ tt| t ƒ  tttƒtt| t d t| t ƒ |d  t|d dƒftd d dfƒ ƒgdœtttƒ t¡ t¡td d td d  ƒtttƒttt  td d  dtd  d  dtd  d  dtd  d  ƒgttƒd	œttƒ t¡tttƒ t¡  tttƒttttƒ  ƒgttƒd	œttƒ t¡dt  dtd   tttƒtdt t  td  ƒgdœdœdœS )NzM m r tÚphiÚkZnth_algebraicrx   rœ   rÁ   r   ©rB   rC   rE   r=  r  r   )r=  r>  r<  r,  r?  r¥   r¤   r¶   rå   r  r@  r  rÖ   Tr/  r›   é   r  )Zalgeb_01Zalgeb_02Zalgeb_03Zalgeb_04Zalgeb_05Zalgeb_06Zalgeb_07Zalgeb_08Zalgeb_09Zalgeb_10Zalgeb_11Zalgeb_12Zalgeb_13Zalgeb_14Zalgeb_15Zalgeb_16Zalgeb_17Zalgeb_18Zalgeb_19Zalgeb_20Zalgeb_21Zalgeb_22Zalgeb_23r  )r   r'   r(   r>   r;   r   r	   r¿   rÀ   r   r   r   r?   r  r   r   r!   r   r
   )ÚMÚmÚrr   rI  rJ  rR   rR   rS   rÐ   ˆ  s¬    B.þ0þ$þ2ÿ>üý2þþþþ2þý&ý$*ýþþþþþRþ Rþ,Rýý "þ€ ýýrÐ   c                   C   sZ  dt tƒtttt tƒtƒd  tt tƒtdƒ dƒtt tƒttdt ƒtt tdt ƒ t ƒ  tdt ƒtttdt ƒ t ƒ  ƒgddœttƒ ttt tƒtdfƒ tt tƒtƒ t  tt tƒttttƒ  ttƒ t	tƒ ƒgddœttdƒt tƒ 
ttt¡ t tƒ 
t¡ dƒtt tƒtttdtddƒ t d ƒ  ttdtddƒ t d ƒ  ƒgddœt tƒ 
td¡dt tƒ 
t¡  tt tƒtttd	t ƒ  ƒgd
œt tƒ 
td¡t tƒ 
td¡ dt tƒ 
t¡  tt tƒtttdt ƒ  ttdt ƒ  ƒgddœt tƒ 
td¡t tƒ 
td¡ dt tƒ 
td¡  dt tƒ 
t¡  tt tƒtttd	t ƒ  tttƒ  ttdt ƒ  ƒgddœt tƒ 
td¡dt tƒ 
td¡  tt tƒttt  ttd   ttdt ƒ  ƒgddœt tƒ 
td¡dt tƒ 
td¡  tt tƒttt  tttdƒ t ƒ  tttdƒt ƒ  ƒgddœt tƒ 
td¡dt tƒ 
td¡  tt tƒttt  ttdt ƒ  ttdt ƒ  ƒgddœt tƒ 
td¡dt tƒ 
td¡  t tƒ 
t¡ tt tƒttt ttƒ  tttƒ  tt ttƒ  tttƒ  tttƒ  tttƒ  ƒgddœt tƒ 
td¡t tƒ 
t¡d  tt tƒttdƒtdtt  ƒ tt   ƒtt tƒttdƒtdtt  ƒ tt   ƒgddœttt tƒ tttƒtt tƒtttƒ tt tƒtttdtd dt  d dd  ttttdtd dt  d dd    ƒgddœdœdœS )NZnth_order_reduciblerœ   r   r½   TrA  r   r›   r-  rÁ   r  r  rÖ   rx   F)Úevaluate)Zreducible_01Zreducible_02Zreducible_03Zreducible_04Zreducible_05Zreducible_06Zreducible_07Zreducible_08Zreducible_09Zreducible_10Zreducible_11Zreducible_12r  )r>   r;   r	   r   r¿   r   rÀ   r   r   r!   r   r   r   r  r   r  r   r   rR   rR   rR   rS   rÞ      sv    *0"ÿü0*ý,Jý þ0.ý2ÿ:ü"2ý"@ý"6ý0^ý ,,ÿü	&,(ÿüºýrÞ   c               4   C   s  t t ƒ} ttƒ td¡}dttƒ td¡ d|  ttƒ t¡ ttƒ t }tdƒ}tdtd}tddd	\}}}}}	td
ƒ}
dttƒ|t|   tttƒtt td ƒ t t	tt
td d  dt d    t t ƒ  d ƒgddœ||  tttƒtt td ƒ t t	tt
td    t t ƒ  d ƒgddœ|dttƒ t¡  dttƒ  d tttƒt	t dt ƒ t
t t ƒ  d ƒgddœ|dttƒ t¡  dttƒ  dt tƒ  tttƒt	t dt ƒ t
t t ƒ  dt tƒ  ƒgddœ|dttƒ t¡  dttƒ  t tt ƒ tttƒtdƒd td  t	t dt ƒ t
t t ƒ  tt tt ƒ   ƒgddœ|dttƒ t¡  dttƒ  ttƒ tttƒt	t dt ƒ t
t t ƒ  ttƒd  dttƒ d  ƒgddœ|dttƒ t¡  dttƒ  ttƒ tttƒt	t dt ƒ t
t t ƒ  dttƒ d  ttƒd  ƒgddœ|dttƒ t¡  dttƒ  ddt tƒ  dttƒ   tttƒt	t dt ƒ t
t t ƒ  t tƒ ttƒd  dttƒ d  d ƒgddœ|ttƒ t¡ ttƒ td  tttƒdt td  t	tttdƒ d ƒ t
tttdƒ d ƒ  t t d ƒ  ƒgddœ|dttƒ t¡  dttƒ  dt t tƒ  dt t ƒ  tttƒt t tƒ dt t ƒ  t	t dt ƒ  t
t dt ƒ  ƒgddœ|dttƒ t¡  dt dt ƒ ttƒ  tttƒt	t
t dt ƒ  dt dt ƒ ttƒ d  t dt ƒttƒ d  ƒgddœttƒ td¡d|  ttƒ t ttƒ tttƒtttƒd  t	t
t  t t ƒ  ttt  t tƒ  ƒgddœ|ttƒ t¡ td  dt  tttƒt	td d  t
t t ƒ  ƒgddœ|ttƒ t¡ t tdt ƒ tttƒt	t tdt ƒd  tdt ƒd  td d  t
t t ƒ  ƒgddœ|ttƒ dt ttƒ  tttƒt	td  ttƒ t
t ttƒ  ƒgddœ|dttƒ  ttdt ƒ  tttƒt	td d  tdt ƒ t
td  tdt ƒ  ƒgddœ|dttƒ t¡  ttƒ td t t ƒ  tttƒt	tt
td d    t t ƒ ƒgddœttƒ td¡d|  dttƒ t¡  ttƒ dt t ƒ  td t t ƒ  tttƒt	tt
tttd d  td      t t ƒ ƒgddœ|dttƒ t¡  dttƒ  t dt ƒ td  tttƒt
t t ƒ td d  ttddƒ  t	t t dt ƒ  tddƒ ƒgddœ|dttƒ t¡  dttƒ  tt t ƒ  tttƒt	t tƒ t
t dt ƒ  dt d t t ƒ d  ƒgddœ|ttƒ t¡ dttƒ  t t dt ƒ tttƒtddƒtd  t
t dt ƒ  t	td  t dt ƒ  ƒgddœ|ttƒ ttƒ t t ƒ tttƒt
ttƒ t	td  ttƒ  t t ƒd  ƒgddœttƒ td¡d|  dttƒ t¡  ttƒ t tƒ tttƒt	tt
tttd      t tƒ ƒgddœ|ttƒ tj tdt ƒd  tttƒtjtdt ƒd  t	ttƒ  t
ttƒ  ƒgddœttƒ td¡ttƒ t¡ t dt ƒtjtdt ƒd    tttƒt	t
t t ƒ  tt tƒ  dtdt ƒ dtdt ƒ  d t dt ƒ d   ƒgddœttƒ td¡dttƒ td¡  ttƒ t¡ dt  ttƒ ttƒ tttƒt	td  t
tttd    ttƒ  ttttd    ttƒ  ƒgddœ|ttƒ ttƒd  tdt ƒd  tttƒtdt ƒd t
ttƒ  t	td  ttƒ  ƒgddœttƒ t¡d tttƒt	t ƒgddœ|ttƒ t¡ t tt	 ƒ tttƒt
tt t ƒ  t t	 t ƒd  ƒgddœttƒ td¡ttƒ t¡ ttƒ tttƒt	t
t t ƒ  tt tƒ  tttƒ d  ƒgd!œttƒ td¡d"ttƒ  tdt ƒ tttƒt	t d#t ƒ t
t dt ƒ  tdt ƒd$  ƒgd!œttƒ td¡ttƒ t¡ ttƒ t tƒ tttƒt	tt t ƒ  tttƒ d  t
td  t tƒ  ƒgd!œttƒ tt¡ttƒ tttd ƒ  tttƒt	ttƒ t
ttƒ  td ttd ƒ d  tttd ƒ d  ƒgd!œttƒ td¡ttƒ td ttd ƒ  tttƒt	ttƒ t
ttƒ  td ttd ƒ d  td ttd ƒ d  td ttd ƒ d  dtd  ttd ƒ d  dt ttd ƒ d  ƒgd!œttƒ td¡ttƒ t td ƒ tttƒt
t t ƒ t	tt dƒ d  t tƒ  ƒgd!œttƒ td¡ttƒ ttd ƒd  tttƒt	ttƒ t
ttƒ  tttd ƒ d  d ƒgd!œttƒ td¡dttƒ td¡  ttƒ t¡ dt  t tt ƒ tttƒt	td tt tt ƒ d d   t
tt  ttƒ  ttt  ttƒ  ƒgd!œt||ƒ ||¡|| ||ƒ |¡  d||  ||ƒ  |	ƒt||ƒ|| |	 t
t | |t||d  d|  ƒt|ƒ   d|  ƒ  t	t || t||d  d|  ƒt|ƒ   d|  ƒ  ƒg||ƒd%œt|| ||ƒ ||¡ || ||ƒ |¡  ||ƒ |t t|
 | ƒ ƒt||ƒt
t | |t||d  d|  ƒt|ƒ   d|  ƒ t	t || t||d  d|  ƒt|ƒ   d|  ƒ  |t t|
 | ƒ || |
d  t| | |
  d   ƒg||ƒd%œttttƒtdƒdtttƒtƒ  ttƒ ttƒƒtttƒt	t
t  t tƒ ttƒd  ƒgd!œd&œ(d'œS )(Nrœ   r   rÖ   r   r<   )ÚclszR L C E_0 alphaTrE  Úomegarå   r:  r(  rx   rA  r  r›   r-  r  r9  r  r  r'  r0  r¾   rþ   r½   r  iëÿÿÿé   é‚   i  rÁ   é1   iùÿÿÿr8  rK  )(Zundet_01Zundet_02Zundet_03Zundet_04Zundet_05Zundet_06Zundet_07Zundet_08Zundet_09Zundet_10Zundet_11Zundet_12Zundet_13Zundet_14Zundet_15Zundet_16Zundet_17Zundet_18Zundet_19Zundet_20Zundet_21Zundet_22Zundet_23Zundet_24Zundet_25Zundet_26Zundet_27Zundet_28Zundet_29Zundet_30Zundet_31Zundet_32Zundet_33Zundet_34Zundet_35Zundet_36Zundet_37Zundet_38Zundet_39Zundet_40r  )r   r;   r>   r   r   r'   r(   r	   r  r¿   rÀ   r   r   r   r   r   r  r   ræ   r   r   r   )r?   Úf2r  r   r<   ÚRÚLÚCZE_0ÚalpharR  rR   rR   rS   rà   v  s^   
6
Pý@ý$,ý,4ý,Lý(Dý(Dý<Pý Xý>Fý,Rý*Dý (ý Lý.ý>ý.,ý>ÿ<ü4Pý.@ý,Dý8ý8.ý 8ý>\ý8ÿÿNü&:ýý.ý$8þ&:þ,@þ&Nþ*žþ"4þ&:þ
DVþ>L8ÿüJ@8ÿ6þû
2*þ€ Žýrà   c               $   C   sö	  t dƒ\} }d}d}d}|| }tdƒ}dttƒttƒ t¡ttƒ tttƒtttƒ ƒgdœtttƒ t¡ ttƒ tttƒtt ƒgdœttƒ t¡ttƒ tttƒtt	tƒ ƒgdœttƒd d	 td d	 ttƒ t¡  tttƒt
tttƒ ƒƒgdœttƒ t¡t
tƒ ttƒ d tttƒtt	tƒ d ƒgdœttƒ t¡d	tttƒƒ  d	 tt ttƒ t	ttƒƒ tƒgdœttƒtd  ttƒ t¡ ttƒd
  dtd  ttƒ t¡  tttƒt ttdt t t d  ƒ tt d	  d ƒtttƒt ttdt t t d  ƒ tt d	  d ƒgddœttƒd d	 dttƒ tttƒ  ttƒ t¡  tttƒtttd  dt t  dt  d	 ƒ ƒtttƒtttd  dt t  dt  d	 ƒƒgddœtttƒ ttƒ t¡ td	ttƒd  ƒ tttƒtttttƒƒ ƒƒgdddœttd	 ƒt
ttƒƒ t	ttƒƒttƒ t¡  ttttƒ tt	ttƒƒd	 ƒd  tt	ttƒƒd	 ƒd  t	ttƒƒ tƒgddœtt	ttƒƒ td tttƒƒ ttƒ t¡  |d tttƒƒ ttƒ t¡  tttƒttt|d  td  ƒ ƒ dt  ƒtttƒttt|d  td  ƒ ƒƒgddœttƒ t¡ttƒt
tƒ  tttƒtt	tƒ ƒgdœtd	 t	ttƒƒ ttƒ t¡ dt tttƒƒ  tttƒttttd dt  d	  tdt ƒ ƒ ƒtttƒtttd dt  d	  tdt ƒ ƒƒgdœttƒ t¡ttƒtttƒƒ t
tƒ  tttƒttttƒ ƒƒgdœtttƒ t¡ d	ttƒd  tttƒƒ  tttƒt
tt ƒƒgdddœttƒ t¡tttƒd	   tttƒdtttd  d ƒ  ƒgdœtttƒd ƒtd dt  d	  tttƒ ttƒ ttƒ t¡  tttƒttd	ttd  dt   ƒƒ ƒtttƒttd	ttd  dt   ƒƒƒgdœttƒ t¡ttƒ tttƒttt ƒ ƒgdœttƒt	dttƒ ƒ t	tƒtdttƒ ƒ ttƒ t¡  tttƒtttt	tƒd  ƒd  ƒtttƒttt	tƒd  ƒd ƒgdœd	t ttƒ t¡ tttƒd	   tttƒttt ƒ t d	 td	  ƒgdœttƒtttƒtƒ t d
t ttƒd   tttƒtd
ƒ tttd
td  ƒ d	 ƒ d
 ƒtttƒtd
ƒtttd
td  ƒ d	 ƒ d
 ƒgdœttƒ t¡ttttƒ ƒ tttƒtdtttƒ  ƒƒgdgdœtttƒ t¡ d	 ttƒd  tttƒt td  t td   ƒgdœt| ƒ | ¡d	dt t| ƒ   tt| ƒdtttd|    ƒ d t ƒgt| ƒdœttƒ t¡tttƒ  tttƒtttt ƒ ƒgdœ|||| ƒd   |t|| ƒƒ  t|| ƒdttd|   ƒ ƒg|| ƒddœttƒ t¡tttƒt ƒ tttƒtttƒ tttƒ d	  ƒƒgdœdœdœS )Nza,té`   gš™™™™™#@gš™™™™™É?Úvr=  rÁ   rœ   rx   r   r›   TrA  )rB   rC   r:   rG   r½   r¶   r  gfffff†I@gÃXvH”?rK  g	ý‡Q|%QÀg+RÕ4JÂ?)rB   rC   rE   rG   )Zseparable_01Zseparable_02Zseparable_03Zseparable_04Zseparable_05Zseparable_06Zseparable_07Zseparable_08Zseparable_09Zseparable_10Zseparable_11Zseparable_12Zseparable_13Zseparable_14Zseparable_15Zseparable_16Zseparable_17Zseparable_18Zseparable_19Zseparable_20Zseparable_21Zseparable_22Zseparable_23Zseparable_24Zseparable_25Zseparable_26Zseparable_27r  )r   r'   r>   r;   r   r	   r¿   r   r   r   r    r   r   r   r   r   r   r   r   r=   rÀ   r   r   )r   rË   rN  r?   rJ  Úf1r\  rR   rR   rS   rã   ~  sè    þþþ(þ þ  þB::ÿü420ÿü,ü0NýR0&þú
þ440þþ	(þ,ü$þD*(þþ	þ<Fþ$(þ,20ÿþý &þ *ýþ"ü	(þ€ áýrã   c                   C   sˆ  dt tƒttƒtt tƒƒ ttƒtt tƒƒ t tƒ t¡  tt tƒttttƒ ƒ dt  ƒtt tƒttttƒ ƒƒgddœdt t tƒ d t tƒ t tƒt t tƒd  t tƒ t¡  tt tƒt	ttd  t
t t	t td  ƒ ƒ ƒƒgdgdddœdt t tƒttƒ  dt tƒ ttƒ tt tƒƒ t tƒ t¡  tt tƒttƒ tt tƒƒ td  t tƒd  tƒgdgddœtt tƒƒttt tƒƒ t tƒd  t tƒ t¡  tttt tƒƒ t tƒd	 d	  tƒgddœdt t tƒ td t tƒd  t tƒ t¡  ttd t tƒ t tƒd	 d	  tƒgdd
dœtt tƒƒttt tƒƒ t tƒd  t tƒ t¡  tttt tƒƒ t tƒd	 d	  tƒgd
dœtttd t tƒd  ƒ td t tƒ t tƒttd t tƒd  ƒ  t tƒ t¡  tttƒtdtdt tƒd td   ƒ tt tƒt ƒ dt tƒ t dtdt tƒd td   ƒ    dtdt tƒd td   ƒ tdtdt tƒd td   ƒt tƒ t  dt tƒd  td   ƒ dt tƒ t dtdt tƒd td   ƒ    dtt tƒt ƒ t tƒ tdt tƒ t dtdt tƒd td   ƒ     dt tƒ tdtdt tƒd td   ƒt tƒ t  dt tƒd  td   ƒ tdt tƒ t dtdt tƒd td   ƒ     ƒgdddœttd t tƒ t¡ d	t t tƒ  ttƒt  dƒtt tƒtttƒ td	  ƒgdœt tƒtd  t tƒt d t t tƒ t¡  dd„ dD ƒdœtt tƒ d t tƒ t¡td tt tƒ    tt tƒttttd  dttƒ  ƒ ƒtt tƒttttd  dttƒ  ƒ ƒgdœtd tt tƒƒ t tƒ t¡t tt tƒƒ  tt tƒttt	t ƒ td  ƒ t ƒtt tƒttt	t ƒ td  ƒƒgdœdœdœS )aÔ  
    Example 7 is an exact equation that fails under the exact engine. It is caught
    by first order homogeneous albeit with a much contorted solution.  The
    exact engine fails because of a poorly simplified integral of q(0,y)dy,
    where q is the function multiplying f'.  The solutions should be
    Eq(sqrt(x**2+f(x)**2)**3+y**3, C1).  The equation below is
    equivalent, but it is so complex that checkodesol fails, and takes a long
    time to do so.
    r>  rœ   TrA  rx   r¶   )rB   rC   rD   r:   rG   )rB   rC   rD   r:   r   F)rB   rC   r:   rF   ©rB   rC   rF   r  iåÿÿÿrS  )rB   rC   r:   rH   r   rÁ   c              	   S   s6   g | ].}t ttƒ|tttd   d ƒ d t ƒ‘qS )rœ   rx   )r	   r>   r;   r   r¿   r|   rR   rR   rS   r~   ƒ  rn   z3_get_examples_ode_sol_1st_exact.<locals>.<listcomp>)r½   rx   )Z1st_exact_01Z1st_exact_02Z1st_exact_03Z1st_exact_04Z1st_exact_05Z1st_exact_06Z1st_exact_07Z1st_exact_08Z1st_exact_09Z1st_exact_10Z1st_exact_11r  )r>   r;   r   r   r   r	   r   r¿   r   r   r   r   r   r   r   rR   rR   rR   rS   rÚ   2  s‚    4<ý@6û	D6ü4&ý0&ü	4&ýX>ÿFÿ.þÿNüR2ÿûÿõ6þ0þ0Rþ0Lþ·ýrÚ   c                  C   sú  t t ƒ} ttƒ td¡}dttƒ td¡ d|  ttƒ t¡ ttƒ t }dttƒ|t|   tttƒtt td ƒ t ttttd d  dt d    t t ƒ  d ƒgdd	œ||  tttƒtt td ƒ t ttttd
    t t ƒ  d ƒgdd	œttƒ t¡d tttƒtt ƒgdd	œ|dttƒ t¡  dttƒ  d tttƒtt dt ƒ tt t ƒ  d ƒgdd	œ|dttƒ t¡  dttƒ  dt tƒ  tttƒtt dt ƒ tt t ƒ  dt tƒ  ƒgdd	œ|dttƒ t¡  d
ttƒ  dt t tƒ  dt t ƒ  tttƒt t tƒ dt t ƒ  tt dt ƒ  tt dt ƒ  ƒgdd	œ|dttƒ t¡  ttƒ td t t ƒ  tttƒttttd d    t t ƒ ƒgdd	œ|dttƒ t¡  dttƒ  tt t ƒ  tttƒtt tƒ tt dt ƒ  dt d t t ƒ d  ƒgdd	œttƒ td¡d|  dttƒ t¡  ttƒ t tƒ tttƒttttttd      t tƒ ƒgdd	œ|dttƒ t¡  ttƒ t t ƒt  tttƒtttttƒ   t t ƒ ƒgdd	œ|ttƒ dt	tƒ d t
tƒ  tttƒttt	tƒd ƒd  tt	tƒd ƒd  t
tƒ ttt
tƒd ƒd  tt
tƒd ƒd  t	tƒ  ƒgdd	œttƒ td¡dt  tttƒttt  ttd   td tttƒd    ƒgdd	œttƒ td¡dttƒ td¡  ttƒ t¡ dt  t tt ƒ tttƒttd  ttttd
  dt tt ƒ d  dt t t ƒ d    dt dt t ƒ d  dt t tt ƒ  dt t t t ƒ  t	tƒ  ttttt d
  dt t tt ƒ d  dt t t t ƒ d    dt t dt t ƒ d  dt tt ƒ  dt t t ƒ  t
tƒ  tt tt ƒ  ƒgdœttƒ td¡dttƒ td¡  ttƒ t¡ t tt ƒ tttƒtttttd
    dt dt t ƒ d  t	tƒ  ttttt d
    dt t dt t ƒ d  t
tƒ  tt tt ƒ  ƒgdœtttƒttƒdttƒ  ttƒ tttƒttd  t	dt ƒd  t	dt ƒ ttt
tƒƒ dtt
tƒd ƒ d  dt
tƒd  d  t
dt ƒ  ƒgdd	œdœdœS )Nrœ   r   rÖ   r@  r:  r(  rx   TrA  r  r›   r-  r  r  r9  r  rþ   r'  rÁ   )Zvar_of_parameters_01Zvar_of_parameters_02Zvar_of_parameters_03Zvar_of_parameters_04Zvar_of_parameters_05Zvar_of_parameters_06Zvar_of_parameters_07Zvar_of_parameters_08Zvar_of_parameters_09Zvar_of_parameters_10Zvar_of_parameters_11Zvar_of_parameters_12Zvar_of_parameters_13Zvar_of_parameters_14Zvar_of_parameters_15r  )r   r;   r>   r   r	   r  r¿   rÀ   r   r   r   r  r   r   r   r   )r?   rV  r  rR   rR   rS   rÓ   “  sª    
6
Pý@ýý$,ý,4ý>Fý.,ý.@ý8.ý*(ý"2ÿ2ÿü:ýDâÿÿÿÿÿþ<Žþ"<ÿÿ
ÿü©ýrÓ   c                   C   sþ  dt tƒtd t tƒ td¡ tt tƒ t¡  td d t tƒ  tt tƒttdtƒ ttdtƒ  ƒgdœtd t tƒ td¡ tt tƒ t¡  td d t tƒ  tt tƒttdt tƒ ttdt tƒ  ƒgdœtd t tƒ td¡ tt tƒ t¡  td t tƒ  tt tƒttdtƒ ttdtƒ  ƒgdœtd t tƒ td¡ tt tƒ t¡  dtd  t	d	ƒd
  t tƒ  tt tƒttt	d	ƒd d
t ƒ ttt	d	ƒd d
t ƒ  ƒgdœtd t tƒ td¡ tt tƒ t¡  td d t tƒ  tt tƒttd	td d ƒ ttd	td d ƒ  ƒgdœtd t tƒ td¡ dt t tƒ t¡  td d t tƒ  tt tƒttt
dƒd td d ƒ ttt
dƒd td d ƒ  t
tƒ ƒgdœtd t tƒ td¡ tt tƒ t¡  td t	d	ƒd  t tƒ  tt tƒttt	d	ƒd tƒ ttt	d	ƒd tƒ  ƒgdœtd t tƒ td¡ dt t tƒ t¡  dt d t tƒ  tt tƒtd ttddt
tƒ ƒ ttddt
tƒ ƒ   ƒgdœtt tƒ td¡ t tƒ t¡ dtd  t tƒ  tt tƒtttt	d	ƒd td ƒ ttt	d	ƒd td ƒ   ƒgdœtd d t tƒ td¡ td t tƒ t¡  dtd d  t tƒ  tt tƒtd ttd	dt d ƒ ttd	dt d ƒ   ƒgdœt tƒ tt¡dt t tƒ t¡  t tƒ tt tƒttt	d	ƒd tƒ ttt	d	ƒd tƒ  t
tƒ ƒgdœtd t tƒ td¡ tt tƒ t¡  td td  td  td  t tƒ  tt tƒttt
td ƒtt
td td  ƒ ƒ ttt
td ƒtt
td td  ƒ ƒ  ƒgdœdœdœS )NZ2nd_linear_besselrœ   r›   rÁ   é   rÖ   r   éQ   rx   r  r   é   )Z2nd_lin_bessel_01Z2nd_lin_bessel_02Z2nd_lin_bessel_03Z2nd_lin_bessel_04Z2nd_lin_bessel_05Z2nd_lin_bessel_06Z2nd_lin_bessel_07Z2nd_lin_bessel_08Z2nd_lin_bessel_09Z2nd_lin_bessel_10Z2nd_lin_bessel_11Z2nd_lin_bessel_12r  )r>   r;   r   r	   r¿   r+   rÀ   r,   r   r   r   rË   r  r  rR   rR   rR   rS   rÍ   ü  sP    <&þ<.þ8&þH>þ<6þ@NþD6þ@>þ4BþH>þ,>þP^þÈýrÍ   c                   C   sÎ  dt tƒttd  t tƒ td¡ tdƒd dt  t tƒ t¡  dt tƒ  tt tƒtttdƒd   ttdƒd tdƒd ftdƒd ftƒ ttdtdƒ d ftƒ  ƒgdœttd  t tƒ td¡ tdƒd t t tƒ t¡  t tƒ tt tƒtdt tdƒd   ttdƒd dftdƒd fdt ƒ tttdƒ d d	ftdƒ d fdt ƒ  td tdƒd   ƒgdœttd  t tƒ td¡ tdƒtdƒd t  t tƒ t¡  t tƒ tt tƒtdt td
ƒd   ttdƒd dftdƒd fdt ƒ tttdƒ d dftdƒ d fdt ƒ  td td
ƒd   ƒgdœttdƒd   dttdƒd   d dttdƒd   d  tdƒt d   t tƒ dttdƒd   t d  ttdƒd  t d   tt tƒtdfƒ tt tƒttdƒd  tttdƒd   ttdƒd tdƒ d ftdƒd fttdƒd  ƒ tttdƒd td
ƒ d ftdƒd fttdƒd  ƒ   ttdƒd  d tdƒd   ƒgddœdœdœS )NZ2nd_hypergeometricrx   rœ   r   rÖ   r¾   )r½   r-  rÁ   r-  r+  rý   éûÿÿÿr  i`þÿÿiQ	  rU  i*  éÄ   r  é-   éb   r›   é   r  é   éT   Tr  )Z2nd_2F1_hyper_01Z2nd_2F1_hyper_02Z2nd_2F1_hyper_03Z2nd_2F1_hyper_04r  )	r>   r;   r   r   r	   r¿   r#   rÀ   r   rR   rR   rR   rS   r»   A  sJ    Hdþ@D,ÿÿþHD,ÿÿþjÿÿÿÿ`:ÿÿûîýr»   c                   C   s@  dt tƒt tƒ td¡tt tƒƒ tt tƒƒ ttdttdt	 tt	ƒ  dt	  dtt	ƒ  ƒ t	t tƒfƒt
t ƒttdttdt	 tt	ƒ  dt	  dtt	ƒ  ƒ t	t tƒfƒt
t ƒgddœt tƒ td¡tt tƒƒ dt tƒ  ttdƒtdtdt dt	tddƒ   dtt	ƒ  ƒ t	t tƒfƒ t
t ƒttdƒtdtdt dt	tddƒ   dtt	ƒ  ƒ t	t tƒfƒ t
t ƒgddœt tƒ td¡tt tƒƒ ttdttdtt	ƒ  ƒ t	t tƒfƒt
t ƒttdttdtt	ƒ  ƒ t	t tƒfƒt
t ƒgddœt tƒ td¡tt tƒƒ ttdttdtt	ƒ  ƒ t	t tƒfƒt
t ƒttdttdtt	ƒ  ƒ t	t tƒfƒt
t ƒgddœt tƒ td¡tt tƒƒ ttdttdt	 tt	ƒ  dtdt	d  ƒ  ƒ t	t tƒfƒt
t ƒttdttdt	 tt	ƒ  dtdt	d  ƒ  ƒ t	t tƒfƒt
t ƒgddgd	œd
œdœS )NZ"2nd_nonlinear_autonomous_conservedrœ   rx   Fr^  r   r›   rÅ   ©rB   rC   rF   rD   )Z%2nd_nonlinear_autonomous_conserved_01Z%2nd_nonlinear_autonomous_conserved_02Z%2nd_nonlinear_autonomous_conserved_03Z%2nd_nonlinear_autonomous_conserved_04Z%2nd_nonlinear_autonomous_conserved_05r  )r>   r;   r   r   r   r	   r$   r   r¿   rÈ   rÀ   r   r   r   r   r   r   r   rR   rR   rR   rS   rÃ   b  sF    &FFþú	&LLþú	..þú	..þú	FFþùßýrÃ   c                   C   s  t tƒ t¡} dt tƒt|  t tƒdtd t tƒ d    tttd t tƒ ƒd ttd t tƒ tddƒ ƒd  tttƒ ƒgddgdœt tƒ t¡t tƒtd	 t tƒ t   tttd t tƒ ƒd	 ttd t tƒ td	dƒ ƒd
  tttƒ ƒgdddœt|  t tƒtd t tƒ   tttd t tƒ ƒd ttd t tƒ d ƒd  tttƒ ƒgddœtt tƒ t¡t tƒt dttdƒd  t tƒ d    dƒtdtttdƒd  t tƒ ƒ dtdttd	ƒd   t tƒd  d ƒ d  tttƒ ƒgddœtt tƒ t¡t tƒt dtt tƒ d    dƒtt tƒtdƒ tdtttƒ  ƒ dt  ƒtt tƒtdƒtdtttƒ  ƒ dt  ƒgdœtt tƒ t¡td	 t tƒd  td t tƒ  t tƒ ttd t tƒd  td	 t tƒd      dƒtt tƒtddtd    ƒgdœtt tƒ t¡t tƒd t tƒ t  dƒtt tƒtdƒ tdtttƒ  ƒ d ƒtt tƒtdƒtdtttƒ  ƒ d ƒgdœtt tƒ t¡t tƒd t tƒ tt tƒd    dƒttt tƒd ƒ d dtt tƒƒ d  tttƒ ƒgddgdœtt tƒ t¡t tƒd t tƒ t  dƒtt tƒdttd  d  ƒgdœtt tƒ t¡t tƒd t tƒ t tƒ t  dƒtttƒ tt tƒd ƒ tt tƒƒ dt tƒ  tƒgdgdœt tƒ t¡t tƒtd	 t tƒ t   tt tƒtdƒ tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ d tdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   d	td   d	tdƒ td tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ   ƒ d  ddtd    ƒtt tƒtdƒ tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ d tdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   d	td   d	tdƒ td tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ   ƒ d  ddtd    ƒtt tƒtdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ d tdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   d	td   d	tdƒ td tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ   ƒ d  ddtd    ƒtt tƒtdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ d tdƒtddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   d	td   d	tdƒ td tddtddƒ  tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ  ddtddƒ  t	d
t ƒ tdt	d
t ƒ td  t	dt ƒ ƒt	d
t ƒtd   tddƒ   dtd   ƒ   ƒ d  ddtd    ƒgdddœtd t tƒd  tt
t tƒtƒ  tt tƒdt ttd  d  ƒgdœdœdœS )Nrµ   rx   rœ   r   r  Fr¶   ri  r›   r  T)rB   rC   rF   rG   r^  r   r  rÁ   r  iôÿÿÿr:  r  )rB   rC   rG   r:   )Zseparable_reduced_01Zseparable_reduced_02Zseparable_reduced_03Zseparable_reduced_04Zseparable_reduced_05Zseparable_reduced_06Zseparable_reduced_07Zseparable_reduced_08Zseparable_reduced_09Zseparable_reduced_10Zseparable_reduced_11Zseparable_reduced_12r  )r>   r;   r   r	   r   r   r¿   r   r   r   r   )r¸   rR   rR   rS   r·   •  s<   &Hü	(HüBý>^ý2.,ÿþjþ**(þþ	68ü*þ28ý	(hbÿ
ÿÿ^bÿ
ÿhbÿ
ÿþýþûhbÿ
ÿÿ^bÿ
ÿhbÿ
ÿþýþûfbÿ
ÿÿ^bÿ
þhbÿ
ÿþýþûfbÿ
ÿÿŠÿ
ÿÿÿ
ÿHÿÿbÿ
ÿÿþþüîæ$"þŸýr·   c                  C   s†  t dƒ\} }}dttƒtttƒ t¡ ttƒd  ttƒd  dttƒ  dt  g dddœtttƒ t¡ ttƒd  ttƒd  dttƒ  dt  g ddœttd tttƒtƒ d	td
  ttƒd   dtd  d ttƒd
   dƒg ddœttƒ t¡ttƒtttƒ  d td   ttƒ g dgdœttƒ t¡d tttƒtƒgdgdœtttƒ t¡td ttƒ ƒtttƒtttd
 ƒt	dd
ƒ  ƒgdœttƒ t¡| ttƒ  |t|t ƒ  tttƒt
t | |  |tt| |  ƒ  t|  t ƒ | |  t| | ƒft |t  t|  t ƒ dfƒƒgdœttƒ t¡dt ttƒ  tttd  ƒ  tttƒttd d  ttd  ƒ ƒgdœddt  ttƒ t¡ d dtttƒ ƒ  tttƒttdt d  d ƒƒgdœtd ttƒ t¡ ttƒ td ttdt  ƒ  tttƒtttƒ tdt ƒ ƒgdgdœtd ttƒd  ttttƒtƒ  tttƒdttd   ƒgdœtttƒtƒdt ttƒ  tttd  ƒ  tttƒttd  ƒttd d   ƒgdœtttƒtƒttƒttƒ  tdt ƒ tttƒtttƒ ƒtttdt ƒtttƒƒ tƒ  ƒgdœtttƒtƒttƒttƒ  tdt ƒd  tttƒttttƒ ƒ ttƒ d ƒgdœttttƒtƒ ttƒ tttƒ  tttƒttttƒ  ttƒ t ƒgdœttttƒtƒ ttƒ tttƒ  tttƒtttttƒƒ  ƒgdœttƒ t¡ttƒ ttƒ t¡ttƒ  tttƒtttƒ ƒtttƒttt ƒ ƒgdœttƒ t¡ttƒ t¡ttƒ  tttƒtttƒ ƒtttƒtƒgdœttƒ t¡ttƒ ttƒ t¡ttƒ  tttƒttt ƒ ƒtttƒtttƒ ƒgdœttƒ t¡ttƒ t¡ttƒ  tttƒtƒtttƒttt ƒ ƒgdœdœdœS )Nr@   r¶   r›   rœ   T)rB   rC   rH   rI   rB  r¾   rÖ   r   r   r  r´   rx   rÁ   r½   )Zlie_group_01Zlie_group_02Zlie_group_03Zlie_group_04Zlie_group_05Zlie_group_06Zlie_group_07Zlie_group_08Zlie_group_09Zlie_group_10Zlie_group_11Zlie_group_12Zlie_group_13Zlie_group_14Zlie_group_15Zlie_group_16Zlie_group_17Zlie_group_18Zlie_group_19Zlie_group_20r  )r   r>   r;   r   r	   r   r   r¿   r   r   r   r
   r   r   r$   )rË   r  r  rR   rR   rS   r²   	  s˜    <ü<ýNý4ýý$þ(@
ÿÿþ.(þ."þ4"ý$þ.(þ(:þ,(þ$&þ$þ*,þ""þ*,þ"$þ—ýr²   c                   C   sº   dt tƒt tƒ td¡tt tƒ  tt tƒtttƒ tttƒ  ƒgdœt tƒ td¡dt t tƒ  tt tƒttdtdƒd   t ƒ ttdtdƒd   t ƒ  ƒgdœdœdœS )NZ2nd_linear_airyrœ   rÁ   rx   r   )Z2nd_lin_airy_01Z2nd_lin_airy_02r  )	r>   r;   r   r	   r¿   r)   rÀ   r*   r   rR   rR   rR   rS   r°   {	  s    "þFþúýr°   c               9   C   s  t ddd} t ddd}dd„ tdƒD ƒ\}}}}}d	d„ tdƒD ƒ\}}}	}
}d
d„ tdƒD ƒ\}}}}}dd„ tdƒD ƒ\}}}}}dd„ tdƒD ƒ\}}}}}tdƒ}dttƒttƒ td¡dttƒ t¡  tttƒtttdt ƒ  ƒgdœttƒ td¡dttƒ t¡  dttƒ  tttƒttttƒ  ttƒ ƒgdœttƒ td¡ttƒ tttƒttt ƒ tttƒ  ƒgdœttƒ td¡ttƒ td¡ dttƒ t¡  tttƒtttdt ƒ  t	tdt ƒ  ƒgddœdttƒ td¡ dttƒ t¡  dttƒ  tttƒtttd ƒ tttt
ddƒ ƒ  ƒgddœtttƒ td¡dttƒ t¡  ttƒ dƒtttƒtttdtdƒ  ƒ ttt tdƒd  ƒ  ƒgddœtttƒtdƒtttƒtdƒ dtttƒtƒ  dttƒ  tttƒttdt ƒ t	tt dtdƒ  ƒ  tttdtdƒ  ƒ  ƒgddœttƒ td¡ttƒ td¡ dttƒ td¡  dttƒ t¡  tttƒtttdt ƒ  t	ttƒ  ttdt ƒ  ƒgddœttƒ td¡dttƒ td¡  ttƒ td¡ dttƒ t¡  dttƒ  tttƒt	tt ƒ tttƒ  tttdƒ t ƒ tttdƒt ƒ  tdt ƒ  ƒgddœttƒ td¡| d ttƒ  tttƒttt| ƒ t ƒ ttt| ƒt ƒ  t	tt| ƒt ƒ  ttt| ƒt ƒ  ƒgddœttƒ td¡d| ttƒ t¡  dttƒ  tttƒttt|t|d d ƒ  ƒ ttt|t|d d ƒ  ƒ  ƒgddœttƒ td¡d| ttƒ t¡  d|d  ttƒ  tttƒttd| t ƒ ttd| t ƒ  ƒgddœttƒ td¡tttƒttt  t	td   ttd   ƒgddœttƒ td¡dttƒ t¡  dttƒ  tttƒttt  tdt ƒ ƒgddœdttƒ td¡ dttƒ td¡  ttƒ t¡ ttƒ tttƒttt  tt ƒ t	ttd ƒ  ƒgddœttƒ td¡dttƒ td¡  dttƒ t¡  dttƒ  tttƒtttt	t    tdt ƒ ƒgddœttƒ td¡d|  ttƒ t¡  | d ttƒ  tttƒttt  t| t ƒ ƒgddœttƒ td¡dttƒ td¡  tttƒttt  t	td   ttdt ƒ  ƒgddœttƒ td¡dttƒ td¡  tttƒttt  t	ttdƒ t ƒ  tttdƒt ƒ  ƒgddœttƒ td¡dttƒ td¡  dttƒ td¡  dttƒ t¡  dttƒ  tttƒttt  tdt ƒ t	tt  tdt ƒ  ƒgddœdttƒ td¡ dttƒ td¡  dttƒ t¡  dttƒ  tttƒttt ƒ ttt d ƒ  t	ttd ƒ  tttt
ddƒ ƒ  ƒgddœttƒ td¡dttƒ td¡  d ttƒ  tttƒttt  tdt ƒ t	tt  tdt ƒ  ƒgddœttƒ td¡dttƒ t¡  dttƒ  tttƒttdt ƒ ttdt ƒ  ttƒ ƒgddœttƒ td¡ttƒ t¡ ttƒ tttƒttttdƒ d ƒ ttttdƒ d ƒ  ttd ƒ ƒgddœttƒ td¡dttƒ td¡  dttƒ  tttƒtttdƒt ƒ tttdƒt ƒ  t	ttdƒt ƒ  tttdƒt ƒ  ƒgddœttƒ td¡dttƒ t¡  d!ttƒ  tttƒttdt ƒ ttdt ƒ  tdt ƒ ƒgddœttƒ td¡dttƒ td¡  dttƒ  tttƒttt  tttdƒ ƒ t	tt  tttdƒ ƒ  ƒgddœttƒ td¡dttƒ  tttƒttttdƒ ƒ ttttdƒ ƒ  ttƒ t	tdt ƒ  ƒgddœttƒ td¡dttƒ td¡  tttƒttt  t	tdt ƒ  ttdt ƒ  ƒgddœttƒ td¡dttƒ td¡  ttƒ t¡ tttƒttt	t  ttƒ  ttt  ttƒ  ƒgddœttƒ td¡ttƒ td¡ ttƒ tttƒtttdƒt d ƒ tttdƒt d ƒ  tt d ƒ t	ttdƒt d ƒ tttdƒt d ƒ  ttd ƒ  ƒgddœttƒ td¡dttƒ td¡  ttƒ tttƒtttttdƒ d ƒ ƒ tttttdƒd ƒ ƒ  t	ttttdƒ d ƒ ƒ  tttttdƒd ƒ ƒ  ƒgddœttƒ td¡dttƒ t¡  dttƒ  tttƒtt|t ƒ tt|ƒt ƒttt|ƒt ƒ ttt|ƒt ƒ    tt|ƒt ƒt	tt|ƒt ƒ ttt|ƒt ƒ    ƒgdd"œttƒ td¡dttƒ t¡  ttƒ tttƒt	t|t ƒ tt|t ƒ  tt|	t ƒ  tt|
ƒt ƒttt|
ƒt ƒ ttt|
ƒt ƒ    ƒgdd"œttƒ td¡d#ttƒ td¡  d$ttƒ t¡  ttƒ tttƒtt|t ƒ tt|t ƒ  t	t|t ƒ  tt|t ƒ  tt|t ƒ  ƒgdd"œttƒ td¡dttƒ td¡  dttƒ td¡  dttƒ t¡  d%ttƒ  tttƒttdt ƒ ttt| ƒ  tt|ƒt ƒttt|ƒt ƒ ttt|ƒt ƒ    tt|ƒt ƒt	tt|ƒt ƒ ttt|ƒt ƒ    ƒgdd"œttƒ td¡dttƒ td¡  dttƒ td¡  ttƒ td¡ dttƒ td¡  ttƒ tttƒttt  tt| ƒ t	tt  ttt|ƒ ƒ  ttt  ttt|ƒ ƒ  ttt|ƒ ƒ  ttt  ttt|ƒ ƒ  tt t ttt|ƒ ƒ  ttt|ƒ ƒ  ƒgdd"œttdƒttƒ ttt¡ ttƒ t¡ dƒtttƒtttdt
ddƒ t d ƒ  t	tdt
ddƒ t d ƒ  ƒgdœt|ttƒ ttt¡ ttƒ t¡ dƒtttƒttttt|ƒ ƒ  t	ttt|ƒ ƒ  ƒgdœttttƒ ttt¡ ttƒ t¡ dƒtttƒttttttƒ ƒ  t	ttttƒ ƒ  ƒgdœttttƒ ttt¡ ttƒ t¡ dƒtttƒtttttƒ t ƒ  t	tttƒt ƒ  ƒgdœttƒ tt¡tttƒ  tttƒttt tt ƒ ƒ ttttt ƒ ƒ  ƒgdœtd&ttƒ tt¡ ttƒ dƒtttƒtttd ƒ tttd ƒ  ƒgdœtd&ttƒ tt¡ ttƒƒtttƒttt d ƒ tttd ƒ  ƒgdœtttƒ tt¡dtttƒtƒ  dttƒ  dƒtttƒttttƒ  ttƒ ƒgdœtttƒ tt¡dtttƒtƒ  dttƒ  dƒtttƒttt  tdt ƒ ƒgdœtttƒ tt¡dtttƒtƒ  dttƒ  dƒtttƒttttdƒ ƒ ttttdƒ ƒ  tt ƒ ƒgdœttƒ tt¡dttƒ  tttƒttdt ƒ ttdt ƒ  ƒgdœd'œ0d(œS ))NrË   TrE  rJ  )Úrealc                 S   s&   g | ]}t td  dt  d |ƒ‘qS )rÖ   r+  rœ   r  r  rR   rR   rS   r~   ”	  rn   zO_get_examples_ode_sol_nth_linear_constant_coeff_homogeneous.<locals>.<listcomp>rÖ   c                 S   s&   g | ]}t td  dt  d |ƒ‘qS )rÖ   r   rx   r  r  rR   rR   rS   r~   •	  rn   c                 S   s2   g | ]*}t td  dtd   dt  d |ƒ‘qS )rÖ   éd   r   éè  rx   r  r  rR   rR   rS   r~   –	  rn   c                 S   s&   g | ]}t td  td  d |ƒ‘qS )rÖ   r›   r9  r  r  rR   rR   rS   r~   —	  rn   c                 S   s"   g | ]}t td  t d |ƒ‘qS )rÖ   rx   r  r  rR   rR   rS   r~   ˜	  rn   rx   Z%nth_linear_constant_coeff_homogeneousrœ   r-  rÁ   r   r  r  rA  r+  r›   r   r½   r9  r  iúÿÿÿr  rþ   é%   r'  r/  r  rk  rl  é2   r  )0Zlin_const_coeff_hom_01Zlin_const_coeff_hom_02Zlin_const_coeff_hom_03Zlin_const_coeff_hom_04Zlin_const_coeff_hom_05Zlin_const_coeff_hom_06Zlin_const_coeff_hom_07Zlin_const_coeff_hom_08Zlin_const_coeff_hom_09Zlin_const_coeff_hom_10Zlin_const_coeff_hom_11Zlin_const_coeff_hom_12Zlin_const_coeff_hom_13Zlin_const_coeff_hom_14Zlin_const_coeff_hom_15Zlin_const_coeff_hom_16Zlin_const_coeff_hom_17Zlin_const_coeff_hom_18Zlin_const_coeff_hom_19Zlin_const_coeff_hom_20Zlin_const_coeff_hom_21Zlin_const_coeff_hom_22Zlin_const_coeff_hom_23Zlin_const_coeff_hom_24Zlin_const_coeff_hom_25Zlin_const_coeff_hom_26Zlin_const_coeff_hom_27Zlin_const_coeff_hom_28Zlin_const_coeff_hom_29Zlin_const_coeff_hom_30Zlin_const_coeff_hom_31Zlin_const_coeff_hom_32Zlin_const_coeff_hom_33Zlin_const_coeff_hom_34Zlin_const_coeff_hom_35Zlin_const_coeff_hom_36Zlin_const_coeff_hom_37Zlin_const_coeff_hom_38Zlin_const_coeff_hom_39Zlin_const_coeff_hom_40Zlin_const_coeff_hom_41Zlin_const_coeff_hom_42Zlin_const_coeff_hom_43Zlin_const_coeff_hom_44Zlin_const_coeff_hom_45Zlin_const_coeff_hom_46Zlin_const_coeff_hom_47Zlin_const_coeff_hom_48r  )r(   r‹   r   r>   r;   r   r	   r¿   rÀ   r  r   r   r  r   r   r   r   r   r!  ÚC7ÚC8ÚC10ÚC9r   r   r=   )rË   rJ  r"  r#  r$  r%  r&  Zr6Zr7Úr8Zr9Zr10Zr11Zr12Zr13Zr14Zr15Zr16Zr17Zr18Zr19Zr20Zr21Zr22Zr23Zr24Zr25r   rR   rR   rS   r­   Ž	  sä    þ,"þ$þ0.ý00ý.<ý<Lý2ÿ:ü2ÿ
ÿZü\ý0Jý82ý.ý,"ý<0ý@*ý4"ý"2ý"@ý6ÿ
ÿ:üDPý.:ý,2ý$Fý.Nÿü,6ý.BýJý"6ý06ý&D:ÿü*@ÿÿü	,F6ÿÿû
(.6ÿÿû
<ZýTÿ6þ6ýÿù6ÿÿÿ:ÿÿÿÿÿú
,Jþ(6þ(6þ(8þ8þ *þ,þ2"þ2"þ2<þ*þ€ € Úýr­   c                   C   sŒ  dt tƒt tƒt tt tƒt ƒ tt tƒ tt tƒt ƒ tt tƒt ƒ t tƒ t¡  tttƒttt tƒtt tƒt ƒ t ƒ ƒgddœtt tƒ t¡ t tƒ ttt tƒt ƒ  tttƒttƒttt tƒt ƒd ƒd  ttt tƒt ƒd ƒd  ƒgddœttt tƒt ƒ t tƒtt tƒt ƒ  ttt tƒt ƒ t tƒ t¡  tttƒttt tƒ t ƒtt tƒt ƒ d  tt tƒ t ƒtt tƒt ƒ d  ƒgddœt tƒ t¡t tƒt  dtt tƒt ƒ  tt tƒtt	tttƒ ƒ dt
   ƒtt tƒtt	tttƒ ƒ ƒgddœttt tƒt ƒ t tƒ tt tƒ t¡  tt tƒtdtttƒ  t ƒƒgddœd	œd
œS )Nr¤   TrA  rx   rœ   Fr^  r  )Zdep_div_indep_01Zdep_div_indep_02Zdep_div_indep_03Zdep_div_indep_04Zdep_div_indep_05r  )r>   r;   r   r   r   r	   r   r¿   r   r   r   rR   rR   rR   rS   r¦   Ë
  s0    T.ý,JýLZý,Dý	,"ýäýr¦   c                
   C   sf   dt tƒdt tƒ t¡ddt tƒ  td   tt tƒttd dt  d  tddƒ ƒgdœidœS )	NZlinear_coefficientsZlinear_coeff_01r   rœ   r  r  rÁ   r  )r>   r;   r   r	   r¿   r   rR   rR   rR   rS   r¢   ô
  s    $,þÿýr¢   c                   C   sŒ  dt tƒt tƒttt tƒt ƒ dt  tt tƒtƒ  tt tƒttƒ tt tt d ƒ ƒ ƒgddœdt tƒ ttt tƒ ƒ t tƒt tƒ t¡  dt ttt tƒ ƒ t tƒ t¡  ttt tƒƒtdttt tƒ ƒ  ƒgdœdtd  t tƒ t tƒd  tt tƒd  dtd   t tƒ t¡  tt tƒtdt tdtd	  td
t ƒ ƒd  ƒt ƒgddœttt tƒd tt tƒ  ƒ t tƒ t¡ t tƒ ttt tƒƒtdtt t tƒ d ƒ  ƒgddœtt tƒ tt tƒ t tƒ t¡  tttƒtttdt tƒd td   ƒƒ t	t tƒt ƒ ƒgdœtt tƒ t¡ t tƒ tt
t tƒt ƒ  tt tƒdt t	tt ƒ ƒgdœtd t tƒd  dt t tƒ t tƒ t¡  tt tƒtttt  ƒ ƒtt tƒtttt  ƒƒgdœt tƒd ttt tƒd td  ƒ tt tƒ  t tƒ t¡  tt tƒt tt tdt   ƒ ƒtt tƒttt tdt   ƒ ƒgddœdœdœS )Nr?  rœ   rx   Tr  rÁ   r   r-  r›   rF  rA  )Z1st_homogeneous_coeff_best_01Z1st_homogeneous_coeff_best_02Z1st_homogeneous_coeff_best_03Z1st_homogeneous_coeff_best_04Z1st_homogeneous_coeff_best_05Z1st_homogeneous_coeff_best_06Z1st_homogeneous_coeff_best_07Z1st_homogeneous_coeff_best_08r  )r>   r;   r   r   r	   r   r¿   r   r   r   r   rR   rR   rR   rS   r§     s@    0,ýV&þH:ý4,ý$>þ,þ04þ@HýÕýr§   c                  C   sl   t t t t t t t t t t	 t
 t t t t t t t t t t t t t t t } | S rh   )rÿ   r  r  rì   ró   rÐ   rï   rõ   rÚ   r÷   rÞ   rà   rú   rã   rñ   rÓ   rÍ   r»   rÃ   r·   r²   r°   r­   r§   r¦   r¢   )re   rR   rR   rS   ra   :  sh    ÿþýüûúùø	÷
öõôóòñðïîíìëêéèçra   )F)F)F)µÚ__doc__Zsympy.core.functionr   r   Zsympy.core.mulr   Zsympy.core.numbersr   r   r   r   Zsympy.core.relationalr	   r
   Zsympy.core.singletonr   Zsympy.core.symbolr   r   Z$sympy.functions.elementary.complexesr   r   Z&sympy.functions.elementary.exponentialr   r   r   Z%sympy.functions.elementary.hyperbolicr   r   r   r   Z(sympy.functions.elementary.miscellaneousr   r   Z$sympy.functions.elementary.piecewiser   Z(sympy.functions.elementary.trigonometricr   r   r   r   r   r   r    rG  r!   r"   Zsympy.functions.special.hyperr#   Zsympy.integrals.integralsr$   r%   Zsympy.polys.rootoftoolsr&   Z
sympy.corer'   r(   Zsympy.functionsr)   r*   r+   r,   r-   Zsympy.integrals.rischr.   Zsympy.solvers.oder/   r0   Zsympy.solvers.ode.oder1   r2   Zsympy.solvers.ode.singler3   r4   r5   r6   r7   Zsympy.solvers.ode.subscheckr8   Zsympy.testing.pytestr9   r:   r†   r;   r<   rÈ   r=   r>   r?   r¿   rÀ   r  r  r   r!  ro  rp  rr  rq  rË   r  r  r   rŠ   r   rŒ   rˆ   r“   rU   r]   rg   rr   rs   rY   rc   r¡   r£   r©   r«   r®   r¯   r±   r³   r¹   rº   r¼   rÂ   rÄ   rÌ   rÎ   rÑ   rÔ   rÕ   rØ   rÛ   rÜ   rÝ   rß   rá   rä   rç   rê   rë   rí   rî   rð   rò   rô   rö   rø   rû   r  r
  r  rÿ   r  r  ró   rï   rñ   rõ   rì   r÷   rú   rÐ   rÞ   rà   rã   rÚ   rÓ   rÍ   r»   rÃ   r·   r²   r°   r­   r¦   r¢   r§   ra   rR   rR   rR   rS   Ú<module>   sT  $





P%







	



















:
,
&


L

 
*
3
 
U
  	
 4
`
h
D
 
2
n
v

  >
(

8