# How to calculate the Lagrangian points positions?

I have two bodies, one rotates around another on orbit. For i.e. Earth and Sun or Moon and Earth.

If we know masses, velocity, distance and keplerian elements of orbit, how can we find the positions of Lagrangian points?

• this answer might help space.stackexchange.com/a/26037/12102
– uhoh
Nov 26, 2021 at 13:29
• @uhoh I see L1 and L2 here, but what is about L3, L4 and L5? Nov 26, 2021 at 13:44
• That's all I can find right now. From what I remember the Wikipedia article on Lagrange points gives equations for all five but there are some problems and they're not all correct, so it's necessary to go find a proper derivation somewhere. There are plenty of approximations and simplifications, but to get the exact answers you have to find the roots of some polynomials, fifth order for the first three collinear points, and for the two triangular points for two finite masses (where you don't assume the smaller one is extremely small) they can't be exactly on the small body's orbit and...
– uhoh
Nov 26, 2021 at 19:58
• exactly form an equilateral triangle at the same time; one of the two constraints has to be relaxed. If nobody digs in and answers in the next few days ping me again and I'll try. update: Oh, in this answer I calculate all five points for any ratio of the two masses. The script is easy but you can see it numerically finds the point by looking for the five zeros of acceleration in the rotating frame. space.stackexchange.com/a/36832/12102 I think you want a simple equation for your answer and I don't know if such a thing exists or not right now.
– uhoh
Nov 26, 2021 at 20:04
• @uhoh Each of the two triangular points does exactly form an equilateral triangle with the primary and secondary body as the other two points. Nov 27, 2021 at 4:38

For details on L4 and L5, including a fascinating solution in which the equilateral triangle continuously changes size, but stays equilateral, please look at this answer. These and other variants of the triangle pattern work even when none of the masses is ignored. If the three masses are equal, the center of mass equals the geometric center. There are multiple definitions of the center of a triangle, but for an equilateral triangle, they all coincide. If the masses are not all equal, the center of mass will lie at the weighted average of the positions of the three bodies, and the whole triangle will spin around this point at one particular constant angular rate, $$\omega^2 = G (m_1 + m_2 + m_3)/d^3$$, where $$d$$ is the distance from the three masses to each other.
Typical equations for L1, L2, and L3, such as on Wikipedia, assume the smallest mass is effectively zero, but that turns out not to be necessary either. The three masses must lie on a line, and that line must rotate uniformly in a fixed plane, but we can find the three position solutions even when all three masses are significant. The equation to solve is a fifth-degree polynomial in the ratio of the distances between the masses. I won't derive anything, but just refer you to the book I read it in: Richard Battin's An Introduction to the Mathematics and Methods of Astrodynamics, chapter 8. Label the bodies not by their masses, but rather their positions ordered from left to right, on the $$\xi$$ axis, as $$\xi_1 < \xi_2 < \xi_3$$. Define $$r_{ij}$$ as the distance $$\xi_j-\xi_i$$ (guaranteed positive, from the way we labeled them), and let $$\chi=r_{23}/r_{12}$$. The value $$\xi=0$$ is the point about which the whole system rotates, $$\xi_1$$ must be negative, and $$\xi_2$$ may also be, depending on the exact ratios of the masses. After some algebra, one arrives at the equation $$(m_1 + m_2)\chi^5 + (3m_1 + 2m_2)\chi^4 + (3m_1 + m_2)\chi^3 - (m_2 + 3m_3)\chi^2 - (2m_2 + 3m_3)\chi - (m_2 + m_3) = 0$$ which has exactly one positive real root. Find that $$\chi$$ (and since this is a quintic, there is no neat, closed-form solution), then plug back into other expressions from the book (pages 366 to 369 of the 1999 edition) to find $$\omega$$, $$\xi_1$$, $$r_{12}$$, $$\xi_2$$ and $$\xi_3$$.