|
On 10/24/2010 12:40 PM, Abstract_A wrote:
> "Nasser M. Abbasi"<nma@12000.org> wrote in message<ia0nji$g4h$1@speranza.aioe.org>...
>> On 10/23/2010 11:30 PM, Abstract_A wrote:
>>> How can I solve a third order nonlinear ODE?
>>>
>>> f''' + f * f''=0
>>> f(0)=0
>>> f'(0)=0
>>> f'(infinity)=1
>>
>>
>> If you want to do the numerically, need to do something with the
>> infinity value. But aside from that, you can to convery to x'=f(x) form
>> and use ode45, something like this (using state variables)
>>
>> let
>>
>> x1 = f
>> x2 = f'
>> x3 = f''
>>
>> take derivatives
>>
>> x1' = f' = x2
>> x2' = f'' = x3
>> x3' = f''' = -x1*x3
>>
>> So, now system is in form X'=F(X).
>>
>> Which you can run ode45 on them as one system. (vectors). the RHS which
>> you have to update in your ode45 function will be {x2,x3,-x2*x3}.
>>
>> May be you can try that and see what you get.
>>
>> --Nasser
>
>
> 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.
Yes, this is called the shooting method, since you had BVP on one of
those first derivatives ode's there.
glad things are working for you now.
--Nasser
|