MATLAB: Solve a system of ode by bvp4c

bvp4c

Hi, I am trying so solve a system of boundary value problem. I have tried looking into the examples given yet I still have problem in writing the code and running the program.
Briefly, I have 3 equations to solve. I have convert them to first order system in order to put it in matlab. Where, I let W=y1, W'=y2, U=y3, U'=y4, U''=y5, V=y6, V'=y7, V''=y8. I have the boundary 0f x from [0 infinity], and I choose infinity=20. I also need to plot graphs of x-axis:x (from 0 to 20) for y-axis:U, V and W respectively.
I know there are lots of mistakes here hence please correct me if Im wrong. I have attached the code here.
Thank you :))

Best Answer

Solve your equations for W', U'' and V''.
Let
y(1) = W, y(2) = U, Y(3) = U', Y(4) = V, Y(5) = V'.
Your system then reads
Y(1)' = F0(Y(1),Y(2),Y(3),Y(4),Y(5))
Y(2)' = Y(3)
Y(3)' = F1(Y(1),Y(2),Y(3),Y(4),Y(5))
Y(4)' = Y(5)
Y(5)' = F2(Y(1),Y(2),Y(3),Y(4),Y(5))
Now use one of the ODE solvers in the usual manner.
Best wishes
Torsten.