Systems of ODEs with IVP - 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)$
 > $\mathrm{macro}\left(Y=⟨y\left[1\right]\left(x\right),y\left[2\right]\left(x\right)⟩\right):$
 > $\mathrm{ivpsys2}≔\left\{\mathrm{diff}\left(Y,x\right)=\mathrm{%.}\left(\mathrm{Matrix}\left(\left[\left[7,1\right],\left[\mathrm{-}\left(4\right),3\right]\right]\right),Y\right),\mathrm{eval}\left(Y,x=0\right)=⟨1,1⟩\right\}$
 ${\mathrm{ivpsys2}}{≔}\left\{\left[\begin{array}{c}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{1}}{}\left({x}\right)\\ \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{2}}{}\left({x}\right)\end{array}\right]{=}\left[\begin{array}{cc}{7}& {1}\\ {-4}& {3}\end{array}\right]{·}\left[\begin{array}{c}{{y}}_{{1}}{}\left({x}\right)\\ {{y}}_{{2}}{}\left({x}\right)\end{array}\right]{,}\left[\begin{array}{c}{{y}}_{{1}}{}\left({0}\right)\\ {{y}}_{{2}}{}\left({0}\right)\end{array}\right]{=}\left[\begin{array}{c}{1}\\ {1}\end{array}\right]\right\}$ (2)
 > $\mathrm{ODESteps}\left(\mathrm{ivpsys2}\right)$
 > $\mathrm{ivpsys3}≔\left\{\mathrm{diff}\left(Y,x\right)=\mathrm{Matrix}\left(\left[\left[1,2\right],\left[3,2\right]\right]\right)·Y+⟨1,\mathrm{exp}\left(x\right)⟩,\mathrm{eval}\left(Y,x=1\right)=⟨0,-1⟩\right\}$
 ${\mathrm{ivpsys3}}{≔}\left\{\left[\begin{array}{c}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{1}}{}\left({x}\right)\\ \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{{y}}_{{2}}{}\left({x}\right)\end{array}\right]{=}\left[\begin{array}{c}{{y}}_{{1}}{}\left({x}\right){+}{2}{}{{y}}_{{2}}{}\left({x}\right){+}{1}\\ {3}{}{{y}}_{{1}}{}\left({x}\right){+}{2}{}{{y}}_{{2}}{}\left({x}\right){+}{{ⅇ}}^{{x}}\end{array}\right]{,}\left[\begin{array}{c}{{y}}_{{1}}{}\left({1}\right)\\ {{y}}_{{2}}{}\left({1}\right)\end{array}\right]{=}\left[\begin{array}{c}{0}\\ {-1}\end{array}\right]\right\}$ (3)
 > $\mathrm{ODESteps}\left(\mathrm{ivpsys3}\right)$
 > $\mathrm{ivpsys4}≔\left\{\mathrm{diff}\left(w\left(x\right),x\right)=w\left(x\right)+2z\left(x\right),\mathrm{diff}\left(z\left(x\right),x\right)=3w\left(x\right)+2z\left(x\right)+\mathrm{exp}\left(x\right),w\left(-1\right)=2,z\left(-1\right)=-2\right\}$
 ${\mathrm{ivpsys4}}{≔}\left\{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{w}{}\left({x}\right){=}{w}{}\left({x}\right){+}{2}{}{z}{}\left({x}\right){,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{z}{}\left({x}\right){=}{3}{}{w}{}\left({x}\right){+}{2}{}{z}{}\left({x}\right){+}{{ⅇ}}^{{x}}{,}{w}{}\left({-1}\right){=}{2}{,}{z}{}\left({-1}\right){=}{-2}\right\}$ (4)
 > $\mathrm{ODESteps}\left(\mathrm{ivpsys4}\right)$