Second Order ODEs - Maple Help

ODE Steps for Second Order ODEs

Overview

 • This help page gives a few examples of using the command ODESteps to solve second order ordinary differential equations.
 • See Student[ODEs][ODESteps] for a general description of the command ODESteps and its calling sequence.

Examples

 > $\mathrm{with}\left(\mathrm{Student}:-\mathrm{ODEs}\right):$
 > $\mathrm{ode1}≔2x\mathrm{diff}\left(y\left(x\right),x\right)-9{x}^{2}+\left(2\mathrm{diff}\left(y\left(x\right),x\right)+{x}^{2}+1\right)\mathrm{diff}\left(y\left(x\right),x,x\right)=0$
 ${\mathrm{ode1}}{≔}{2}{}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}{9}{}{{x}}^{{2}}{+}\left({2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{0}$ (1)
 > $\mathrm{ODESteps}\left(\mathrm{ode1}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& {2}{}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}{9}{}{{x}}^{{2}}{+}\left({2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Make substitution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u=\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{to reduce order of ODE}\\ {}& {}& {2}{}{x}{}{u}{}\left({x}\right){-}{9}{}{{x}}^{{2}}{+}\left({2}{}{u}{}\left({x}\right){+}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}\right)\right){=}{0}\\ \text{▫}& {}& \text{Check if ODE is exact}\\ {}& \text{◦}& \text{ODE is exact if the lhs is the total derivative of a}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{C}^{2}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{function}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}{}\left({x}\right)\right){=}{0}\\ {}& \text{◦}& \text{Compute derivative of lhs}\\ {}& {}& \frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}\right){+}\left(\frac{{\partial }}{{\partial }{u}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}\right)\right){=}{0}\\ {}& \text{◦}& \text{Evaluate derivatives}\\ {}& {}& {2}{}{x}{=}{2}{}{x}\\ {}& \text{◦}& \text{Condition met, ODE is exact}\\ \text{•}& {}& \text{Exact ODE implies solution will be of this form}\\ {}& {}& \left[{F}{}\left({x}{,}{u}\right){=}{\mathrm{C1}}{,}{M}{}\left({x}{,}{u}\right){=}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}\right){,}{N}{}\left({x}{,}{u}\right){=}\frac{{\partial }}{{\partial }{u}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}\right)\right]\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}F{}\left(x,u\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{by integrating}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}M{}\left(x,u\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}x\\ {}& {}& {F}{}\left({x}{,}{u}\right){=}{\int }\left({2}{}{u}{}{x}{-}{9}{}{{x}}^{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_F1}}{}\left({u}\right)\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& {F}{}\left({x}{,}{u}\right){=}{{x}}^{{2}}{}{u}{-}{3}{}{{x}}^{{3}}{+}{\mathrm{_F1}}{}\left({u}\right)\\ \text{•}& {}& \text{Take derivative of}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}F{}\left(x,u\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u\\ {}& {}& {N}{}\left({x}{,}{u}\right){=}\frac{{\partial }}{{\partial }{u}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{u}\right)\\ \text{•}& {}& \text{Compute derivative}\\ {}& {}& {{x}}^{{2}}{+}{2}{}{u}{+}{1}{=}{{x}}^{{2}}{+}\frac{{ⅆ}}{{ⅆ}{u}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_F1}}{}\left({u}\right)\\ \text{•}& {}& \text{Isolate for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{ⅆ}{ⅆu}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\mathrm{_F1}{}\left(u\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{u}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_F1}}{}\left({u}\right){=}{2}{}{u}{+}{1}\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\mathrm{_F1}{}\left(u\right)\\ {}& {}& {\mathrm{_F1}}{}\left({u}\right){=}{{u}}^{{2}}{+}{u}\\ \text{•}& {}& \text{Substitute}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\mathrm{_F1}{}\left(u\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{into equation for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}F{}\left(x,u\right)\\ {}& {}& {F}{}\left({x}{,}{u}\right){=}{{x}}^{{2}}{}{u}{-}{3}{}{{x}}^{{3}}{+}{{u}}^{{2}}{+}{u}\\ \text{•}& {}& \text{Substitute}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}F{}\left(x,u\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{into the solution of the ODE}\\ {}& {}& {{x}}^{{2}}{}{u}{-}{3}{}{{x}}^{{3}}{+}{{u}}^{{2}}{+}{u}{=}{\mathrm{C1}}\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(x\right)\\ {}& {}& \left\{{u}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}{,}{u}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\right\}\\ \text{•}& {}& \text{Solve 1st ODE for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(x\right)\\ {}& {}& {u}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\\ \text{•}& {}& \text{Make substitution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u=\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\\ \text{•}& {}& \text{Integrate both sides to solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\\ {}& {}& {\int }\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }\left({-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{C2}}\\ \text{•}& {}& \text{Compute lhs}\\ {}& {}& {y}{}\left({x}\right){=}{\int }\left({-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{C2}}\\ \text{•}& {}& \text{Solve 2nd ODE for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(x\right)\\ {}& {}& {u}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\\ \text{•}& {}& \text{Make substitution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u=\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\\ \text{•}& {}& \text{Integrate both sides to solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\\ {}& {}& {\int }\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }\left({-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{C2}}\\ \text{•}& {}& \text{Compute lhs}\\ {}& {}& {y}{}\left({x}\right){=}{\int }\left({-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{{x}}^{{4}}{+}{12}{}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{+}{4}{}{\mathrm{C1}}{+}{1}}}{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{C2}}\end{array}$ (2)
 > $\mathrm{ode2}≔\mathrm{diff}\left(y\left(x\right),x,x\right)-\mathrm{diff}\left(y\left(x\right),x\right)-x\mathrm{exp}\left(x\right)=0$
 ${\mathrm{ode2}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{x}{}{{ⅇ}}^{{x}}{=}{0}$ (3)
 > $\mathrm{ODESteps}\left(\mathrm{ode2}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{x}{}{{ⅇ}}^{{x}}{=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate 2nd derivative}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{x}{}{{ⅇ}}^{{x}}\\ \text{•}& {}& \text{Group terms with}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{x}{}{{ⅇ}}^{{x}}\\ \text{•}& {}& \text{Characteristic polynomial of homogeneous ODE}\\ {}& {}& {{r}}^{{2}}{-}{r}{=}{0}\\ \text{•}& {}& \text{Factor the characteristic polynomial}\\ {}& {}& {r}{}\left({r}{-}{1}\right){=}{0}\\ \text{•}& {}& \text{Roots of the characteristic polynomial}\\ {}& {}& {r}{=}\left({0}{,}{1}\right)\\ \text{•}& {}& \text{1st solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{1}\\ \text{•}& {}& \text{2nd solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{{ⅇ}}^{{x}}\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right){+}{{y}}_{{p}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions of the homogeneous ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{+}{\mathrm{C2}}{}{{ⅇ}}^{{x}}{+}{{y}}_{{p}}{}\left({x}\right)\\ \text{▫}& {}& \text{Find a particular solution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{of the ODE}\\ {}& \text{◦}& \text{Use variation of parameters to find}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{here}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}f{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{is the forcing function}\\ {}& {}& \left[{{y}}_{{p}}{}\left({x}\right){=}{-}{{y}}_{{1}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{2}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{{y}}_{{2}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{1}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){,}{f}{}\left({x}\right){=}{x}{}{{ⅇ}}^{{x}}\right]\\ {}& \text{◦}& \text{Wronskian of solutions of the homogeneous equation}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}\left[\begin{array}{cc}{1}& {{ⅇ}}^{{x}}\\ {0}& {{ⅇ}}^{{x}}\end{array}\right]\\ {}& \text{◦}& \text{Compute Wronskian}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}{{ⅇ}}^{{x}}\\ {}& \text{◦}& \text{Substitute functions into equation for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{-}\left({\int }{x}{}{{ⅇ}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{{ⅇ}}^{{x}}{}\left({\int }{x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)\\ {}& \text{◦}& \text{Compute integrals}\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}\left({1}{-}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}\right)\\ \text{•}& {}& \text{Substitute particular solution into general solution to ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{+}{\mathrm{C2}}{}{{ⅇ}}^{{x}}{+}{{ⅇ}}^{{x}}{}\left({1}{-}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}\right)\end{array}$ (4)
 > $\mathrm{ode3}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+\frac{5{\mathrm{diff}\left(y\left(x\right),x\right)}^{2}}{y\left(x\right)}=0$
 ${\mathrm{ode3}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}\frac{{5}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}}{{y}{}\left({x}\right)}{=}{0}$ (5)
 > $\mathrm{ODESteps}\left(\mathrm{ode3}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}\frac{{5}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}}{{y}{}\left({x}\right)}{=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Define new dependent variable}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u\\ {}& {}& {u}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Compute}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}\right){=}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Use chain rule on the lhs}\\ {}& {}& \left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({y}\right)\right){=}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in the definition of}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u\\ {}& {}& {u}{}\left({y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({y}\right)\right){=}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Make substitutions}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)=u{}\left(y\right)\text{,}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)=u{}\left(y\right){}\left(\frac{ⅆ}{ⅆy}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u{}\left(y\right)\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{to reduce order of ODE}\\ {}& {}& {u}{}\left({y}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({y}\right)\right){+}\frac{{5}{}{{u}{}\left({y}\right)}^{{2}}}{{y}}{=}{0}\\ \text{•}& {}& \text{Separate variables}\\ {}& {}& \frac{\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({y}\right)}{{u}{}\left({y}\right)}{=}{-}\frac{{5}}{{y}}\\ \text{•}& {}& \text{Integrate both sides with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y\\ {}& {}& {\int }\frac{\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({y}\right)}{{u}{}\left({y}\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{y}{=}{\int }{-}\frac{{5}}{{y}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{y}{+}{\mathrm{C1}}\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& {\mathrm{ln}}{}\left({u}{}\left({y}\right)\right){=}{-}{5}{}{\mathrm{ln}}{}\left({y}\right){+}{\mathrm{C1}}\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(y\right)\\ {}& {}& {u}{}\left({y}\right){=}\frac{{{ⅇ}}^{{\mathrm{C1}}}}{{{y}}^{{5}}}\\ \text{•}& {}& \text{Solve 1st ODE for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(y\right)\\ {}& {}& {u}{}\left({y}\right){=}\frac{{{ⅇ}}^{{\mathrm{C1}}}}{{{y}}^{{5}}}\\ \text{•}& {}& \text{Revert to original variables with substitution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}u{}\left(y\right)=\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y{}\left(x\right)\text{,}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y=y{}\left(x\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{{ⅇ}}^{{\mathrm{C1}}}}{{{y}{}\left({x}\right)}^{{5}}}\\ \text{•}& {}& \text{Separate variables}\\ {}& {}& \left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{{y}{}\left({x}\right)}^{{5}}{=}{{ⅇ}}^{{\mathrm{C1}}}\\ \text{•}& {}& \text{Integrate both sides with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}x\\ {}& {}& {\int }\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{{y}{}\left({x}\right)}^{{5}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }{{ⅇ}}^{{\mathrm{C1}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{C2}}\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& \frac{{{y}{}\left({x}\right)}^{{6}}}{{6}}{=}{{ⅇ}}^{{\mathrm{C1}}}{}{x}{+}{\mathrm{C2}}\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\\ {}& {}& \left\{{y}{}\left({x}\right){=}{\left({6}{}{{ⅇ}}^{{\mathrm{C1}}}{}{x}{+}{6}{}{\mathrm{C2}}\right)}^{{1}}{{6}}}{,}{y}{}\left({x}\right){=}{-}{\left({6}{}{{ⅇ}}^{{\mathrm{C1}}}{}{x}{+}{6}{}{\mathrm{C2}}\right)}^{{1}}{{6}}}\right\}\end{array}$ (6)
 > $\mathrm{ode4}≔\mathrm{diff}\left(y\left(x\right),x,x\right)-\mathrm{diff}\left(y\left(x\right),x\right)-6y\left(x\right)=0$
 ${\mathrm{ode4}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{6}{}{y}{}\left({x}\right){=}{0}$ (7)
 > $\mathrm{ODESteps}\left(\mathrm{ode4}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{6}{}{y}{}\left({x}\right){=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Characteristic polynomial of ODE}\\ {}& {}& {{r}}^{{2}}{-}{r}{-}{6}{=}{0}\\ \text{•}& {}& \text{Factor the characteristic polynomial}\\ {}& {}& \left({r}{+}{2}\right){}\left({r}{-}{3}\right){=}{0}\\ \text{•}& {}& \text{Roots of the characteristic polynomial}\\ {}& {}& {r}{=}\left({-2}{,}{3}\right)\\ \text{•}& {}& \text{1st solution of the ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{2nd solution of the ODE}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{{ⅇ}}^{{3}{}{x}}\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{{ⅇ}}^{{3}{}{x}}\end{array}$ (8)
 > $\mathrm{ode5}≔\mathrm{diff}\left(y\left(x\right),x,x\right)-\mathrm{diff}\left(y\left(x\right),x\right)={x}^{2}+6y\left(x\right)$
 ${\mathrm{ode5}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{{x}}^{{2}}{+}{6}{}{y}{}\left({x}\right)$ (9)
 > $\mathrm{ODESteps}\left(\mathrm{ode5}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{{x}}^{{2}}{+}{6}{}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate 2nd derivative}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{{x}}^{{2}}{+}{6}{}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Group terms with}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{6}{}{y}{}\left({x}\right){=}{{x}}^{{2}}\\ \text{•}& {}& \text{Characteristic polynomial of homogeneous ODE}\\ {}& {}& {{r}}^{{2}}{-}{r}{-}{6}{=}{0}\\ \text{•}& {}& \text{Factor the characteristic polynomial}\\ {}& {}& \left({r}{+}{2}\right){}\left({r}{-}{3}\right){=}{0}\\ \text{•}& {}& \text{Roots of the characteristic polynomial}\\ {}& {}& {r}{=}\left({-2}{,}{3}\right)\\ \text{•}& {}& \text{1st solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{2nd solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{{ⅇ}}^{{3}{}{x}}\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right){+}{{y}}_{{p}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions of the homogeneous ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{{ⅇ}}^{{3}{}{x}}{+}{{y}}_{{p}}{}\left({x}\right)\\ \text{▫}& {}& \text{Find a particular solution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{of the ODE}\\ {}& \text{◦}& \text{Use variation of parameters to find}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{here}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}f{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{is the forcing function}\\ {}& {}& \left[{{y}}_{{p}}{}\left({x}\right){=}{-}{{y}}_{{1}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{2}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{{y}}_{{2}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{1}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){,}{f}{}\left({x}\right){=}{{x}}^{{2}}\right]\\ {}& \text{◦}& \text{Wronskian of solutions of the homogeneous equation}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}\left[\begin{array}{cc}{{ⅇ}}^{{-}{2}{}{x}}& {{ⅇ}}^{{3}{}{x}}\\ {-}{2}{}{{ⅇ}}^{{-}{2}{}{x}}& {3}{}{{ⅇ}}^{{3}{}{x}}\end{array}\right]\\ {}& \text{◦}& \text{Compute Wronskian}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}{5}{}{{ⅇ}}^{{x}}\\ {}& \text{◦}& \text{Substitute functions into equation for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}\frac{\left({{ⅇ}}^{{5}{}{x}}{}\left({\int }{{x}}^{{2}}{}{{ⅇ}}^{{-}{3}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){-}\left({\int }{{x}}^{{2}}{}{{ⅇ}}^{{2}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)\right){}{{ⅇ}}^{{-}{2}{}{x}}}{{5}}\\ {}& \text{◦}& \text{Compute integrals}\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{-}\frac{{1}}{{6}}{}{{x}}^{{2}}{+}\frac{{1}}{{18}}{}{x}{-}\frac{{7}}{{108}}\\ \text{•}& {}& \text{Substitute particular solution into general solution to ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{{ⅇ}}^{{3}{}{x}}{-}\frac{{{x}}^{{2}}}{{6}}{+}\frac{{x}}{{18}}{-}\frac{{7}}{{108}}\end{array}$ (10)
 > $\mathrm{ode6}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+4y\left(x\right)=-4\mathrm{diff}\left(y\left(x\right),x\right)$
 ${\mathrm{ode6}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){=}{-}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)$ (11)
 > $\mathrm{ODESteps}\left(\mathrm{ode6}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){=}{-}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate 2nd derivative}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}{4}{}{y}{}\left({x}\right){-}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Group terms with}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){+}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{0}\\ \text{•}& {}& \text{Characteristic polynomial of ODE}\\ {}& {}& {{r}}^{{2}}{+}{4}{}{r}{+}{4}{=}{0}\\ \text{•}& {}& \text{Factor the characteristic polynomial}\\ {}& {}& {\left({r}{+}{2}\right)}^{{2}}{=}{0}\\ \text{•}& {}& \text{Root of the characteristic polynomial}\\ {}& {}& {r}{=}{-2}\\ \text{•}& {}& \text{1st solution of the ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{Repeated root, multiply}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{1}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{by}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}x\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{to ensure linear independence}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{x}{}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{x}{}{{ⅇ}}^{{-}{2}{}{x}}\end{array}$ (12)
 > $\mathrm{ode7}≔5\mathrm{diff}\left(y\left(x\right),x,x\right)+20y\left(x\right)+15\mathrm{sin}\left(x\right)=-20\mathrm{diff}\left(y\left(x\right),x\right)$
 ${\mathrm{ode7}}{≔}{5}{}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{20}{}{y}{}\left({x}\right){+}{15}{}{\mathrm{sin}}{}\left({x}\right){=}{-}{20}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)$ (13)
 > $\mathrm{ODESteps}\left(\mathrm{ode7}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& {5}{}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{20}{}{y}{}\left({x}\right){+}{15}{}{\mathrm{sin}}{}\left({x}\right){=}{-}{20}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate 2nd derivative}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}{4}{}{y}{}\left({x}\right){-}{3}{}{\mathrm{sin}}{}\left({x}\right){-}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Group terms with}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}y{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}{y}{}\left({x}\right){+}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}{3}{}{\mathrm{sin}}{}\left({x}\right)\\ \text{•}& {}& \text{Characteristic polynomial of homogeneous ODE}\\ {}& {}& {{r}}^{{2}}{+}{4}{}{r}{+}{4}{=}{0}\\ \text{•}& {}& \text{Factor the characteristic polynomial}\\ {}& {}& {\left({r}{+}{2}\right)}^{{2}}{=}{0}\\ \text{•}& {}& \text{Root of the characteristic polynomial}\\ {}& {}& {r}{=}{-2}\\ \text{•}& {}& \text{1st solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{Repeated root, multiply}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{1}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{by}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}x\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{to ensure linear independence}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{x}{}{{ⅇ}}^{{-}{2}{}{x}}\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right){+}{{y}}_{{p}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions of the homogeneous ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{x}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{{y}}_{{p}}{}\left({x}\right)\\ \text{▫}& {}& \text{Find a particular solution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{of the ODE}\\ {}& \text{◦}& \text{Use variation of parameters to find}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{here}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}f{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{is the forcing function}\\ {}& {}& \left[{{y}}_{{p}}{}\left({x}\right){=}{-}{{y}}_{{1}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{2}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{{y}}_{{2}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{1}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){,}{f}{}\left({x}\right){=}{-}{3}{}{\mathrm{sin}}{}\left({x}\right)\right]\\ {}& \text{◦}& \text{Wronskian of solutions of the homogeneous equation}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}\left[\begin{array}{cc}{{ⅇ}}^{{-}{2}{}{x}}& {x}{}{{ⅇ}}^{{-}{2}{}{x}}\\ {-}{2}{}{{ⅇ}}^{{-}{2}{}{x}}& {{ⅇ}}^{{-}{2}{}{x}}{-}{2}{}{x}{}{{ⅇ}}^{{-}{2}{}{x}}\end{array}\right]\\ {}& \text{◦}& \text{Compute Wronskian}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}{{ⅇ}}^{{-}{4}{}{x}}\\ {}& \text{◦}& \text{Substitute functions into equation for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{3}{}{{ⅇ}}^{{-}{2}{}{x}}{}\left({\int }{\mathrm{sin}}{}\left({x}\right){}{x}{}{{ⅇ}}^{{2}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{-}{x}{}\left({\int }{\mathrm{sin}}{}\left({x}\right){}{{ⅇ}}^{{2}{}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)\right)\\ {}& \text{◦}& \text{Compute integrals}\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}\frac{{12}{}{\mathrm{cos}}{}\left({x}\right)}{{25}}{-}\frac{{9}{}{\mathrm{sin}}{}\left({x}\right)}{{25}}\\ \text{•}& {}& \text{Substitute particular solution into general solution to ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{2}{}{x}}{+}{\mathrm{C2}}{}{x}{}{{ⅇ}}^{{-}{2}{}{x}}{+}\frac{{12}{}{\mathrm{cos}}{}\left({x}\right)}{{25}}{-}\frac{{9}{}{\mathrm{sin}}{}\left({x}\right)}{{25}}\end{array}$ (14)
 > $\mathrm{ode8}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+2y\left(x\right)+2\mathrm{diff}\left(y\left(x\right),x\right)=0$
 ${\mathrm{ode8}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{0}$ (15)
 > $\mathrm{ODESteps}\left(\mathrm{ode8}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){+}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Characteristic polynomial of ODE}\\ {}& {}& {{r}}^{{2}}{+}{2}{}{r}{+}{2}{=}{0}\\ \text{•}& {}& \text{Use quadratic formula to solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}r\\ {}& {}& {r}{=}\frac{\left({-2}\right){±}\left(\sqrt{{-4}}\right)}{{2}}\\ \text{•}& {}& \text{Roots of the characteristic polynomial}\\ {}& {}& {r}{=}\left({-1}{-}{I}{,}{-1}{+}{I}\right)\\ \text{•}& {}& \text{1st solution of the ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}{}{\mathrm{cos}}{}\left({x}\right)\\ \text{•}& {}& \text{2nd solution of the ODE}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}{}{\mathrm{sin}}{}\left({x}\right)\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{-}{x}}{}{\mathrm{cos}}{}\left({x}\right){+}{\mathrm{C2}}{}{{ⅇ}}^{{-}{x}}{}{\mathrm{sin}}{}\left({x}\right)\end{array}$ (16)
 > $\mathrm{ode9}≔\mathrm{diff}\left(y\left(x\right),x,x\right)+2y\left(x\right)-2\mathrm{diff}\left(y\left(x\right),x\right)=\mathrm{exp}\left(x\right)$
 ${\mathrm{ode9}}{≔}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){-}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}$ (17)
 > $\mathrm{ODESteps}\left(\mathrm{ode9}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){-}{2}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\\ {}& {}& \frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Characteristic polynomial of homogeneous ODE}\\ {}& {}& {{r}}^{{2}}{-}{2}{}{r}{+}{2}{=}{0}\\ \text{•}& {}& \text{Use quadratic formula to solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}r\\ {}& {}& {r}{=}\frac{{2}{±}\left(\sqrt{{-4}}\right)}{{2}}\\ \text{•}& {}& \text{Roots of the characteristic polynomial}\\ {}& {}& {r}{=}\left({1}{-}{I}{,}{1}{+}{I}\right)\\ \text{•}& {}& \text{1st solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right)\\ \text{•}& {}& \text{2nd solution of the homogeneous ODE}\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right)\\ \text{•}& {}& \text{General solution of the ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{y}}_{{1}}{}\left({x}\right){+}{\mathrm{C2}}{}{{y}}_{{2}}{}\left({x}\right){+}{{y}}_{{p}}{}\left({x}\right)\\ \text{•}& {}& \text{Substitute in solutions of the homogeneous ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right){+}{\mathrm{C2}}{}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right){+}{{y}}_{{p}}{}\left({x}\right)\\ \text{▫}& {}& \text{Find a particular solution}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{of the ODE}\\ {}& \text{◦}& \text{Use variation of parameters to find}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{here}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}f{}\left(x\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{is the forcing function}\\ {}& {}& \left[{{y}}_{{p}}{}\left({x}\right){=}{-}{{y}}_{{1}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{2}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{{y}}_{{2}}{}\left({x}\right){}\left({\int }\frac{{{y}}_{{1}}{}\left({x}\right){}{f}{}\left({x}\right)}{{W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){,}{f}{}\left({x}\right){=}{{ⅇ}}^{{x}}\right]\\ {}& \text{◦}& \text{Wronskian of solutions of the homogeneous equation}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}\left[\begin{array}{cc}{{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right)& {{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right)\\ {{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right){-}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right)& {{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right){+}{{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right)\end{array}\right]\\ {}& \text{◦}& \text{Compute Wronskian}\\ {}& {}& {W}{}\left({{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{2}}{}\left({x}\right)\right){=}{{ⅇ}}^{{2}{}{x}}\\ {}& \text{◦}& \text{Substitute functions into equation for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}_{p}{}\left(x\right)\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}\left({-}{\mathrm{cos}}{}\left({x}\right){}\left({\int }{\mathrm{sin}}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{\mathrm{sin}}{}\left({x}\right){}\left({\int }{\mathrm{cos}}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)\right)\\ {}& \text{◦}& \text{Compute integrals}\\ {}& {}& {{y}}_{{p}}{}\left({x}\right){=}{{ⅇ}}^{{x}}\\ \text{•}& {}& \text{Substitute particular solution into general solution to ODE}\\ {}& {}& {y}{}\left({x}\right){=}{\mathrm{C1}}{}{{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({x}\right){+}{\mathrm{C2}}{}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({x}\right){+}{{ⅇ}}^{{x}}\end{array}$ (18)