- #1
patric44
- 296
- 39
- Homework Statement
- solve the two body problem using a Matlab script ?
- Relevant Equations
- a = -mu/r^3
hi guys
i am trying to code an algorithm for computing the trajectory of a basic two body problem situation according to the equation
$$\ddot{r} = \frac{-\mu}{r^3} \vec{r}$$
i am trying to use the Euler method , but the problem is in converting this problem into a 3 separate equations one for each component
of ##r## .
can i separate this equation for each component of ## \ddot{r}## as
$$\ddot{x} = \frac{-\mu}{r^3} \vec{x} \quad \ddot{y} = \frac{-\mu}{r^3} \vec{y} \quad \ddot{z} = \frac{-\mu}{r^3} \vec{z} \quad $$
and solve each part using euler method separately , or i cannot do that ?
i am trying to code an algorithm for computing the trajectory of a basic two body problem situation according to the equation
$$\ddot{r} = \frac{-\mu}{r^3} \vec{r}$$
i am trying to use the Euler method , but the problem is in converting this problem into a 3 separate equations one for each component
of ##r## .
can i separate this equation for each component of ## \ddot{r}## as
$$\ddot{x} = \frac{-\mu}{r^3} \vec{x} \quad \ddot{y} = \frac{-\mu}{r^3} \vec{y} \quad \ddot{z} = \frac{-\mu}{r^3} \vec{z} \quad $$
and solve each part using euler method separately , or i cannot do that ?