Contents

Computation of the Solution with ode2:


ode: 'diff(y(t), t, 2) + 5*'diff(y(t), t) + 4*y(t) = t;
     2
    d               d
    --- (y(t)) + 5 (-- (y(t))) + 4 y(t) = t
      2
    dt              dt
ode2(ode, y(t), t);
                - t         - 4 t   4 t - 5
   y(t) = %k1 %e    + %k2 %e      + -------
                                      16
sol: ic2(%o2, t=0, y(t)=0, 'diff(y(t), t) = 0);
			- t		      - 4 t
	 (4 y(0) + 1) %e      (16 y(0) + 1) %e	      4 t - 5
  y(t) = ------------------ - --------------------- + -------
		 3		       48	        16

This result is still not entirely satisfying; the value of y(0) should be zero. We use substitution to further simplify:

  %, y(0)=0;
       - t     - 4 t
     %e      %e        4 t - 5
 y = ----- - ------- + -------
       3        48        16

It is also possible to use a simpler notation with ode2:

 eq: 'diff(y, x, 2) + 5*'diff(y,x) + 4*y = x;
     2
    d y	    dy
    --- + 5 -- + 4 y = x
      2	    dx
    dx
 ode2(eq, y, x);
          - x         - 4 x   4 x - 5
y = %k1 %e    + %k2 %e      + -------
                                16
 sol: ic2(%, x=0, y=0, 'diff(x, y) = 0);
       - x     - 4 x
     %e      %e        4 x - 5
 y = ----- - ------- + -------
       3        48        16

The availability of different notations is a frequent source of confusion. We remember:



Contents