Rachel
Posts:
6
Registered:
3/27/14


Third order nonlinear boundary value problem
Posted:
Mar 27, 2014 1:45 PM


Hey guys,
I'm having a lot of trouble trying to get a numerical solution the the following boundary value problem,
f'''+1/3ff''+1/3f'^2=0
with the following boundary conditions,
eta=0, f=0 & f''=0 eta=infintiy, f'=0
I am new to Matlab and I'm completely lost so your help would be much appreciated. I think this is how I set it up but I'm not sure??
function dfdeta = mat4ode(eta,f) dfdeta = [ f(2) f(3) 1/3*f(1)*f(3)1/3*Y(2)*Y(2) ];
and for the boundary conditions,
function res = mat4bc(ya,yb) res = [ ya(3) ya(1) yb(2)];
And this is an attempt at the rest the code,
function mat4bvp(solver)
if nargin < 1 solver = 'bvp4c'; end bvpsolver = fcnchk(solver);
infinity = 3;
solinit = bvpinit(linspace(0,infinity,5),[0,0,0]);
sol = bvpsolver(@mat4ode,@mat4bc,solinit);
eta = sol.x; f = sol.y;
figure(1) plot(eta,f) legend('F_1', 'F_2', 'F_3', 3) grid
end
I would be very grateful for the help. Thanks a mill.
Rachel

