Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Third order non-linear boundary value problem
Replies: 7   Last Post: Apr 2, 2014 12:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Rachel

Posts: 6
Registered: 3/27/14
Third order non-linear boundary value problem
Posted: Mar 27, 2014 1:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.