Solving non linear ODE ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
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.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!