sym Fx - Maple Help

Solving Linear Second Order ODEs for which a Symmetry of the Form [xi=0, eta=F(x)] Can Be Found

Description

 • All second order linear ODEs have symmetries of the form [xi=0, eta=F(x)]. Actually, F(x) is always a solution of the related homogeneous ODE. There is no general scheme for determining F(x); see dsolve,linear).
 • When a symmetry of the form [xi=0, eta=F(x)] is found, this information is enough to integrate the homogeneous ODE (see Murphy's book, p. 88).
 • In the case of nonhomogeneous ODEs, you can do the following:
 1) look for F(x) as a symmetry of the homogeneous ODE;
 2) solve the homogeneous ODE using this information;
 3) set each of _C1 and _C2 equal to 0 and 1 in the answer of the previous step, in order to obtain the two linearly independent solutions of the homogeneous ODE;
 4) use these two independent solutions of the homogeneous ODE to build the general solution to the nonhomogeneous ODE (see Bluman and Kumei, Symmetries and Differential Equations, p. 132 and ?dsolve,references).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{odeadvisor},\mathrm{symgen}\right)$
 $\left[{\mathrm{odeadvisor}}{,}{\mathrm{symgen}}\right]$ (1)
 > $\mathrm{ode}\left[1\right]≔\mathrm{diff}\left(y\left(x\right),x,x\right)=a\mathrm{diff}\left(y\left(x\right),x\right)-\frac{\frac{1}{\mathrm{ln}\left(x\right)}y\left(x\right)}{{x}^{2}}-\frac{\frac{a}{\mathrm{ln}\left(x\right)}y\left(x\right)}{x}$
 ${{\mathrm{ode}}}_{{1}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{a}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}\frac{{y}{}\left({x}\right)}{{\mathrm{ln}}{}\left({x}\right){}{{x}}^{{2}}}{-}\frac{{a}{}{y}{}\left({x}\right)}{{\mathrm{ln}}{}\left({x}\right){}{x}}$ (2)
 > $\mathrm{odeadvisor}\left(\mathrm{ode}\left[1\right]\right)$
 $\left[\left[{\mathrm{_2nd_order}}{,}{\mathrm{_with_linear_symmetries}}\right]{,}\left[{\mathrm{_2nd_order}}{,}{\mathrm{_linear}}{,}{\mathrm{_with_symmetry_\left[0,F\left(x\right)\right]}}\right]\right]$ (3)
 > $\mathrm{dsolve}\left(\mathrm{ode}\left[1\right]\right)$
 ${y}{}\left({x}\right){=}\left(\left({\int }\frac{{{ⅇ}}^{{a}{}{x}}}{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{_C1}}{+}{\mathrm{_C2}}\right){}{\mathrm{ln}}{}\left({x}\right)$ (4)

A nonhomogeneous ODE example

 > $\mathrm{ode}\left[2\right]≔\mathrm{diff}\left(y\left(x\right),x,x\right)=\frac{\mathrm{diff}\left(F\left(x\right),x,x\right)y\left(x\right)}{F\left(x\right)}+H\left(x\right)$
 ${{\mathrm{ode}}}_{{2}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}\right)\right){}{y}{}\left({x}\right)}{{F}{}\left({x}\right)}{+}{H}{}\left({x}\right)$ (5)
 > $\mathrm{dsolve}\left(\mathrm{ode}\left[2\right],y\left(x\right)\right)$
 ${y}{}\left({x}\right){=}\left({\int }\frac{{1}}{{{F}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{F}{}\left({x}\right){}{\mathrm{_C2}}{+}{F}{}\left({x}\right){}{\mathrm{_C1}}{+}{F}{}\left({x}\right){}\left(\left({\int }{H}{}\left({x}\right){}{F}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}\left({\int }\frac{{1}}{{{F}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){-}\left({\int }\left({\int }\frac{{1}}{{{F}{}\left({x}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{F}{}\left({x}\right){}{H}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)\right)$ (6)

A nonhomogeneous example step by step

 > $\mathrm{ode}\left[3\right]≔\mathrm{diff}\left(y\left(x\right),\mathrm{}\left(x,2\right)\right)-y\left(x\right)=F\left(x\right)$
 ${{\mathrm{ode}}}_{{3}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right){=}{F}{}\left({x}\right)$ (7)
 > $\mathrm{homogeneous_ode}≔\mathrm{diff}\left(y\left(x\right),\mathrm{}\left(x,2\right)\right)-y\left(x\right)$
 ${\mathrm{homogeneous_ode}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right)$ (8)

Steps 1) and 2) mentioned above

 > $\mathrm{ans_h}≔\mathrm{dsolve}\left(\mathrm{homogeneous_ode}\right)$
 ${\mathrm{ans_h}}{≔}{y}{}\left({x}\right){=}{\mathrm{_C1}}{}{{ⅇ}}^{{-}{x}}{+}{\mathrm{_C2}}{}{{ⅇ}}^{{x}}$ (9)

Step 3): two independent solutions for the homogeneous_ode

 > $\mathrm{sol_1}≔\mathrm{rhs}\left(\mathrm{subs}\left(\left[\mathrm{_C1}=1,\mathrm{_C2}=0\right],\mathrm{ans_h}\right)\right)$
 ${\mathrm{sol_1}}{≔}{{ⅇ}}^{{-}{x}}$ (10)
 > $\mathrm{sol_2}≔\mathrm{rhs}\left(\mathrm{subs}\left(\left[\mathrm{_C1}=0,\mathrm{_C2}=1\right],\mathrm{ans_h}\right)\right)$
 ${\mathrm{sol_2}}{≔}{{ⅇ}}^{{x}}$ (11)

Step 4): a procedure for the general solution to the original nonhomogeneous ODE (ode[3]) is given by

 > $\mathrm{ANS}≔\left(\mathrm{s1},\mathrm{s2},F\right)↦y\left(x\right)=\mathrm{_C1}\cdot \mathrm{s2}+\mathrm{_C2}\cdot \mathrm{s1}+\mathrm{s2}\cdot \left(\mathrm{int}\left(\frac{F\cdot \mathrm{s1}}{W\left(\mathrm{s1},\mathrm{s2}\right)},x\right)\right)-\mathrm{s1}\cdot \left(\mathrm{int}\left(\frac{F\cdot \mathrm{s2}}{W\left(\mathrm{s1},\mathrm{s2}\right)},x\right)\right)$
 ${\mathrm{ANS}}{≔}\left({\mathrm{s1}}{,}{\mathrm{s2}}{,}{F}\right){↦}{y}{}\left({x}\right){=}{\mathrm{_C1}}{\cdot }{\mathrm{s2}}{+}{\mathrm{_C2}}{\cdot }{\mathrm{s1}}{+}{\mathrm{s2}}{\cdot }\left({\int }\frac{{F}{\cdot }{\mathrm{s1}}}{{W}{}\left({\mathrm{s1}}{,}{\mathrm{s2}}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){-}{\mathrm{s1}}{\cdot }\left({\int }\frac{{F}{\cdot }{\mathrm{s2}}}{{W}{}\left({\mathrm{s1}}{,}{\mathrm{s2}}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)$ (12)

where s1 and s2 are the linearly independent solutions of the homogeneous ode (sol_1 and sol_2 above), F is the nonhomogeneous term (here represented by F(x)), and W is the Wronskian, in turn given by

 > $W≔\left(\mathrm{s1},\mathrm{s2}\right)→\mathrm{simplify}\left(\mathrm{s1}\left(\frac{\partial }{\partial x}\mathrm{s2}\right)-\mathrm{s2}\left(\frac{\partial }{\partial x}\mathrm{s1}\right)\right)$
 ${W}{≔}\left({\mathrm{s1}}{,}{\mathrm{s2}}\right){→}{\mathrm{simplify}}{}\left({\mathrm{s1}}{}\left(\frac{{\partial }}{{\partial }{x}}{}{\mathrm{s2}}\right){-}{\mathrm{s2}}{}\left(\frac{{\partial }}{{\partial }{x}}{}{\mathrm{s1}}\right)\right)$ (13)

from which the answer to the nonhomogeneous ODE follows

 > $\mathrm{ans}≔\mathrm{ANS}\left(\mathrm{sol_1},\mathrm{sol_2},F\left(x\right)\right)$
 ${\mathrm{ans}}{≔}{y}{}\left({x}\right){=}{\mathrm{_C1}}{}{{ⅇ}}^{{x}}{+}{\mathrm{_C2}}{}{{ⅇ}}^{{-}{x}}{+}{{ⅇ}}^{{x}}{}\left({\int }\frac{{F}{}\left({x}\right){}{{ⅇ}}^{{-}{x}}}{{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){-}{{ⅇ}}^{{-}{x}}{}\left({\int }\frac{{F}{}\left({x}\right){}{{ⅇ}}^{{x}}}{{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)$ (14)
 > $\mathrm{odetest}\left(\mathrm{ans},\mathrm{ode}\left[3\right]\right)$
 ${0}$ (15)