 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}\left[\mathrm{ODEs}\right]\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)\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)

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)\mathrm{diff}\left(z\left(t\right),t\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{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\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{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}}\end{array}$