http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649
MATLAB Central Newsreader  Blasius Eqn help
Feed for thread: Blasius Eqn help
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sun, 24 Oct 2010 06:30:09 +0000
Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790180
Abstract_A
How can I solve a third order nonlinear ODE?<br>
<br>
f''' + f * f''=0<br>
f(0)=0<br>
f'(0)=0<br>
f'(infinity)=1

Sun, 24 Oct 2010 07:34:57 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790184
Nasser M. Abbasi
On 10/23/2010 11:30 PM, Abstract_A wrote:<br>
> How can I solve a third order nonlinear ODE?<br>
><br>
> f''' + f * f''=0<br>
> f(0)=0<br>
> f'(0)=0<br>
> f'(infinity)=1<br>
<br>
<br>
If you want to do the numerically, need to do something with the <br>
infinity value. But aside from that, you can to convery to x'=f(x) form <br>
and use ode45, something like this (using state variables)<br>
<br>
let<br>
<br>
x1 = f<br>
x2 = f'<br>
x3 = f''<br>
<br>
take derivatives<br>
<br>
x1' = f' = x2<br>
x2' = f'' = x3<br>
x3' = f''' = x1*x3<br>
<br>
So, now system is in form X'=F(X).<br>
<br>
Which you can run ode45 on them as one system. (vectors). the RHS which <br>
you have to update in your ode45 function will be {x2,x3,x2*x3}.<br>
<br>
May be you can try that and see what you get.<br>
<br>
Nasser

Sun, 24 Oct 2010 19:40:06 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790230
Abstract_A
"Nasser M. Abbasi" <nma@12000.org> wrote in message <ia0nji$g4h$1@speranza.aioe.org>...<br>
> On 10/23/2010 11:30 PM, Abstract_A wrote:<br>
> > How can I solve a third order nonlinear ODE?<br>
> ><br>
> > f''' + f * f''=0<br>
> > f(0)=0<br>
> > f'(0)=0<br>
> > f'(infinity)=1<br>
> <br>
> <br>
> If you want to do the numerically, need to do something with the <br>
> infinity value. But aside from that, you can to convery to x'=f(x) form <br>
> and use ode45, something like this (using state variables)<br>
> <br>
> let<br>
> <br>
> x1 = f<br>
> x2 = f'<br>
> x3 = f''<br>
> <br>
> take derivatives<br>
> <br>
> x1' = f' = x2<br>
> x2' = f'' = x3<br>
> x3' = f''' = x1*x3<br>
> <br>
> So, now system is in form X'=F(X).<br>
> <br>
> Which you can run ode45 on them as one system. (vectors). the RHS which <br>
> you have to update in your ode45 function will be {x2,x3,x2*x3}.<br>
> <br>
> May be you can try that and see what you get.<br>
> <br>
> Nasser<br>
<br>
<br>
Thanks, I figured it out last night. I have to make the f'(infinity)= 1 to f''(0)='my guess' and keep intergrating till the f'(x) goes to infintiy at 1.

Sun, 24 Oct 2010 19:49:17 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790231
Nasser M. Abbasi
On 10/24/2010 12:40 PM, Abstract_A wrote:<br>
> "Nasser M. Abbasi"<nma@12000.org> wrote in message<ia0nji$g4h$1@speranza.aioe.org>...<br>
>> On 10/23/2010 11:30 PM, Abstract_A wrote:<br>
>>> How can I solve a third order nonlinear ODE?<br>
>>><br>
>>> f''' + f * f''=0<br>
>>> f(0)=0<br>
>>> f'(0)=0<br>
>>> f'(infinity)=1<br>
>><br>
>><br>
>> If you want to do the numerically, need to do something with the<br>
>> infinity value. But aside from that, you can to convery to x'=f(x) form<br>
>> and use ode45, something like this (using state variables)<br>
>><br>
>> let<br>
>><br>
>> x1 = f<br>
>> x2 = f'<br>
>> x3 = f''<br>
>><br>
>> take derivatives<br>
>><br>
>> x1' = f' = x2<br>
>> x2' = f'' = x3<br>
>> x3' = f''' = x1*x3<br>
>><br>
>> So, now system is in form X'=F(X).<br>
>><br>
>> Which you can run ode45 on them as one system. (vectors). the RHS which<br>
>> you have to update in your ode45 function will be {x2,x3,x2*x3}.<br>
>><br>
>> May be you can try that and see what you get.<br>
>><br>
>> Nasser<br>
><br>
><br>
<br>
<br>
> Thanks, I figured it out last night. I have to make the f'(infinity)= 1 to f''(0)='my guess' and keep<br>
> intergrating till the f'(x) goes to infintiy at 1.<br>
<br>
Yes, this is called the shooting method, since you had BVP on one of <br>
those first derivatives ode's there.<br>
<br>
glad things are working for you now.<br>
<br>
Nasser

