Using BVP solver to solve 4th order non-linear ODE
1 view (last 30 days)
Show older comments
Hi, I am trying to solve an ODE of the following structure
-K1 y''''+K2(y) y''+ A(y) y'^2=0 with the boundary conditions y(0)=y(5)=0, y'(0)=y'(5)=0.1
This is a highly nonlinear ODE with fourth order gradients. I tried to structure it in the way that is required as an input to bvp4c, defining y'(1)=y(2); y'(2)=y(3); y'(3)=y(4); y'(4)= (K2(y(1))*y(2)+A(y(1))*y(1)^2)
and the boundary conditions as y1(0); y1(5); y2(0)-0.1; y2(5)-0.1
But this is not working since apparently y(3) is not accepted by bvp4c.
Please let me know how to go about it and if there is another way to solve this in Matlab using inbuilt routines.
Thank you
0 Comments
Answers (1)
Torsten
on 23 Jan 2015
According to your differential equation,
y4'=(K2(y1)*y3+A(y1)*(y2)^2)/K1;
Best wishes
Torsten.
6 Comments
Torsten
on 2 Feb 2015
In the MATLAB examples, the vector of initial conditions is a row vector, so
solinit=bvpinit(linspace(0,5,20),[0 0 0 0])
should be correct.
I don't know what you return in ODEFUN, but it must be a column vector of length 4.
Best wishes
Torsten.
See Also
Categories
Find more on Boundary Value Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!