ByVariationOfParameters - Maple Help

Home : Support : Online Help : Education : Student Packages : ODEs : Computation : Solve : ByVariationOfParameters

Student[ODEs][Solve]

 ByVariationOfParameters
 Solve a system of first order linear ODEs by the method of variation of parameters

 Calling Sequence ByVariationOfParameters(SYS, Y) ByVariationOfParameters(SYS) ByVariationOfParameters(A, F, x)

Parameters

 SYS - list, set, or equation; a system of first order linear ordinary differential equations Y - list or set or Vector of functions; the solving variables A - Matrix; the Matrix of coefficients F - Vector; the Vector of forcing functions x - name; the independent variable

Description

 • The ByVariationOfParameters(SYS, vars) command finds the solution of a system of first order linear ODEs using variation of parameters.
 • The system SYS may be written as a list or set of ODEs. If the solving variables cannot be unambiguously determined from the form of SYS, Y must also be specified as a list or set containing the solving variables.
 • Alternatively, SYS may be written as a single equation of the form:

$\mathrm{DY}=A·Y+F$

 where Y is a Vector of solving variables, DY a Vector of their derivatives, A is the Matrix of coefficients, and F is the Vector of forcing functions. In this case, Y does not need to be specified as an extra argument since it can be determined from the form of SYS.
 • A third syntax: ByVariationOfParameters(A, F, x) is also available as a shortcut to the above syntax DY = A . Y + F.
 • Use the option output=steps to make this command return an annotated step-by-step solution.  Further control over the format and display of the step-by-step solution is available using the options described in Student:-Basics:-OutputStepsRecord.  The options supported by that command can be passed to this one.

Examples

 > $\mathrm{with}\left({{\mathrm{Student}}_{\mathrm{ODEs}}}_{\mathrm{Solve}}\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,2\right],\left[3,2\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {2}\end{array}\right]$ (1)
 > $F≔⟨1,{ⅇ}^{x}⟩$
 ${F}{≔}\left[\begin{array}{c}{1}\\ {{ⅇ}}^{{x}}\end{array}\right]$ (2)
 > $Y≔⟨\mathrm{y1}\left(x\right),\mathrm{y2}\left(x\right)⟩:$
 > $\mathrm{sys1}≔\frac{\partial }{\partial x}Y=\mathrm{.}\left(A,Y\right)+F$
 ${\mathrm{sys1}}{≔}\left[\begin{array}{c}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y1}}{}\left({x}\right)\\ \frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y2}}{}\left({x}\right)\end{array}\right]{=}\left[\begin{array}{c}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{1}\\ {3}{}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{{ⅇ}}^{{x}}\end{array}\right]$ (3)
 > $\mathrm{Student}:-\mathrm{ODEs}:-\mathrm{Solve}:-\mathrm{ByVariationOfParameters}\left(\mathrm{sys1}\right)$
 $\left[\begin{array}{c}{\mathrm{y1}}{}\left({x}\right)\\ {\mathrm{y2}}{}\left({x}\right)\end{array}\right]{=}\left[\begin{array}{c}{-}\frac{{{ⅇ}}^{{x}}}{{3}}{+}\frac{{1}}{{2}}{-}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{30}}\\ {-}\frac{{3}}{{4}}{+}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{20}}\end{array}\right]$ (4)
 > $\mathrm{sys2}≔\left[\mathrm{seq}\left(\frac{\partial }{\partial x}{Y}_{i}={\left(\mathrm{.}\left(A,Y\right)+F\right)}_{i},i=1..2\right)\right]$
 ${\mathrm{sys2}}{≔}\left[\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y1}}{}\left({x}\right){=}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{1}{,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y2}}{}\left({x}\right){=}{3}{}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{{ⅇ}}^{{x}}\right]$ (5)
 > $\mathrm{Student}:-\mathrm{ODEs}:-\mathrm{Solve}:-\mathrm{ByVariationOfParameters}\left(\mathrm{sys2}\right)$
 $\left[{\mathrm{y1}}{}\left({x}\right){=}{-}\frac{{{ⅇ}}^{{x}}}{{3}}{+}\frac{{1}}{{2}}{-}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{30}}{,}{\mathrm{y2}}{}\left({x}\right){=}{-}\frac{{3}}{{4}}{+}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{20}}\right]$ (6)
 > $\mathrm{sys3}≔\mathrm{convert}\left(\mathrm{sys2},\mathrm{set}\right)$
 ${\mathrm{sys3}}{≔}\left\{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y1}}{}\left({x}\right){=}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{1}{,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{y2}}{}\left({x}\right){=}{3}{}{\mathrm{y1}}{}\left({x}\right){+}{2}{}{\mathrm{y2}}{}\left({x}\right){+}{{ⅇ}}^{{x}}\right\}$ (7)
 > $\mathrm{Student}:-\mathrm{ODEs}:-\mathrm{Solve}:-\mathrm{ByVariationOfParameters}\left(\mathrm{sys3}\right)$
 $\left\{{\mathrm{y1}}{}\left({x}\right){=}{-}\frac{{{ⅇ}}^{{x}}}{{3}}{+}\frac{{1}}{{2}}{-}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{30}}{,}{\mathrm{y2}}{}\left({x}\right){=}{-}\frac{{3}}{{4}}{+}\frac{{2}{}{{ⅇ}}^{{-}{x}}}{{5}}{+}\frac{{7}{}{{ⅇ}}^{{4}{}{x}}}{{20}}\right\}$ (8)

Compatibility

 • The Student[ODEs][Solve][ByVariationOfParameters] command was introduced in Maple 2022.