Thread: ode45 Matlab
View Single Post
  #3  
Old November 27th, 2008, 07:42 AM
Rapha Rapha is offline
Senior Member
 
Join Date: Nov 2008
Posts: 424
Thanks: 62
Thanked 157 Times in 150 Posts
Rapha has a spectacular aura aboutRapha has a spectacular aura about
Default

Hello.

Quote:
So now can you get ode45 to work?
that was very helpful, thank you very much (and yes, i could get ode45 to work).

But actually i kinda screwed it(sorry, i did not exactly realize what my problem was and asked for something different), because my problem is :

\ddot{x} = x + 2 \dot{y} - 0.9 \frac{x+0.1}{D_1} - 0.1 \frac{x-0.9}{D_2}

\ddot{y} = y - 2 \dot{x} - 0.9 \frac{y}{D_1} - 0.1 \frac{y}{D_2}

with D_1 = \sqrt{(((x+0.1)^2+y^2)^3)}

D_2 =  \sqrt{(((x-0.9)^2+y^2)^3)}

i tried to find the IVP 1. order:

x_1 = x

\dot{x_1} = \dot{x} = x_2

y_1 = y

y_2 = \dot{y_1} = \dot{y}


=>
\dot{x_2} = x_1 + 2 y_2 - 0.9 \frac{x+0.1}{D_1} - 0.1 \frac{x-0.9}{D_2}

\dot{y_2} = y_1 - 2 x_2 - 0.9 \frac{y_1}{D_1} - 0.1 \frac{y_1}{D_2}

I did not realize that there are 4 functions: y_2(t), y_1(t), x_1(t), x_2(t)

I still want to solve this by using ode45.


Regards
Rapha

Last edited by Rapha; November 27th, 2008 at 08:12 AM.
Reply With Quote