U
    	Ç-e† ã                
   @   s<  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lOmPZPmQZQmRZR ddlSZSe8dƒZTe8dƒZUedƒZVe8dƒZWe7dƒZXe7dƒZYed ƒ\
ZZZ[Z\Z]Z^Z_Z`ZaZbZcd!Zdd"Zed#Zfd$Zgd%Zhd&Zid'd(„ Zjdºd*d+„Zkd»d,d-„Zld.d/„ Zmd0d1„ Znd¼d2d3„Zog dfd4d5„Zpd6d7„ Zqd8d9„ ZreQd:d;„ ƒZseQd<d=„ ƒZteQd>d?„ ƒZueQd@dA„ ƒZvdBdC„ ZweQdDdE„ ƒZxeQdFdG„ ƒZyeQdHdI„ ƒZzeQdJdK„ ƒZ{dLdM„ Z|eQdNdO„ ƒZ}dPdQ„ Z~eQdRdS„ ƒZeQdTdU„ ƒZ€eQdVdW„ ƒZdXdY„ Z‚eQdZd[„ ƒZƒeQd\d]„ ƒZ„eQd^d_„ ƒZ…d`da„ Z†eQdbdc„ ƒZ‡eQddde„ ƒZˆeQdfdg„ ƒZ‰eQdhdi„ ƒZŠdjdk„ Z‹eQdldm„ ƒZŒeQdndo„ ƒZeQdpdq„ ƒZŽdrds„ ZeQdtdu„ ƒZdvdw„ Z‘dxdy„ Z’dzd{„ Z“eQd|d}„ ƒZ”d~d„ Z•d€d„ Z–eQd‚dƒ„ ƒZ—ejd„d…„ ƒZ˜ejd†d‡„ ƒZ™ejdˆd‰„ ƒZšejdŠd‹„ ƒZ›ejdŒd„ ƒZœejdŽd„ ƒZejdd‘„ ƒZžejd’d“„ ƒZŸejd”d•„ ƒZ ejd–d—„ ƒZ¡ejd˜d™„ ƒZ¢ejdšd›„ ƒZ£ejdœd„ ƒZ¤ejdždŸ„ ƒZ¥ejd d¡„ ƒZ¦ejd¢d£„ ƒZ§ejd¤d¥„ ƒZ¨ejd¦d§„ ƒZ©ejd¨d©„ ƒZªejdªd«„ ƒZ«ejd¬d­„ ƒZ¬ejd®d¯„ ƒZ­ejd°d±„ ƒZ®ejd²d³„ ƒZ¯ejd´dµ„ ƒZ°ejd¶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ÚslowÚON_CINÚxÚuÚyÚfÚgzC1:11z^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   © úd/var/www/html/Darija-Ai-Train/env/lib/python3.8/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|k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>Ê   s     z"_test_dummy_sol.<locals>.<genexpr>)Útyper`   Úanyri   )rl   Ú
dsolve_solrR   rk   rS   Ú_test_dummy_solÈ   s    rq   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    rr   c              
   C   s¨  |d }|d }|d }| |d k}|d }dddœ}|d }	|d	 }
|d
 }|d }d}|r„| t ||ƒkr„tj||| d}t|ƒ‚| t ||ƒkr¤||d< z4|s´t|||	| d}nt|ƒdkrÊ|d }n|}W nt tk
