 patterns - Maple Help

Solving ODEs Matching the Patterns y=G(x,diff(y,x)), x=G(y,diff(y,x)), y=G(diff(y,x)), x=G(diff(y,x)), 0=G(x,diff(y,x)), 0=G(y,diff(y,x)) Description

 • See Differentialgleichungen, by E. Kamke, p. 30. The technique consists mainly of looking for a parametric solution. Consider, for instance, the case y=G(x,diff(y,x)).
 > ode := y=G(x,diff(y(x),x));
 ${\mathrm{ode}}{≔}{y}{=}{G}{}\left({x}{,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)$ (1)
 Choosing the parametrization
 > para := diff(y(x),x) = t;
 ${\mathrm{para}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{t}$ (2)
 > ode1 := subs(para,x=x(t),y=y(t), ode);
 ${\mathrm{ode1}}{≔}{y}{}\left({t}\right){=}{G}{}\left({x}{}\left({t}\right){,}{t}\right)$ (3)
 From the equations above and using the chain rule $\frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{dy}}{\mathrm{dt}}$ $\frac{\mathrm{dt}}{\mathrm{dx}}$, it is possible to obtain another ODE for $x\left(t\right)$ as follows:
 > ode_draft := diff(x(t),t) = diff(rhs(ode1),t)/t:
 > ode2 := diff(x(t),t)=solve(ode_draft,diff(x(t),t));
 ${\mathrm{ode2}}{≔}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right){=}{-}\frac{{{\mathrm{D}}}_{{2}}{}\left({G}\right){}\left({x}{}\left({t}\right){,}{t}\right)}{{{\mathrm{D}}}_{{1}}{}\left({G}\right){}\left({x}{}\left({t}\right){,}{t}\right){-}{t}}$ (4)
 You should therefore solve $\mathrm{ode2}$ for $x\left(t\right)$ and determine $y\left(t\right)$ by introducing the resulting $x\left(t\right)$ in $\mathrm{ode1}$. Note that, when G does not depend on $x\left(t\right),\mathrm{ode2}$ is a quadrature. ODEs matching the pattern $x=G\left(y,\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$ are solved using the same ideas, and ODEs matching the patterns $0=G\left(x,\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right),0=G\left(y,\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right),x=G\left(\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$, or $y=G\left(\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$ are just particular cases.
 • Although any ODE can be attempted using the scheme outlined above, generally speaking, there are four cases which can be better dealt with by looking for a parametric solution; they are:
 1 $y=G\left(x,\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$
 2 $x=G\left(y,\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$
 3 $y=G\left(\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$   (particular case)
 4 $x=G\left(\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\right)$   (particular case)
 Parametric solutions are available by giving the optional argument 'parametric' to dsolve. By default, when the ODE is of high degree in $\frac{\mathrm{dy}}{\mathrm{dx}}$, dsolve tries the parametric scheme, along with a set of related methods for this type of ODE. However, this scheme may also be of help in some cases in which $\frac{\mathrm{dy}}{\mathrm{dx}}$ can be isolated. Examples

1) Kamke's ODE 554: y=G(x,y')

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{odeadvisor}\right)$
 $\left[{\mathrm{odeadvisor}}\right]$ (5)
 > $\mathrm{ode}≔{x}^{n-1}{\mathrm{diff}\left(y\left(x\right),x\right)}^{n}-nx\mathrm{diff}\left(y\left(x\right),x\right)+y\left(x\right)$
 ${\mathrm{ode}}{≔}{{x}}^{{n}{-}{1}}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{n}}{-}{n}{}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right)$ (6)
 > $\mathrm{odeadvisor}\left(\mathrm{ode}\right)$
 $\left[{\mathrm{y=_G\left(x,y\text{'}\right)}}\right]$ (7)
 > $\mathrm{dsolve}\left(\mathrm{ode}\right)$
 ${y}{}\left({x}\right){=}{\mathrm{_C1}}{}{\left(\frac{{x}}{{\mathrm{_C1}}}\right)}^{\frac{{1}}{{n}}}{}{n}{-}\frac{{\left(\frac{{1}}{{\mathrm{_C1}}}\right)}^{{-}{n}}}{{\mathrm{_C1}}}$ (8)
 > $\mathrm{ode}≔16{y\left(x\right)}^{2}{\mathrm{diff}\left(y\left(x\right),x\right)}^{3}+2x\mathrm{diff}\left(y\left(x\right),x\right)-y\left(x\right)$
 ${\mathrm{ode}}{≔}{16}{}{{y}{}\left({x}\right)}^{{2}}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{3}}{+}{2}{}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}{y}{}\left({x}\right)$ (9)
 > $\mathrm{odeadvisor}\left(\mathrm{ode}\right)$
 $\left[\left[{\mathrm{_1st_order}}{,}{\mathrm{_with_linear_symmetries}}\right]\right]$ (10)
 > $\mathrm{dsolve}\left(\mathrm{ode}\right)$
 ${y}{}\left({x}\right){=}{-}\frac{{{2}}^{{1}}{{4}}}{}{{3}}^{{1}}{{4}}}{}{\left({-}{{x}}^{{3}}\right)}^{{1}}{{4}}}}{{3}}{,}{y}{}\left({x}\right){=}\frac{{{2}}^{{1}}{{4}}}{}{{3}}^{{1}}{{4}}}{}{\left({-}{{x}}^{{3}}\right)}^{{1}}{{4}}}}{{3}}{,}{y}{}\left({x}\right){=}{-}\frac{{I}}{{3}}{}{{2}}^{{1}}{{4}}}{}{{3}}^{{1}}{{4}}}{}{\left({-}{{x}}^{{3}}\right)}^{{1}}{{4}}}{,}{y}{}\left({x}\right){=}\frac{{I}}{{3}}{}{{2}}^{{1}}{{4}}}{}{{3}}^{{1}}{{4}}}{}{\left({-}{{x}}^{{3}}\right)}^{{1}}{{4}}}{,}{y}{}\left({x}\right){=}\sqrt{{16}{}{{\mathrm{_C1}}}^{{3}}{+}{2}{}{x}{}{\mathrm{_C1}}}{,}{y}{}\left({x}\right){=}{-}\sqrt{{16}{}{{\mathrm{_C1}}}^{{3}}{+}{2}{}{x}{}{\mathrm{_C1}}}$ (11)

