Solving non linear ODE ?

3 Ansichten (letzte 30 Tage)
Dan Matthews
Dan Matthews am 25 Feb. 2015
Beantwortet: Torsten am 25 Feb. 2015
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

Akzeptierte Antwort

Torsten
Torsten am 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.

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by