Can anyone help me? I want to make the orbit ellipse. Please help me to fix my code.
lagrangian = 1/2 (x'[t]^2 + y'[t]^2) + 1/Sqrt[x[t]^2 + y[t]^2];
eq = Table[
D[lagrangian, x1] - D[D[lagrangian, D[x1, t]], t] ==
0, {x1, {x[t], y[t]}}];
sol = NDSolve[Join[eq, {x[0] == 1, x'[0] == 0, y[0] == 0, y'[0] == 1}], {x[t],
y[t]}, {t, 0, 5}];
ParametricPlot[{x[t], y[t]} /. sol[[1]], {t, 0, 5}]
enter image description here