Sun, 24 Oct 2010 21:01:04 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790238
Roger Stafford
"Abstract_A " <chase1083@hotmail.com> wrote in message <ia222m$han$1@fred.mathworks.com>...<br>
> Thanks, I figured it out last night. I have to make the f'(infinity)= 1 to f''(0)='my guess' and keep intergrating till the f'(x) goes to infintiy at 1.<br>
         <br>
I think you can make your problem easier than having to do repetitive calls on 'ode'. Suppose we rescale f and t using an as yet undetermined constant scale factor k according to the equations f = k*F and t = 1/k*T. Then we have<br>
<br>
0 = d3f/dt3 + f*d2f/dt2 = k^4*d3F/dT3 + (k*F)*(k^3*d2F/dT2)<br>
<br>
so that dividing by k^4 we have the rescaled equation<br>
<br>
d3F/dT3 + F*d2F/dT2 = 0<br>
<br>
(where d2F/dT2 and d3F/dT3 represent the second and third derivatives of F with respect to T, and similarly for f and t.)<br>
<br>
You can use initial conditions F(0) = 0, dF/dT(0) = 0 and d2F/dT2(0) = 1, and then run the problem through, say 'ode45', continuing T out to a sufficiently large amount that you can approximate the asymptotic value of dF/dT as T approaches infinity. At that point you can then determine what the factor k must be so that df/dt = k^2*dF/dT would equal 1 at this asymptote. Then use this factor k to rescale all your results in F and T from 'ode45' over to f and t. This way you need only one call on 'ode45'.<br>
<br>
Roger Stafford

Mon, 25 Oct 2010 06:46:33 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790325
Torsten Hennig
> How can I solve a third order nonlinear ODE?<br>
> <br>
> f''' + f * f''=0<br>
> f(0)=0<br>
> f'(0)=0<br>
> f'(infinity)=1<br>
<br>
This is a boundary value problem  use bvp4c to solve.<br>
<br>
Best wishes<br>
Torsten.

Mon, 25 Oct 2010 12:01:05 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790390
Roger Stafford
Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <185267398.170772.1287989223431.JavaMail.root@gallium.mathforum.org>...<br>
> > How can I solve a third order nonlinear ODE?<br>
> > <br>
> > f''' + f * f''=0<br>
> > f(0)=0<br>
> > f'(0)=0<br>
> > f'(infinity)=1<br>
> <br>
> This is a boundary value problem  use bvp4c to solve.<br>
> <br>
> Best wishes<br>
> Torsten.<br>
         <br>
Other than perhaps a tutorial purpose, what is the point in doing that, Torsten, given the nature of the differential equation and two of its initial conditions? If the initial conditions had been other than f(0) = 0 and f'(0) = 0, then, yes, 'bvp4c' or some such would be called for, but as they are, a simple rescaling of both variables makes only one pass through an 'ode' function necessary  no prior estimating solutions necessary. I claim that properly performed rescaling can be an important part of anyone's techniques in solving problems in numerical analysis.<br>
<br>
Roger Stafford

Mon, 25 Oct 2010 14:34:50 +0000
Re: Blasius Eqn help
http://www.mathworks.com/matlabcentral/newsreader/view_thread/294649#790460
Torsten Hennig
> Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote<br>
> in message<br>
> <185267398.170772.1287989223431.JavaMail.root@gallium.<br>
> mathforum.org>...<br>
> > > How can I solve a third order nonlinear ODE?<br>
> > > <br>
> > > f''' + f * f''=0<br>
> > > f(0)=0<br>
> > > f'(0)=0<br>
> > > f'(infinity)=1<br>
> > <br>
> > This is a boundary value problem  use bvp4c to<br>
> solve.<br>
> > <br>
> > Best wishes<br>
> > Torsten.<br>
>          <br>
> Other than perhaps a tutorial purpose, what is the<br>
> he point in doing that, Torsten, given the nature of<br>
> the differential equation and two of its initial<br>
> conditions? If the initial conditions had been other<br>
> than f(0) = 0 and f'(0) = 0, then, yes, 'bvp4c' or<br>
> some such would be called for, but as they are, a<br>
> simple rescaling of both variables makes only one<br>
> pass through an 'ode' function necessary  no prior<br>
> estimating solutions necessary. I claim that<br>
> properly performed rescaling can be an important part<br>
> of anyone's techniques in solving problems in<br>
> numerical analysis.<br>
> <br>
> Roger Stafford<br>
<br>
Now that I took a closer into your solution, <br>
I see that your method is a very elegant way to deal <br>
with this specific BVP.<br>
I simply made the diagnosis: BVP and suggested <br>
BVP4C without taking into account the<br>
problemspecific characteristics.<br>
<br>
Best wishes<br>
Torsten.