convertsys - Maple Help

DEtools

 convertsys
 convert a system of differential equations to a first-order system

 Calling Sequence convertsys(deqns, inits, vars, ivar, yvec, ypvec)

Parameters

 deqns - ordinary differential equation, or set or list of equations; can be specified as expressions, which are assumed equal to zero inits - set or list of initial conditions vars - function or list or set of functions; dependent variables of the system ivar - independent variable yvec - (optional) name to be used for the solution vector in the first-order system ypvec - (optional) name to be used for the yvec' vector in the first-order system

Description

 • DEtools[convertsys] converts a system of one or more ordinary differential equations to a system of first-order differential equations. Corresponding initial conditions (if specified) are also converted.
 • The initial conditions inits must each be of the form function = expression.  See examples below. Note: if no initial conditions are available, inits must still be specified as {} or [].
 • The convertsys command returns a list $\left[\mathrm{eqnlist},\mathrm{Ydefs},\mathrm{x0},\mathrm{Y0}\right]$ where
 * $\mathrm{eqnlist}$ is the list of equations representing the first-order system $Y'\left(x\right)=f\left(x,Y\left(x\right)\right)$ in which the $Y$ vector is specified by ${\mathrm{yvec}}_{1},...,{\mathrm{yvec}}_{\mathrm{neqns}}$ and the $Y'$ vector by ${\mathrm{ypvec}}_{1},...,{\mathrm{ypvec}}_{\mathrm{neqns}}$.
 * $\mathrm{Ydefs}$ is the list of equations defining the ${\mathrm{yvec}}_{i}$ names in terms of the original functions.
 * $\mathrm{x0}$ is the point at which the initial conditions are specified. It is returned as undefined if inits is the empty set.
 * $\mathrm{Y0}$ is a list representing the vector of initial conditions (possibly empty).  Only one of the initial conditions needs to be specified for this list to be nonempty.  Note that the ordering of $\mathrm{Y0}$ matches that of $\mathrm{Ydefs}$, not that of inits.
 • This function is part of the DEtools package, and so it can be used in the form convertsys(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[convertsys](..).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$
 > $\mathrm{deq1}≔\frac{{ⅆ}^{2}}{ⅆ{t}^{2}}y\left(t\right)=y\left(t\right)-x\left(t\right),\frac{ⅆ}{ⅆt}x\left(t\right)=x\left(t\right):$
 > $\mathrm{init1}≔y\left(0\right)=1,\mathrm{D}\left(y\right)\left(0\right)=2,x\left(0\right)=3:$
 > $\mathrm{convertsys}\left(\left\{\mathrm{deq1}\right\},\left\{\mathrm{init1}\right\},\left\{x\left(t\right),y\left(t\right)\right\},t,y,\mathrm{y_p}\right)$
 $\left[\left[{{\mathrm{y_p}}}_{{1}}{=}{{y}}_{{1}}{,}{{\mathrm{y_p}}}_{{2}}{=}{{y}}_{{3}}{,}{{\mathrm{y_p}}}_{{3}}{=}{{y}}_{{2}}{-}{{y}}_{{1}}\right]{,}\left[{{y}}_{{1}}{=}{x}{}\left({t}\right){,}{{y}}_{{2}}{=}{y}{}\left({t}\right){,}{{y}}_{{3}}{=}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right]{,}{0}{,}\left[{3}{,}{1}{,}{2}\right]\right]$ (1)
 > $\mathrm{deq2}≔{\mathrm{D}}^{\left(3\right)}\left(y\right)\left(x\right)=y\left(x\right)x:$
 > $\mathrm{init2}≔y\left(0\right)=3,\mathrm{D}\left(y\right)\left(0\right)=2,{\mathrm{D}}^{\left(2\right)}\left(y\right)\left(0\right)=1:$
 > $\mathrm{convertsys}\left(\mathrm{deq2},\left[\mathrm{init2}\right],y\left(x\right),x\right)$
 $\left[\left[{{\mathrm{YP}}}_{{1}}{=}{{Y}}_{{2}}{,}{{\mathrm{YP}}}_{{2}}{=}{{Y}}_{{3}}{,}{{\mathrm{YP}}}_{{3}}{=}{{Y}}_{{1}}{}{x}\right]{,}\left[{{Y}}_{{1}}{=}{y}{}\left({x}\right){,}{{Y}}_{{2}}{=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){,}{{Y}}_{{3}}{=}\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right]{,}{0}{,}\left[{3}{,}{2}{,}{1}\right]\right]$ (2)
 > $\mathrm{deq3}≔\frac{{ⅆ}^{2}}{ⅆ{t}^{2}}y\left(t\right)=100\left({ⅇ}^{-10t}+{ⅇ}^{10t}\right):$
 > $\mathrm{convertsys}\left(\left\{\mathrm{deq3}\right\},\left[\right],y\left(t\right),t,V\right)$
 $\left[\left[{{\mathrm{YP}}}_{{1}}{=}{{V}}_{{2}}{,}{{\mathrm{YP}}}_{{2}}{=}{100}{}{{ⅇ}}^{{-}{10}{}{t}}{+}{100}{}{{ⅇ}}^{{10}{}{t}}\right]{,}\left[{{V}}_{{1}}{=}{y}{}\left({t}\right){,}{{V}}_{{2}}{=}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right]{,}{\mathrm{undefined}}{,}\left[\right]\right]$ (3)
 > $\mathrm{convertsys}\left(\left\{\mathrm{deq3}\right\},\mathrm{D}\left(y\right)\left(0\right)=1,y\left(t\right),t,V\right)$
 $\left[\left[{{\mathrm{YP}}}_{{1}}{=}{{V}}_{{2}}{,}{{\mathrm{YP}}}_{{2}}{=}{100}{}{{ⅇ}}^{{-}{10}{}{t}}{+}{100}{}{{ⅇ}}^{{10}{}{t}}\right]{,}\left[{{V}}_{{1}}{=}{y}{}\left({t}\right){,}{{V}}_{{2}}{=}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)\right]{,}{0}{,}\left[{y}{}\left({0}\right){,}{1}\right]\right]$ (4)