FirstOrderODEs - Maple Help

ODE Steps for First Order ODEs

Overview

 • This help page gives a few examples of using the command ODESteps to solve first 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}≔{t}^{2}\left(z\left(t\right)+1\right)+{z\left(t\right)}^{2}\left(t-1\right)\mathrm{diff}\left(z\left(t\right),t\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)
 > $\mathrm{ode2}≔\frac{\mathrm{diff}\left(y\left(x\right),x\right)}{f\left(x\right)}+y\left(x\right)+g\left(x\right)=0$
 ${\mathrm{ode2}}{≔}\frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{f}{}\left({x}\right)}{+}{y}{}\left({x}\right){+}{g}{}\left({x}\right){=}{0}$ (3)
 > $\mathrm{ODESteps}\left(\mathrm{ode2}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{f}{}\left({x}\right)}{+}{y}{}\left({x}\right){+}{g}{}\left({x}\right){=}{0}\\ \text{•}& {}& {\text{Highest derivative means the order of the ODE is}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{1}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate the derivative}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}{f}{}\left({x}\right){}{y}{}\left({x}\right){-}{f}{}\left({x}\right){}{g}{}\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}}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{f}{}\left({x}\right){}{y}{}\left({x}\right){=}{-}{f}{}\left({x}\right){}{g}{}\left({x}\right)\\ \text{•}& {}& {\text{The ODE is linear; multiply by an integrating factor}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{f}{}\left({x}\right){}{y}{}\left({x}\right)\right){=}{-}{\mathrm{\mu }}{}\left({x}\right){}{f}{}\left({x}\right){}{g}{}\left({x}\right)\\ \text{•}& {}& {\text{Assume the lhs of the ODE is the total derivative}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\left[{}\right]\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{f}{}\left({x}\right){}{y}{}\left({x}\right)\right){=}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\right){}{y}{}\left({x}\right){+}{\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\\ \text{•}& {}& {\text{Isolate}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{\mathrm{\mu }}{}\left({x}\right){}{f}{}\left({x}\right)\\ \text{•}& {}& \text{Solve to find the integrating factor}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}\\ \text{•}& {}& {\text{Integrate both sides with respect to}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{x}\\ {}& {}& \left[{}\right]{=}{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{f}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& \text{Evaluate the integral on the lhs}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}{y}{}\left({x}\right){=}{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{f}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}{}\left({x}\right)\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{f}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{\mathrm{\mu }}{}\left({x}\right)}\\ \text{•}& {}& {\text{Substitute}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{-}{{ⅇ}}^{{\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{}{f}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{{ⅇ}}^{{\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {y}{}\left({x}\right){=}{{ⅇ}}^{{-}\left({\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)}{}\left({-}\left({\int }{{ⅇ}}^{{\int }{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{}{f}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{\mathrm{_C1}}\right)\end{array}$ (4)
 > $\mathrm{ode3}≔\frac{\mathrm{diff}\left(y\left(x\right),x\right)}{y\left(x\right)}+1+\frac{g\left(x\right)}{y\left(x\right)}=0$
 ${\mathrm{ode3}}{≔}\frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{y}{}\left({x}\right)}{+}{1}{+}\frac{{g}{}\left({x}\right)}{{y}{}\left({x}\right)}{=}{0}$ (5)
 > $\mathrm{ODESteps}\left(\mathrm{ode3}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{y}{}\left({x}\right)}{+}{1}{+}\frac{{g}{}\left({x}\right)}{{y}{}\left({x}\right)}{=}{0}\\ \text{•}& {}& {\text{Highest derivative means the order of the ODE is}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{1}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate the derivative}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-}{y}{}\left({x}\right){-}{g}{}\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}}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right){=}{-}{g}{}\left({x}\right)\\ \text{•}& {}& {\text{The ODE is linear; multiply by an integrating factor}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right)\right){=}{-}{\mathrm{\mu }}{}\left({x}\right){}{g}{}\left({x}\right)\\ \text{•}& {}& {\text{Assume the lhs of the ODE is the total derivative}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\left[{}\right]\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right)\right){=}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\right){}{y}{}\left({x}\right){+}{\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\\ \text{•}& {}& {\text{Isolate}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{\mathrm{\mu }}{}\left({x}\right)\\ \text{•}& {}& \text{Solve to find the integrating factor}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{x}}\\ \text{•}& {}& {\text{Integrate both sides with respect to}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{x}\\ {}& {}& \left[{}\right]{=}{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& \text{Evaluate the integral on the lhs}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}{y}{}\left({x}\right){=}{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}{}\left({x}\right)\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{-}{\mathrm{\mu }}{}\left({x}\right){}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{\mathrm{\mu }}{}\left({x}\right)}\\ \text{•}& {}& {\text{Substitute}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{x}}\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{-}{{ⅇ}}^{{x}}{}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{{ⅇ}}^{{x}}}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {y}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}{}\left({-}\left({\int }{{ⅇ}}^{{x}}{}{g}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){+}{\mathrm{_C1}}\right)\end{array}$ (6)
 > $\mathrm{ode4}≔2xy\left(x\right)-9{x}^{2}+\left(2y\left(x\right)+{x}^{2}+1\right)\mathrm{diff}\left(y\left(x\right),x\right)=0$
 ${\mathrm{ode4}}{≔}{2}{}{x}{}{y}{}\left({x}\right){-}{9}{}{{x}}^{{2}}{+}\left({2}{}{y}{}\left({x}\right){+}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{0}$ (7)
 > $\mathrm{ODESteps}\left(\mathrm{ode4}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& {2}{}{x}{}{y}{}\left({x}\right){-}{9}{}{{x}}^{{2}}{+}\left({2}{}{y}{}\left({x}\right){+}{{x}}^{{2}}{+}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\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}}{1}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \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}{,}{y}\right){+}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\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}{,}{y}\right){=}{\mathrm{_C1}}{,}{M}{}\left({x}{,}{y}\right){=}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}\right){,}{N}{}\left({x}{,}{y}\right){=}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}\right)\right]\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{F}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\text{by integrating}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{M}{}\left({x}{,}{y}\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}{,}{y}\right){=}\left[{}\right]{+}{\mathrm{_F1}}{}\left({y}\right)\\ \text{•}& {}& \text{Evaluate integral}\\ {}& {}& {F}{}\left({x}{,}{y}\right){=}{-}{3}{}{{x}}^{{3}}{+}{{x}}^{{2}}{}{y}{+}{\mathrm{_F1}}{}\left({y}\right)\\ \text{•}& {}& {\text{Take derivative of}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{F}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\text{with respect to}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}\\ {}& {}& {N}{}\left({x}{,}{y}\right){=}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}\right)\\ \text{•}& {}& \text{Compute derivative}\\ {}& {}& {{x}}^{{2}}{+}{2}{}{y}{+}{1}{=}{{x}}^{{2}}{+}\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_F1}}{}\left({y}\right)\\ \text{•}& {}& {\text{Isolate for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_F1}}{}\left({y}\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{_F1}}{}\left({y}\right){=}{2}{}{y}{+}{1}\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{_F1}}{}\left({y}\right)\\ {}& {}& {\mathrm{_F1}}{}\left({y}\right){=}{{y}}^{{2}}{+}{y}\\ \text{•}& {}& {\text{Substitute}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{_F1}}{}\left({y}\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\text{into equation for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{F}{}\left({x}{,}{y}\right)\\ {}& {}& {F}{}\left({x}{,}{y}\right){=}{-}{3}{}{{x}}^{{3}}{+}{{x}}^{{2}}{}{y}{+}{{y}}^{{2}}{+}{y}\\ \text{•}& {}& {\text{Substitute}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{F}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\text{into the solution of the ODE}}\\ {}& {}& {-}{3}{}{{x}}^{{3}}{+}{{x}}^{{2}}{}{y}{+}{{y}}^{{2}}{+}{y}{=}{\mathrm{_C1}}\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}{}\left({x}\right)\\ {}& {}& \left\{{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}}{,}{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}}\right\}\end{array}$ (8)
 > $\mathrm{ode5}≔\mathrm{diff}\left(y\left(x\right),x\right)-y\left(x\right)-x\mathrm{exp}\left(x\right)=0$
 ${\mathrm{ode5}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right){-}{x}{}{{ⅇ}}^{{x}}{=}{0}$ (9)
 > $\mathrm{ODESteps}\left(\mathrm{ode5}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{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}}{1}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{•}& {}& \text{Isolate the derivative}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{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}}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right){=}{x}{}{{ⅇ}}^{{x}}\\ \text{•}& {}& {\text{The ODE is linear; multiply by an integrating factor}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right)\right){=}{\mathrm{\mu }}{}\left({x}\right){}{x}{}{{ⅇ}}^{{x}}\\ \text{•}& {}& {\text{Assume the lhs of the ODE is the total derivative}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\left[{}\right]\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{y}{}\left({x}\right)\right){=}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\right){}{y}{}\left({x}\right){+}{\mathrm{\mu }}{}\left({x}\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)\\ \text{•}& {}& {\text{Isolate}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right)\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{-}{\mathrm{\mu }}{}\left({x}\right)\\ \text{•}& {}& \text{Solve to find the integrating factor}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}\\ \text{•}& {}& {\text{Integrate both sides with respect to}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{x}\\ {}& {}& \left[{}\right]{=}{\int }{\mathrm{\mu }}{}\left({x}\right){}{x}{}{{ⅇ}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& \text{Evaluate the integral on the lhs}\\ {}& {}& {\mathrm{\mu }}{}\left({x}\right){}{y}{}\left({x}\right){=}{\int }{\mathrm{\mu }}{}\left({x}\right){}{x}{}{{ⅇ}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}\\ \text{•}& {}& {\text{Solve for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{y}{}\left({x}\right)\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{\mathrm{\mu }}{}\left({x}\right){}{x}{}{{ⅇ}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{\mathrm{\mu }}{}\left({x}\right)}\\ \text{•}& {}& {\text{Substitute}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\mathrm{\mu }}{}\left({x}\right){=}{{ⅇ}}^{{-}{x}}\\ {}& {}& {y}{}\left({x}\right){=}\frac{{\int }{{ⅇ}}^{{-}{x}}{}{x}{}{{ⅇ}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\mathrm{_C1}}}{{{ⅇ}}^{{-}{x}}}\\ \text{•}& {}& \text{Evaluate the integrals on the rhs}\\ {}& {}& {y}{}\left({x}\right){=}\frac{\frac{{{x}}^{{2}}}{{2}}{+}{\mathrm{_C1}}}{{{ⅇ}}^{{-}{x}}}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {y}{}\left({x}\right){=}\frac{{{ⅇ}}^{{x}}{}\left({{x}}^{{2}}{+}{2}{}{\mathrm{_C1}}\right)}{{2}}\end{array}$ (10)