These are relatively straightforward. To use the ODE solvers however, they have to use the same variable, that requires that you keep track of what is x and what is y:
couplode = @(t,y) [y(2); y(4)^2 + tan(y(3)); y(4); cos(y(3)) + y(2) + y(4)];
[t,y] = ode45(couplode, [0 0.49*pi], [1;1;1;1]*1E-8);
figure(1)
plot(t, y)
grid
str = {'$$ \dot{y} $$', '$$ y $$', '$$ \dot{x} $$', '$$ x $$'};
legend(str, 'Interpreter','latex', 'Location','NW')
produces this interesting plot:
Best Answer