SystemsOfODEsWithIVP - Maple Help

ODE Steps for Systems of ODEs with IVP

Overview

 • This help page gives a few examples of using the command ODESteps to solve systems of ordinary differential equations with initial values.
 • 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{high_order_ivp1}≔\left\{\mathrm{diff}\left(y\left(x\right),x,x,x\right)+3\mathrm{diff}\left(y\left(x\right),x,x\right)+4\mathrm{diff}\left(y\left(x\right),x\right)+2y\left(x\right)=0,\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x\right),x=0\right)=-1,\mathrm{eval}\left(\mathrm{diff}\left(y\left(x\right),x,x\right),x=0\right)=2,y\left(0\right)=1\right\}$
 ${\mathrm{high_order_ivp1}}{≔}\left\{\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{3}{}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){=}{0}{,}\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{2}{,}\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\}}{=}{-1}{,}{y}{}\left({0}\right){=}{1}\right\}$ (1)
 > $\mathrm{ODESteps}\left(\mathrm{high_order_ivp1}\right)$
 $\begin{array}{lll}{}& {}& \text{Let's solve}\\ {}& {}& \left\{\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{3}{}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{4}{}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{2}{}{y}{}\left({x}\right){=}{0}{,}\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}{=}{2}{,}\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\}}{=}{-1}{,}{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}}{3}\\ {}& {}& \frac{{{ⅆ}}^{{3}}}{{ⅆ}{{x}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ \text{▫}& {}& \text{Convert linear ODE into a system of first order ODEs}\\ {}& \text{◦}& {\text{Define new variable}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{{y}}_{{1}}{}\left({x}\right)\\ {}& {}& {{y}}_{{1}}{}\left({x}\right){=}{y}{}\left({x}\right)\\ {}& \text{◦}& {\text{Define new variable}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{{y}}_{{2}}{}\left({x}\right)\\ {}& {}& {{y}}_{{2}}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ {}& \text{◦}& {\text{Define new variable}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{{y}}_{{3}}{}\left({x}\right)\\ {}& {}& {{y}}_{{3}}{}\left({x}\right){=}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\\ {}& \text{◦}& {\text{Isolate for}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{3}}{}\left({x}\right)\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{\text{using original ODE}}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{3}}{}\left({x}\right){=}{-}{3}{}{{y}}_{{3}}{}\left({x}\right){-}{4}{}{{y}}_{{2}}{}\left({x}\right){-}{2}{}{{y}}_{{1}}{}\left({x}\right)\\ {}& {}& \text{Convert linear ODE into a system of first order ODEs}\\ {}& {}& \left[{{y}}_{{2}}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{1}}{}\left({x}\right){,}{{y}}_{{3}}{}\left({x}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{2}}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{3}}{}\left({x}\right){=}{-}{3}{}{{y}}_{{3}}{}\left({x}\right){-}{4}{}{{y}}_{{2}}{}\left({x}\right){-}{2}{}{{y}}_{{1}}{}\left({x}\right)\right]\\ \text{•}& {}& \text{Define vector}\\ {}& {}& \stackrel{{\to }}{{y}}{}\left({x}\right){=}\left[\begin{array}{c}{{y}}_{{3}}{}\left({x}\right)\\ {{y}}_{{1}}{}\left({x}\right)\\ {{y}}_{{2}}{}\left({x}\right)\end{array}\right]\\ \text{•}& {}& \text{System to solve}\\ {}& {}& \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\stackrel{{\to }}{{y}}{}\left({x}\right){=}{A}{·}\stackrel{{\to }}{{y}}{}\left({x}\right)\\ \text{•}& {}& {\text{To solve the system find eigenvalues and eigenvectors of}}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}{A}\\ {}& {}& {A}{=}\left[\begin{array}{ccc}{-3}& {-2}& {-4}\\ {0}& {0}& {1}\\ {1}& {0}& {0}\end{array}\right]\\ \text{•}& {}& \text{Eigenpairs of A}\\ {}& {}& \left[\left[{-1}{+}{I}{,}\left[\begin{array}{c}{-1}{+}{I}\\ {-}\frac{{1}}{{2}}{-}\frac{{I}}{{2}}\\ {1}\end{array}\right]\right]{,}\left[{-1}{-}{I}{,}\left[\begin{array}{c}{-1}{-}{I}\\ {-}\frac{{1}}{{2}}{+}\frac{{I}}{{2}}\\ {1}\end{array}\right]\right]{,}\left[{-1}{,}\left[\begin{array}{c}{-1}\\ {-1}\\ {1}\end{array}\right]\right]\right]\\ \text{•}& {}& \text{Consider complex eigenpair, complex conjugate eigenvalue can be ignored}\\ {}& {}& \left[{-1}{+}{I}{,}\left[\begin{array}{c}{-1}{+}{I}\\ {-}\frac{{1}}{{2}}{-}\frac{{I}}{{2}}\\ {1}\end{array}\right]\right]\\ \text{•}& {}& \text{Solution from eigenpair}\\ {}& {}& \left[{}\right]\\ \text{•}& {}& \text{Use Euler identity to write solution in terms of sin and cos}\\ {}& {}& \left[{}\right]\\ \text{•}& {}& \text{Simplify expression}\\ {}& {}& \left[{}\right]\\ \text{•}& {}& \text{Both real and imaginary parts are solutions to the homogeneous system}\\ {}& {}& \left[{\stackrel{{\to }}{{y}}}_{{1}}{}\left({x}\right){=}\left[{}\right]{,}{\stackrel{{\to }}{{y}}}_{{2}}{}\left({x}\right){=}\left[{}\right]\right]\\ \text{•}& {}& \text{Consider eigenpair}\\ \end{array}$