Loading

   

Demonstration of class ODESolver usage: A differential system of equations

We present a program to solve by a numerical scheme a system of first-order linear differential equations of the form

                  A1y' + A0y = f
where the matrices A0 and A1 are
        | 0  -1 |            | 1  0 |       |      0       |
   A0 = |       |,      A1 = |      |, f =  |              |
        | 1  -1 |            | 0  1 |       | 3(t-1)exp(t) |

With adapted initial conditions, the solution is given by
        y1(t) = t*exp(-t), y2(t) = (1-t)*exp(-t)