# [SOLVED]Moon Earth L4 perturbation

#### dwsmith

##### Well-known member
The L4 position is stable in the Earth Moon and I perturbing a satellite by km in the x direction to see the trajectory over the course of the year. However, the satellite isn't moving. Can anyone see if there is something wrong? I gave the satellite no initial velocity.
Code:
In:= ClearAll["Global*"]
me = 5.974*10^(24);
mm = 7.348*10^(22);
G = 6.67259*10^(-20);
re = 6378;
rm = 1737;
r12 = 384400;

In:= \[Mu] = G*(me + mm);
\[Pi]1 = me/(me + mm);
\[Pi]2 = mm/(me + mm);
M = me + mm;
\[CapitalOmega] = Sqrt[\[Mu]/r12^3];
\[Mu]1 = G*me;
\[Mu]2 = G*mm;

In:= xl4 = 384400/2 - 4671
yl4 = Sqrt/2*384400 // N

Out= 187529

Out= 332900.

In:= r0 = {xl4+1, yl4, 0}
v0 = {0, 0, 0};

Out= {187529, 332900., 0}

{187529, 332900.16521473817, 0}

In:=
s = NDSolve[{x1''[t] -
2*\[CapitalOmega]*x2'[t] - \[CapitalOmega]^2*
x1[t] == -\[Mu]1/(Sqrt[(x1[t] + \[Pi]2*r12)^2 +
x2[t]^2])^3*(x1[t] + \[Pi]2*
r12) - \[Mu]2/(Sqrt[(x1[t] - \[Pi]1*r12)^2 +
x2[t]^2])^3*(x1[t] - \[Pi]1*r12),
x2''[t] -
2*\[CapitalOmega]*x1'[t] - \[CapitalOmega]^2*
x2[t] == -\[Mu]1/(Sqrt[(x1[t] + \[Pi]2*r12)^2 + x2[t]^2])^3*
x2[t] - \[Mu]2/(Sqrt[(x1[t] - \[Pi]1*r12)^2 + x2[t]^2])^3*
x2[t],
x3''[t] == -\[Mu]1/(Sqrt[(x1[t] + \[Pi]2*r12)^2 + x2[t]^2])^3*
x3[t] - \[Mu]2/(Sqrt[(x1[t] - \[Pi]1*r12)^2 + x2[t]^2])^3*
x3[t], x1 == r0[], x1' == v0[], x2 == r0[],
x2' == v0[], x3 == r0[], x3' == v0[]}, {x1, x2,
x3}, {t, 0, 24*3600*365}];

In:= ParametricPlot3D[
Evaluate[{x1[t], x2[t], x3[t]} /. s], {t, 0, 200000},
PlotStyle -> {Red, Thick}]

Last edited:

#### dwsmith

##### Well-known member
I believe the gravity of the moon isn't playing a role in the simulation. Does anyone see a fix for this?

#### Ackbach

##### Indicium Physicus
Staff member
Just curious: what was the problem?

#### dwsmith

##### Well-known member
Just curious: what was the problem?
Plot the movement of a satellite at a 1km offset from L4 over the period of 1year. I will put some of these problems in the notes I type about Orbital and link to

#### Ackbach

##### Indicium Physicus
Staff member
Plot the movement of a satellite at a 1km offset from L4 over the period of 1year. I will put some of these problems in the notes I type about Orbital and link to
So you just hadn't plotted the motion for a long enough time?

#### dwsmith

##### Well-known member
So you just hadn't plotted the motion for a long enough time?
Oh that problem. Negative sign when should have been a plus.