Skip to the content of the web site.

Finding solutions to systems of first-order initial-value problems in Maple

Author: Douglas Wilhelm Harder

This page shows how to find a solution to a system of first-order initial-value problems (IVP).

Please review how to find a solution to a first-order initial-value problem (IVP) using Maple.

Suppose we have a system of IVPs with ordinary differential equations (ODEs) and a initial conditions (ICs):

$x^{(1)}(t) + 3x(t) + 2y(t) = 1$

$y^{(1)}(t) - 2x(t) + y(t) = 0$
$x(0) = 1$
$y(0) = 2$

Just include both ODEs and ICs within a set and if you are using the graphical-user-interface for Maple, you can force a new line using Shift-Enter:

dsolve( {
    D(x)(t) + 3*x(t) + 2*y(t) = 1,
    D(y)(t) - 2*x(t) +   y(t) = 0,
    x(0) = 1,
    y(0) = 2
}, {x(t), y(t)} );

$\left \{ x(t) = \frac{1}{7} + e^{-2t}\left( -\frac{10\sqrt{3}\sin\left(\sqrt{3} t\right)}{7} + \frac{6\cos\left(\sqrt{3}t\right)}{7} \right), y(t) = \frac{2}{7} + \frac{e^{-2t}\left( \frac{16\sqrt{3}\sin\left(\sqrt{3} t\right)}{7} + \frac{24\cos\left(\sqrt{3}t\right)}{7} \right)}{2}, \right \}$

Here is a system of four first-order IVPs.

dsolve( {
     D(w)(t) = -w(t) + x(t),
     D(x)(t) = -x(t) + y(t),
     D(y)(t) = -y(t) + z(t),
     D(z)(t) = -z(t) + w(t),
     w(0) = 1,
     x(0) = 2,
     y(0) = 3,
     z(0) = 4
}, {w(t), x(t), y(t), z(t)} );

$\left \{ w(t) = \frac{5}{2} - \frac{e^{-2t}}{2} - e^{-t}\sin(t) - e^{-t}\cos(t) \right.,$ $x(t) = \frac{5}{2} + \frac{e^{-2t}}{2} - e^{-t}\cos(t) + e^{-t}\sin(t),$ $y(t) = \frac{5}{2} - \frac{e^{-2t}}{2} + e^{-t}\sin(t) + e^{-t}\cos(t),$ $\left. z(t) = \frac{5}{2} + \frac{e^{-2t}}{2} + e^{-t}\cos(t) - e^{-t}\sin(t) \right \}$