Solving non linear ODE ?
1 view (last 30 days)
Show older comments
I am trying to solve a non-linear ODE
(y'')^2- y^2*(1+y'^2)^(3/2)=0
with boundary conditions: at x=0, y'=0 at x=1, y'= 1
How should I use ode45 or bvp4c to solve this problem ? Thanks
0 Comments
Accepted Answer
Torsten
on 25 Feb 2015
function nlinbvp4c
solinit = bvpinit(linspace(0,1,5),[0 0]);
sol = bvp4c(@twoode,@twobc,solinit);
function dydx = twoode(x,y)
dydx = [ y(2); abs(y(1))*(1+y(2)^2)^0.75 ];
function res = twobc(ya,yb)
res = [ ya(2); yb(2) - 1 ];
Not sure, but when solving for y'', you may also take the negative square root of the right-hand side:
y''=-abs(y(1))*(1+y(2)^2)^0.75
Thus there might be two solutions for your problem.
Best wishes
Torsten.
0 Comments
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations 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!