rD } zTg }||d< |süt ¡  t	jt
|ƒ| ||d|d< |r0|s0t|d ƒ ‚ d}W 5 d }~X Y nX |rˆ|g krˆd}t|ƒtkr¤|D ]4}| t¡rŠt||ƒ }n||k}|rl qÐqln,||k}|D ]}| t¡r°t||ƒ }q°|rðtj||||d}t|ƒ‚dd„ tt|ƒƒD ƒ}t|ƒdkrd}|r$tsˆ|
sˆt|||dd|krˆ||d< d}tj| |||d}|r|t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   rs   F)rO   rB   rC   rp   c                 S   s   g | ]}d ‘qS )©Tr   rR   ©rj   ÚirR   rR   rS   Ú
<listcomp>  s     z,_test_particular_example.<locals>.<listcomp>rz   )Úsolve_for_funcÚunsolve_list)rJ   rB   rC   rp   )rO   rB   zAssertionError: zis now passing for the hintrW   )r/   Úhint_messageÚformatÚAssertionErrorr0   ÚlenÚ	ExceptionÚ	tracebackÚ	print_excÚexception_msgÚstrrZ   rn   r`   Úhasr   rq   Úexpected_sol_messageÚranger;   r8   Údsol_incorrect_msgÚcheckodesol_msg)rf   Úode_examplerV   rB   rl   rO   ÚxfailrE   r\   rF   rG   rH   rI   ZxpassÚmessagerp   ry   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 k}|r<|s<q"|rBq"t| |ƒ}|| dg ¡7 }|| dg ¡7 }|| dg ¡7 }|d k	r"|d }	|	dkr"t|d ƒ q"|d kræt|ƒ}
t|ƒt|ƒ t|ƒ }tj| |
|||d}	t|	ƒ d S )NrD   rt   r   rx   rs   rX   )rJ   ZmatchedZsolveZunsolveÚ
exceptions)ra   rY   rL   rZ   rƒ   Úcheck_hint_msgr   )rf   re   rd   rt   r   rx   rŽ   r   r\   rs   Ú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ksÆt
‚t ttƒ t¡ttƒ ttƒtƒ} | jdksöt
‚t ttƒ td	¡ttƒ td
¡ ttƒ td¡ ttƒtƒ} | jd	ksBt
‚t ttƒ td¡ttƒ td
¡ ttƒd
  ttƒtƒ} | jdksŠt
‚t ttƒ td¡tttƒ td
¡  ttƒd
  ttƒtƒ} | jdksÖt
‚d S )Nc                      s   ˆ   ¡ S rh   )ÚmatchesrR   ©rN   rR   rS   Ú<lambda>E  ó    z&test_SingleODESolver.<locals>.<lambda>c                      s   ˆ   ¡ S rh   ©Zget_general_solutionrR   r–   rR   rS   r—   F  r˜   c                      s   ˆ   ¡ S rh   )Ú_matchesrR   r–   rR   rS   r—   G  r˜   c                      s   ˆ   ¡ S rh   )Z_get_general_solutionrR   r–   rR   rS   r—   H  r˜   c                      s   ˆ   ¡ S rh   r™   rR   r–   rR   rS   r—   Q  r˜   Frw   é   é   é   T)r5   r?   r<   r   r6   r9   ÚNotImplementedErrorr3   r4   r•   r‚   ÚorderZis_autonomous)ÚproblemrR   r–   rS   Útest_SingleODESolver@  s&    *"<8<r¡   c                   C   s   t tƒ d S rh   )r]   Ú)_get_examples_ode_sol_linear_coefficientsrR   rR   rR   rS   Útest_linear_coefficientse  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}||krh||kslt‚||kr|||ks€t‚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‚   r]   Ú>_get_examples_ode_sol_1st_homogeneous_coeff_subs_dep_div_indepÚ0_get_examples_ode_sol_1st_homogeneous_coeff_best)Zeq1Úc1Zeq2Úc2ZsdiZsidrR   rR   rS   Útest_1st_homogeneous_coeff_odei  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_odex  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sVt‚ttƒ d S )Nrœ   rw   )Ú
factorableÚseparable_reducedÚ	lie_groupZseparable_reduced_Integral)r?   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òt‚t| |ƒd	kst‚d S )
Nrw   rœ   éÿÿÿÿé   r›   )rw   Z2nd_hypergeometric_Integral)rJ   rz   )r<   r?   r   r   r	   ÚC1ÚC2r$   r   r#   r0   r‚   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 t‚q t| dd„ |D ƒƒddgksØt‚d S )	Nrœ   rw   Ú+2nd_nonlinear_autonomous_conserved_IntegralF©rJ   rv   c                 S   s   g | ]}|  ¡ ‘qS rR   )Zdoit)rj   ÚsrR   rR   rS   r}   º  s     zDtest_2nd_nonlinear_autonomous_conserved_integral.<locals>.<listcomp>rz   )r?   r<   r   r   r	   r$   r   rÀ   Ú_urÁ   r0   Úzipri   r‚   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|t‚t	t
ƒ d S ©Nrœ   )r?   r<   r   r	   r   rÀ   rÁ   r2   r‚   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~t‚t||dddd	ks–t‚t||dddd	ks®t‚d S )
NZ:nth_linear_constant_coeff_variation_of_parameters_Integralé   rœ   r   TrÇ   F©rŸ   r~   rz   )r?   r<   r   r   r   r0   r‚   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^t‚d S )Nrœ   FZ1st_exact_Integralru   rw   rØ   )r   r?   r<   r   r   r0   r8   r‚   )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| ƒks:t‚t	t
ƒ d S )NÚ3nth_linear_constant_coeff_undetermined_coefficients)r	   r   r?   r<   r   r   ÚHalfr/   r‚   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:t‚| |tttƒ ttƒ|ttƒtƒ ƒdksht‚| ttƒ|ttƒtƒ |ttƒtdƒ ƒdksšt‚| |tttƒ tdƒ|tt ttƒ tdƒ ƒdksÒt‚| |ttƒtdƒ|ttƒtdƒ |ttƒtdƒ ƒdkst‚| |ttƒtdƒ|ttƒtdƒ ƒdks>t‚ttƒ d S )Nc                 S   s   t t| ttƒtƒƒ ¡ S rh   )r7   r5   r?   r<   rš   )rB   rR   rR   rS   r—     r˜   z*test_nth_order_reducible.<locals>.<lambda>Frœ   r   r›   T)r   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<t‚ttƒ d S rÐ   )	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_Bernoulli3  s    rõ   c                   C   s   t tƒ d S rh   )r]   Ú _get_examples_ode_sol_1st_linearrR   rR   rR   rS   Útest_1st_linear7  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ƒƒ}| |ks¨t‚| |ks´t‚| d |ksÄt‚| d |ksÔt‚ttƒ d S )NÚ	Liouvillerœ   r_   )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|ƒksnt‚|||ƒ || t||ƒ|ƒ  ||d  t||ƒ|dƒ  }|t|ƒks¼t‚ttƒ d S )Nz	x t a b cr>   Únth_linear_euler_eq_homogeneousr›   é   rœ   é$   )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_homogeneousN  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| ƒƒks~t‚|| d  tt| ƒ| dƒ ||  tt| ƒ| ƒ  |t| ƒ  |t| ƒ  }|t|t| ƒƒksÞt‚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   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| ƒƒks~t‚t|| d	  tt| ƒ| d	ƒ || d  tt| ƒ| dƒ  ||  tt| ƒ| ƒ  |t| ƒ  | t| ƒ ƒ}|t|t| ƒƒksüt‚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   r]   Ú$_get_examples_ode_sol_euler_var_parar	  rR   rR   rS   ÚEtest_nth_order_linear_euler_eq_nonhomogeneous_variation_of_parametersj  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   rw   ©r&   r<   ©rj   ÚnrR   rR   rS   r}   {  s     z;_get_examples_ode_sol_euler_homogeneous.<locals>.<listcomp>r×   rý   éýÿÿÿrœ   r   rÂ   r   r›   é   rw   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   y  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œ   rw   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  rw   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   rw   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.  rw   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ò   1  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ddddd	d
ddddddg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dddg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Â   rw   r›   T©rB   rC   r:   r  r×   r¿   r  r¾   ©rB   rC   rH   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   rw   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!   rE  r?   r
  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ƒ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Â   rw   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û   S  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d
dddddddddddg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_algebraicrw   rœ   rÂ   r   ©rB   rC   rE   r>  r  r   r?  r=  r-  r@  r¥   r¤   r·   ræ   r  rA  r  r×   Tr0  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  rJ  rK  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¾   TrB  r   r›   r.  rÂ   r  r  r×   rw   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 alphaTrF  Úomegaræ   r;  r)  rw   rB  r  r›   r.  r  r:  r  r  r(  r1  r¿   rÿ   r¾   r  iëÿÿÿé   é‚   i  rÂ   é1   iùÿÿÿr9  rL  )(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ÚalpharS  rR   rR   rS   rá   u  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œ   rw   r   r›   TrB  )rB   rC   r:   rG   r¾   r·   r  gfffff†I@gÃXvH”?rL  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Ì   rO  r@   rK  Ú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œ   TrB  rw   r·   )rB   rC   rD   r:   rG   )rB   rC   rD   r:   r   F)rB   rC   r:   rF   ©rB   rC   rF   r  iåÿÿÿrT  )rB   rC   r:   rH   r   rÂ   c              	   S   s6   g | ].}t ttƒ|tttd   d ƒ d t ƒ‘qS )rœ   rw   )r	   r?   r<   r   rÀ   r{   rR   rR   rS   r}   ‚  s     z3_get_examples_ode_sol_1st_exact.<locals>.<listcomp>)r¾   rw   )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Û   1  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×   rA  r;  r)  rw   TrB  r  r›   r.  r  r  r:  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@   rW  r  rR   rR   rS   rÔ   ’  sª    
6
Pý@ýý$,ý,4ý>Fý.,ý.@ý8.ý*(ý"2ÿ2ÿü:ýDâÿÿÿÿÿþ<Žþ"<ÿÿ
ÿü©ýrÔ   c                   C   sL  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œdœdœS )NZ2nd_linear_besselrœ   r›   rÂ   é   r×   r   éQ   rw   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_11r  )r?   r<   r   r	   rÀ   r+   rÁ   r,   r   r   r   rR   rR   rR   rS   rÎ   û  sJ    <&þ<.þ8&þH>þ<6þ@NþD6þ@>þ4BþH>þ,>þÌý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_hypergeometricrw   rœ   r   r×   r¿   )r¾   r.  rÂ   r.  r,  rþ   éûÿÿÿr  i`þÿÿiQ	  rV  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¼   <  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œ   rw   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Ä   ]  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¶   rw   rœ   r   r  Fr·   rj  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 )Nza b cr·   r›   rœ   T)rB   rC   rH   rI   rC  r¿   r×   r   r   r  rµ   rw   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Â   rw   r   )Z2nd_lin_airy_01Z2nd_lin_airy_02r  )	r?   r<   r   r	   rÀ   r)   rÁ   r*   r   rR   rR   rR   rS   r±   v	  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Ì   TrF  rK  )Úrealc                 S   s&   g | ]}t td  dt  d |ƒ‘qS )r×   r,  rœ   r  r  rR   rR   rS   r}   	  s     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   rw   r  r  rR   rR   rS   r}   	  s     c                 S   s2   g | ]*}t td  dtd   dt  d |ƒ‘qS )r×   éd   r   éè  rw   r  r  rR   rR   rS   r}   ‘	  s     c                 S   s&   g | ]}t td  td  d |ƒ‘qS )r×   r›   r:  r  r  rR   rR   rS   r}   ’	  s     c                 S   s"   g | ]}t td  t d |ƒ‘qS )r×   rw   r  r  rR   rR   rS   r}   “	  s     rw   Z%nth_linear_constant_coeff_homogeneousrœ   r.  rÂ   r   r  r  rB  r,  r›   r   r¾   r:  r  iúÿÿÿr  rÿ   é%   r(  r0  r  rl  rm  é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Ì   rK  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¤   TrB  rw   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dt ƒ tdttƒ   ƒ ƒtt tƒtt tdt ƒ tdttƒ   ƒƒgddœdœdœS )Nr@  rœ   rw   Tr  rÂ   r   r.  r›   rG  rB  )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þ@`ýÕý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   5  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    rH  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!  r"  rp  rq  rs  rr  r€   rŠ   r   rŒ   r‡   r’   rU   r]   rg   rq   rr   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>   sR  $




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

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

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