PLEASE HELP ME. I NEED HELP REALLY BAD.

Restrict calculation to real numbers.

Using y' = u, express the oscillator equation: y" + 3y' + 2y = cos(t) as a first order system.

Plot an approximate solution curve for the specified initial conditions.

[x_{0}=5, y_{0}=1],[x_{0}=-2, y_{0}=-4],[x_{0}=0, y_{0}=.1],

This is what i have so far but i am not sure if its correct.

Eulers modified method:

with(RealDomain);

x[0] := 0;

y[0] := 5;

t[0]=0

h := .1;

for n to 100 do

x[n] := x[n-1]+h*(x[n-1]+y[n-1]);

k1 := x[n-1]+y[n-1];

k2 := h*k1+x[n]+y[n-1];

k := 1/2*(k1+k2);

y[n] := h*k+y[n-1]

end do;

data := [seq([x[n], y[n]], n = 0 .. 100)];

G1 := plot(data, style = point, color = "blue");

G1;