3) Kamke's ODE 568: $y=G\left(y\text{'}\right)$ and d'Alembert type (see odeadvisor,dAlembert)

 > $\mathrm{ode}≔{\mathrm{diff}\left(y\left(x\right),x\right)}^{2}\mathrm{sin}\left(\mathrm{diff}\left(y\left(x\right),x\right)\right)-y\left(x\right)$
 ${\mathrm{ode}}{≔}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}{}{\mathrm{sin}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}{y}{}\left({x}\right)$ (12)
 > $\mathrm{odeadvisor}\left(\mathrm{ode}\right)$
 $\left[{\mathrm{_quadrature}}\right]$ (13)
 > $\mathrm{ans}≔\mathrm{dsolve}\left(\mathrm{ode}\right)$
 ${\mathrm{ans}}{≔}{y}{}\left({x}\right){=}{0}{,}{x}{-}\left({{\int }}_{{}}^{{y}{}\left({x}\right)}\frac{{1}}{{\mathrm{RootOf}}{}\left({\mathrm{sin}}{}\left({\mathrm{_Z}}\right){}{{\mathrm{_Z}}}^{{2}}{-}{\mathrm{_a}}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_a}}\right){-}{\mathrm{_C1}}{=}{0}$ (14)

Implicit or explicit answers can be tested using odetest; when there are many answers one can map as follows

 > $\mathrm{map}\left(\mathrm{odetest},\left[\mathrm{ans}\right],\mathrm{ode}\right)$
 $\left[{0}{,}{0}\right]$ (15)