Hi, I'm trying to solve
y''' - 2sin(t)y'' - yy' - y = 2cos(t) where y(0)=0, y'(0) = 1, y''(0) = 2 on 0<=t<=1 using the Runge Kutta method in Matlab, but I'm having a really hard time. I have the scheme to solve an equation like y(-2t + 1/t), but I'm not sure what to do for the higher order system. My textbook talks about it breifly, saying something about breaking it down into separate equations, but I'm lost. Please help!
Okay thanks. I'm trying to find the actual solution in Matlab, but it's not working... it says "Warning, explicit solution cannot be found." Do you know how I might find the actual solution? When I try to find the solution on there for the example in the book it works fine, but both Matlab and Maple won't solve this equation for me. I did out the first step on paper when j=0, and I just kind of want to find out if I'm doing it right before I write out the whole program.
Ohh okay, thanks. I think I got it working, but I think I'm suppose to have a function like
function a=f(t,u)
a=zeros(1,3);a(1)=u(2);
a(2)=u(3);
a(3)=2.0*cos(t)+u(1)+u(1)*u(2)+2.0*sin(t)*u(3);
instead of writing it all out, but I'm not sure how to go about this in Matlab. How would I assign a value to u(2) and u(3)?