(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



Gravity[{y1_,y2_,y3_,y4_,y5_,y6_}] :=Module[
{\[Mu]=1/81.45,d1,d2 },
d1 =(y2^2+y3^2+(y1+\[Mu]-1)^2)^(3/2); 
d2=(y2^2+y3^2+(y1+\[Mu])^2)^(3/2);
{y4,y5,y6,
2y5 + y1 - (\[Mu] (y1+\[Mu]-1))/d1 -((1-\[Mu])(y1+\[Mu]))/d2,
-2y4 + y2 - (\[Mu] y2)/d1 -((1-\[Mu])y2)/d2,
- ((\[Mu] y3)/d1) -((1-\[Mu])y3)/d2
}
]
IC = {0.994,0,0,0,-2.001585106370825224,0};
TMax=17.5;
ySol=y/.NDSolve[ {
y'[t]==Gravity[y[t]],
y[0]==IC
},
y,
{t, 0, TMax}][[1]];
MmaPic=ParametricPlot[ySol[t][[{1,2}]],{t,0,TMax}]



