I'm trying to solve this differential equation : $$ \frac{dy}{dx}= \frac{-2 y^3}{(y+1)^2(y+2)^2} $$ with the boundary condition $y(x_0)=x_0$, $x>0$, and $y(x)$ being a positive function. The integration of the equation is straightforward, however after integration, one gets a transcendental equation of the form $$a y(x)+by^2(x)+c \log(y)+\frac{d}{y}+\frac{e}{y^2}+ g(x_0)= z (x-x_0)$$ where $a,b,c , d, e,z $ are constants, and $g(x_0) $ is a function of $x_0$. I tried to solve it with Lagrange inversion theorem, however due to the non triviality of the LHS, the computation of the $n$'th derivative is very complicated, is there any other way to solve it ?
2 Answers
Calculating the $n$th derivative for arbitrary $n$ is not easy even for simple elementary functions. See e.g. this Mathematica answer for $\tan^{(n)}x$:
or the Faà di Bruno formula.
What can be done in your case is as follows: You have $y'=R_0(y)$, where $R_0(y)$ is a certain rational function of $y$. Hence, $y''=R_0'(y)y'=R_0'(y)R_0(y)=:R_1(y)$. Generally, for any natural $n$, recursively you have
$$y^{(n)}(x)=R_{n-1}(y(x)),$$
where $R_n:=R_{n-1}'R_{n-1}$. To find $R_{n-1}'$, you may want to first decompose $R_{n-1}$ into partial fractions. As for the value of $y(x)$, you compute it by solving numerically your transcendental equation or by solving numerically your original differential equation.
The Mathematica notebook image below shows such a numerical calculation (done in about 2.2 sec) of the set $\{(n,y^{(n)}(0))\colon n\in\{1,\dots,9\}\}$ for the solution $y$ of your differential equation with $y(0)=1$:
The calculation of $R_{10-1}$ takes apparently too much memory.
-
$\begingroup$ Dear Iosif Pinelis, Thank you a lot for your answer ! I may indeed ressort to a Taylor Expansion untills some order to approximate the solution, however don't you think there could be a way to get a closed form in terms of some special function for example? $\endgroup$– GiuseppeCommented Feb 19, 2020 at 16:48
-
1$\begingroup$ @Giuseppe : I very much doubt that a closed form in terms of some special function is possible here. Mathematica's commands FunctionExpand and FullSimplify cannot do anything with this inverse function. $\endgroup$ Commented Feb 19, 2020 at 18:17
If you're trying to find the solution as a power series about $x=x_0$, that's fairly straightforward. Don't use Lagrange, though. Instead, substitute $y = x_0 + \sum_{i=1}^n a_i (x - x_0)^i$ in to the differential equation, expand to the desired order, equate coefficients of each power, and solve for the $a_i$. Here's the answer to order $7$, according to Maple:
$$y \left( x \right) =(x_{{0}}-2\,{\frac {{x_{{0}}}^{3}}{ \left( x_{{0}} +1 \right) ^{2} \left( x_{{0}}+2 \right) ^{2}}} \left( x-x_{{0}} \right) -2\,{\frac {{x_{{0}}}^{5} \left( {x_{{0}}}^{2}-3\,x_{{0}}-6 \right) }{ \left( x_{{0}}+1 \right) ^{5} \left( x_{{0}}+2 \right) ^{5 }}} \left( x-x_{{0}} \right) ^{2}-{\frac {4\,{x_{{0}}}^{7} \left( 3\,{ x_{{0}}}^{4}-18\,{x_{{0}}}^{3}-35\,{x_{{0}}}^{2}+36\,x_{{0}}+60 \right) }{3\, \left( x_{{0}}+1 \right) ^{8} \left( x_{{0}}+2 \right) ^{8}}} \left( x-x_{{0}} \right) ^{3}-{\frac {2\,{x_{{0}}}^{9} \left( 15\,{x_{{0}}}^{6}-135\,{x_{{0}}}^{5}-203\,{x_{{0}}}^{4}+753\,{x_{{0}}} ^{3}+1170\,{x_{{0}}}^{2}-396\,x_{{0}}-840 \right) }{3\, \left( x_{{0}} +1 \right) ^{11} \left( x_{{0}}+2 \right) ^{11}}} \left( x-x_{{0}} \right) ^{4}-{\frac {4\,{x_{{0}}}^{11} \left( 105\,{x_{{0}}}^{8}-1260 \,{x_{{0}}}^{7}-1062\,{x_{{0}}}^{6}+12528\,{x_{{0}}}^{5}+15889\,{x_{{0 }}}^{4}-22824\,{x_{{0}}}^{3}-37848\,{x_{{0}}}^{2}+2880\,x_{{0}}+15120 \right) }{15\, \left( x_{{0}}+1 \right) ^{14} \left( x_{{0}}+2 \right) ^{14}}} \left( x-x_{{0}} \right) ^{5}-{\frac {4\,{x_{{0}}}^{ 13} \left( 945\,{x_{{0}}}^{10}-14175\,{x_{{0}}}^{9}-552\,{x_{{0}}}^{8} +205254\,{x_{{0}}}^{7}+167497\,{x_{{0}}}^{6}-768099\,{x_{{0}}}^{5}- 1044390\,{x_{{0}}}^{4}+571608\,{x_{{0}}}^{3}+1258368\,{x_{{0}}}^{2}+ 66960\,x_{{0}}-332640 \right) }{45\, \left( x_{{0}}+1 \right) ^{17} \left( x_{{0}}+2 \right) ^{17}}} \left( x-x_{{0}} \right) ^{6}-{ \frac {8\,{x_{{0}}}^{15} \left( 10395\,{x_{{0}}}^{12}-187110\,{x_{{0}} }^{11}+161979\,{x_{{0}}}^{10}+3503880\,{x_{{0}}}^{9}+688353\,{x_{{0}}} ^{8}-21504726\,{x_{{0}}}^{7}-21815219\,{x_{{0}}}^{6}+37940508\,{x_{{0} }}^{5}+61133076\,{x_{{0}}}^{4}-9402048\,{x_{{0}}}^{3}-44133840\,{x_{{0 }}}^{2}-5866560\,x_{{0}}+8648640 \right) }{315\, \left( x_{{0}}+1 \right) ^{20} \left( x_{{0}}+2 \right) ^{20}}} \left( x-x_{{0}} \right) ^{7}+O \left( \left( x-x_{{0}} \right) ^{8} \right) ) $$
It appears that the coefficient $a_n$ of $(x-x_0)^n$ is a polynomial of degree $2n-2$ in $x_0$ times $x_0^{2n+1}/((x_0+1)(x_0+2))^{3n-1}$