// Question 1

function Y=f(t,X)
    Y=[X(2) ; -2*sin(X(1))]
endfunction

// Question 2

function L=eulerE(f,X0,tf,dt)
    X=X0
    L=[X0]
    for i=1:(tf/dt)
        X = X + dt*f(i*dt,X)
        L=[L,X]
    end
endfunction
