Overview - Maple Help

Student[ODEs]

 ODESteps
 Show a step-by-step solution process for ODEs, IVPs, or systems

 Calling Sequence ODESteps(ODE) ODESteps(ODE, y(x)) ODESteps(sys)

Parameters

 ODE - an ordinary differential equation y - name ; the dependent variable x - name ; the independent variable sys - set ; an ODE system including initial values

Description

 • The ODESteps() command solves an ordinary differential equation (ODE) or system of ODEs.
 • The input may include a corresponding set of initial values, which would make it an initial value problem (IVP).
 • The output shows a series of steps in the solving process.
 • The following types of ODEs and ODE systems and/or solving methods are considered:

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{ODEs}}\right):$

A first order ODE:

 > $\mathrm{ode1}≔{t}^{2}\left(z\left(t\right)+1\right)+{z\left(t\right)}^{2}\left(t-1\right)\left(\frac{ⅆ}{ⅆt}z\left(t\right)\right)=0$
 ${\mathrm{ode1}}{≔}{{t}}^{{2}}{}\left({z}{}\left({t}\right){+}{1}\right){+}{{z}{}\left({t}\right)}^{{2}}{}\left({t}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){=}{0}$ (1)
 > $\mathrm{ODESteps}\left(\mathrm{ode1}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& {{t}}^{{2}}{}\left({z}{}\left({t}\right){+}{1}\right){+}{{z}{}\left({t}\right)}^{{2}}{}\left({t}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){=}{0}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}1\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\\ \text{•}& {}& \text{Separate variables}\\ {}& {}& \frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}{{z}{}\left({t}\right)}^{{2}}}{{z}{}\left({t}\right){+}{1}}{=}{-}\frac{{{t}}^{{2}}}{{t}{-}{1}}\\ \text{•}& {}& \text{Integrate both sides with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}t\\ {}& {}& {\int }\frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}{{z}{}\left({t}\right)}^{{2}}}{{z}{}\left({t}\right){+}{1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}{=}{\int }{-}\frac{{{t}}^{{2}}}{{t}{-}{1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}{+}{\mathrm{C1}}\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& \frac{{{z}{}\left({t}\right)}^{{2}}}{{2}}{-}{z}{}\left({t}\right){+}{\mathrm{ln}}{}\left({z}{}\left({t}\right){+}{1}\right){=}{-}\frac{{{t}}^{{2}}}{{2}}{-}{t}{-}{\mathrm{ln}}{}\left({t}{-}{1}\right){+}{\mathrm{C1}}\end{array}$ (2)

A first order IVP:

 > $\mathrm{ivp1}≔\left\{{t}^{2}\left(z\left(t\right)+1\right)+{z\left(t\right)}^{2}\left(t-1\right)\left(\frac{ⅆ}{ⅆt}z\left(t\right)\right)=0,z\left(3\right)=1\right\}$
 ${\mathrm{ivp1}}{≔}\left\{{{t}}^{{2}}{}\left({z}{}\left({t}\right){+}{1}\right){+}{{z}{}\left({t}\right)}^{{2}}{}\left({t}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){=}{0}{,}{z}{}\left({3}\right){=}{1}\right\}$ (3)
 > $\mathrm{ODESteps}\left(\mathrm{ivp1}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \left\{{{t}}^{{2}}{}\left({z}{}\left({t}\right){+}{1}\right){+}{{z}{}\left({t}\right)}^{{2}}{}\left({t}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){=}{0}{,}{z}{}\left({3}\right){=}{1}\right\}\\ \text{•}& {}& \text{Highest derivative means the order of the ODE is}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}1\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\\ \text{•}& {}& \text{Separate variables}\\ {}& {}& \frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}{{z}{}\left({t}\right)}^{{2}}}{{z}{}\left({t}\right){+}{1}}{=}{-}\frac{{{t}}^{{2}}}{{t}{-}{1}}\\ \text{•}& {}& \text{Integrate both sides with respect to}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}t\\ {}& {}& {\int }\frac{\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({t}\right)\right){}{{z}{}\left({t}\right)}^{{2}}}{{z}{}\left({t}\right){+}{1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}{=}{\int }{-}\frac{{{t}}^{{2}}}{{t}{-}{1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}{+}{\mathrm{C1}}\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& \frac{{{z}{}\left({t}\right)}^{{2}}}{{2}}{-}{z}{}\left({t}\right){+}{\mathrm{ln}}{}\left({z}{}\left({t}\right){+}{1}\right){=}{-}\frac{{{t}}^{{2}}}{{2}}{-}{t}{-}{\mathrm{ln}}{}\left({t}{-}{1}\right){+}{\mathrm{C1}}\\ \text{•}& {}& \text{Use initial condition}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}z{}\left(3\right)=1\\ {}& {}& {-}\frac{{1}}{{2}}{+}{\mathrm{ln}}{}\left({2}\right){=}{-}\frac{{15}}{{2}}{-}{\mathrm{ln}}{}\left({2}\right){+}{\mathrm{C1}}\\ \text{•}& {}& \text{Solve for}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\mathrm{_C1}\\ {}& {}& {\mathrm{C1}}{=}{7}{+}{2}{}{\mathrm{ln}}{}\left({2}\right)\\ \text{•}& {}& \text{Substitute}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\mathrm{_C1}=7+2{}\mathrm{ln}{}\left(2\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{into general solution and simplify}\\ {}& {}& \frac{{{z}{}\left({t}\right)}^{{2}}}{{2}}{-}{z}{}\left({t}\right){+}{\mathrm{ln}}{}\left({z}{}\left({t}\right){+}{1}\right){=}{-}\frac{{{t}}^{{2}}}{{2}}{-}{t}{-}{\mathrm{ln}}{}\left({t}{-}{1}\right){+}{7}{+}{2}{}{\mathrm{ln}}{}\left({2}\right)\\ \text{•}& {}& \text{Solution to the IVP}\\ {}& {}& \frac{{{z}{}\left({t}\right)}^{{2}}}{{2}}{-}{z}{}\left({t}\right){+}{\mathrm{ln}}{}\left({z}{}\left({t}\right){+}{1}\right){=}{-}\frac{{{t}}^{{2}}}{{2}}{-}{t}{-}{\mathrm{ln}}{}\left({t}{-}{1}\right){+}{7}{+}{2}{}{\mathrm{ln}}{}\left({2}\right)\end{array}$ (4)

A second order ODE:

 > $\mathrm{ode2}≔2x\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)-9{x}^{2}+\left(2\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)+{x}^{2}+1\right)\left(\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)\right)=0$
 ${\mathrm{ode2}}{≔}{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}$ (5)
 > $\mathrm{ODESteps}\left(\mathrm{ode2}\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}\\ {}& {}& \left[{}\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){=}\left[{}\right]{+}{\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}$ (6)

A second order IVP:

 > $\mathrm{ivp2}≔\left\{\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}y\left(x\right)-\left(\frac{ⅆ}{ⅆx}y\left(x\right)\right)-x{ⅇ}^{x}=0,\genfrac{}{}{0}{}{\frac{ⅆ}{ⅆx}y\left(x\right)}{\phantom{x=0}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}|\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\frac{ⅆ}{ⅆx}y\left(x\right)}}{x=0}=0,y\left(0\right)=1\right\}$
 ${\mathrm{ivp2}}{≔}\left\{\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}{,}\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{0}{,}{y}{}\left({0}\right){=}{1}\right\}$ (7)
 > $\mathrm{ODESteps}\left(\mathrm{ivp2}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \left\{\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}{,}\genfrac{}{}{0}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{0}{,}{y}{}\left({0}\right){=}{1}\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}{}{{ⅇ}}^{{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({}_{}\right)}\right)\right]\end{array}$