@asdfex's answer is correct. I'll just add an illustration.
In the Circular Restricted Three-Body Problem or CR3BP (where the Lagrange points are defined) there are some conventions to make the math easier. With $m_1 + m_2$, the distance between $m_1$ and $m_2$, and the rotation rate all being unity (1.0) the reduced mass is defined as
$$\mu = \frac{m_2}{m_1 + m_2}.$$
So for the Earth-Moon system that's about 0.012, and for the Sun-Earth system it's about 3E-06. For equal-mass bodies, it's 0.5 or one-half.
It's most convenient to solve CR3BP problems by using a rotating frame, so we keep the positions of the objects fixed and in addition to the normal gravitational force terms we add pseudo-forces like centrifugal and Coriolis. The Coriolis force depends on velocity in the rotating frame and since we are looking for stationary points (another name for the Lagrange points) we can ignore it.
Expressed in terms of $\mu$ the x positions and masses of the two objects are then:
$$m_1 = 1 - \mu$$
$$m_2 = \mu$$
$$x_1 = -\mu$$
$$x_2 = 1 - \mu$$
The distance from a particle at $x, y$ to the two bodies is then
$$r_1 = \sqrt{(x + \mu)^2 + y^2}$$
$$r_2 = \sqrt{(x + \mu - 1)^2 + y^2}$$
and the acceleration components on the particle in the rotating fame (assuming zero velocity) are then
$$\ddot{x} = -(1-\mu) \frac{x+\mu}{r_1^3} - \mu \frac{x+\mu-1}{r_2^3} + x $$
$$\ddot{y} = -(1-\mu) \frac{y}{r_1^3} - \mu \frac{y}{r_2^3} + y $$
with those last terms being the centrifugal (pseudo)forces in the rotating frame, and the Coriolis force terms dropped becasue we are looking for stationary points.
The total acceleration $\sqrt{\ddot{x}^2 + \ddot{y}^2}$ will be drop to zero at the stationary or Lagrange points, so we just have to search for the five zeros in the total acceleration field.
In the plot below I show six cases from $\mu=0.01$ for an asymmetric system to $\mu=0.5$ for a pair of equal-mass bodies. The Lagrange points move slightly between the six cases but in a very predictable way; with L1 going to the center of mass of the two bodes for the equal mass case.
You can read further about the math in these (no particular order): 1, 2, 3, 4, 5, 6.

Python script:
class Lpoint(object):
def __init__(self, name, X0, mus, opts, tol):
self.name = name
self.X0 = X0
self.mus = mus
self.mu0 = self.mus[0]
self.opts = opts
self.tol = tol
self.Xs = []
self.res = []
self.solve_mus()
self.X = np.vstack(self.Xs)
self.oks = [res['success'] for res in self.res]
self.ok = all(self.oks)
def solve_mus(self):
for mu in self.mus:
results = minimize(self.H, self.X0, method='Nelder-Mead',
options=self.opts, tol=self.tol,
args=(mu))
X = results['x']
self.X0 = X
self.Xs.append(X)
self.res.append(results)
def H(self, X, mu):
x, y = X
r1 = np.sqrt((x + mu)**2 + (y)**2)
r2 = np.sqrt((x + mu - 1)**2 + (y)**2)
# zero velocity forces # m1, m2 = 1-mu, mu
xddot = -( (1-mu) * (x+mu) / r1**3 + mu * (x+mu-1) / r2**3 ) + x
yddot = -( (1-mu) * y / r1**3 + mu * y / r2**3 ) + y
return np.sqrt(xddot**2 + yddot**2)
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import minimize
mus = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5]
X0s = ((0.7, 0), (1.2, 0), (-1, 0), (0.5, 1), (0.5, -1)) # arbitrary starting point
X0s = [np.array(X0) for X0 in X0s]
names = ('L1', 'L2', 'L3', 'L4', 'L5')
opts = {'xtol': 1E-12, 'disp': False, 'maxiter':1000, 'maxfev':2000}
Lpts = []
for (X0, name) in zip(X0s, names):
Lpt = Lpoint(name, X0, mus, opts, tol=1E-06)
Lpts.append(Lpt)
L1, L2, L3, L4, L5 = Lpts
for L in Lpts:
L.solve_mus()
all_oks = sum([L.oks for L in Lpts], [])
print ('All okay: ', all(all_oks), str(sum(all_oks)) + '/' + str(sum(all_oks)))
if True:
plt.figure()
for i, mu in enumerate(mus):
plt.subplot(3, 2, i+1)
x1, x2 = -mu, 1-mu
m1, m2 = 1-mu, mu
for L in Lpts:
x, y = L.X[i]
plt.plot([x], [y], '.k')
plt.plot([x1], [0], 'or', markersize = max(16 * m1, 6))
plt.plot([x2], [0], 'ob', markersize = max(16 * m2, 6))
plt.xlim(-1.5, 1.5)
plt.ylim(-1.0, 1.0)
plt.text(-1.4, 0.8, 'mu='+str(mu), fontsize=16)
hw = 0.1
plt.plot([-hw, hw], [0, 0], '-k', linewidth=0.5)
plt.plot([0, 0], [-hw, hw], '-k', linewidth=0.5)
plt.show()