Lagrange Points and Polynomial Equations: Part 4

From Wikipedia, Lagrange points are points of equilibrium for small-mass objects under the gravitational influence of two massive orbiting bodies. There are five such points in the Sun-Earth system, called L_1, L_2, L_3, L_4, and L_5.

The stable equilibrium points L_4 and L_5 are easiest to explain: they are the corners of equilateral triangles in the plane of Earth’s orbit. The points L_1 and L_2 are also equilibrium points, but they are unstable. Nevertheless, they have practical applications for spaceflight.

As we’ve seen, the positions of L_1 and L_2 can be found by numerically solving the fifth-order polynomial equations

t^5 - (3-\mu) t^4 + (3-2\mu)t^3 - \mu t^2 + 2\mu t - \mu = 0

and

t^5 + (3-\mu) t^4 + (3-2\mu)t^3 - \mu t^2 - 2\mu t - \mu = 0,

respectively. In these equations, \mu = \displaystyle \frac{m_2}{m_1+m_2} where m_1 is the mass of the Sun and m_2 is the mass of Earth. Also, t is the distance from the Earth to L_1 or L_2 measured as a proportion of the distance from the Sun to Earth.

We’ve also seen that, for the Sun and Earth, mu \approx 3.00346 \times 10^{-6}, and numerically solving the above quintics yields t \approx 0.000997 for L_1 and t \approx 0.01004 for L_2. In other words, L_1 and L_2 are approximately the same distance from Earth but in opposite directions.

There’s a good reason why the positive real roots of these two similar quintics are almost equal. We know that t will be a lot closer to 0 than 1 because, for gravity to balance, the Lagrange points have to be a lot closer to Earth than the Sun. For this reason, the terms \mu t^2 and 2\mu t will be a lot smaller than \mu, and so those two terms can be safely ignored in a first-order approximation. Also, the terms t^5 and (3-\mu)t^4 will be a lot smaller than (3-2\mu)t^3, and so those two terms can also be safely ignored in a first-order approximation. Furthermore, since \mu is also close to 0, the coefficient (3-2\mu) can be safely replaced by just 3.

Consequently, the solution of both quintic equations should be close to the solution of the cubic equation

3t^3  - \mu = 0,

which is straightforward to solve:

3t^3 = \mu

t^3 = \displaystyle \frac{\mu}{3}

t = \displaystyle \sqrt[3]{ \frac{\mu}{3} }.

If \mu = 3.00346 \times 10^{-6}, we obtain t \approx 0.010004, which is indeed reasonably close to the actual solutions for L_1 and L_2. Indeed, this may be used as the first approximation in Newton’s method to quickly numerically evaluate the actual solutions of the two quintic polynomials.

Confirming Einstein’s Theory of General Relativity With Calculus, Part 3: Method of Successive Approximations

In this series, I’m discussing how ideas from calculus and precalculus (with a touch of differential equations) can predict the precession in Mercury’s orbit and thus confirm Einstein’s theory of general relativity. The origins of this series came from a class project that I assigned to my Differential Equations students maybe 20 years ago.

One technique that will be necessary for this confirmation is the method of successive approximations. This will be needed in the context of a differential equation; however, we can illustrate the concept by finding the roots of a polynomial. Consider the quadratic equation

x^2 - x - 1 = 0.

(Naturally, we can solve for x using the quadratic formula; more on that later.) To apply the method of successive approximation, we will rewrite this so that x appears on the left side and some function of x appears on the right side. I will choose

x^2 = x + 1, or

x = 1 + \displaystyle \frac{1}{x}.

Here’s the idea of the method of successive approximations to obtain a recursively defined sequence that (hopefully) convergence to a solution of this equation:

  • Start with an initial guess x_0.
  • Plug x_0 into the right-hand side to get a new guess, x_1.
  • Plug x_1 into the right-hand side to get a new guess, x_2.
  • And repeat.

For example, suppose that we choose x_0 = 1. Then

x_1 = 1 + \displaystyle \frac{1}{x_0} = 1 + \displaystyle \frac{1}{1} = 2

x_2 = 1 + \displaystyle \frac{1}{x_1} = 1 + \displaystyle \frac{1}{2} = \displaystyle \frac{3}{2} = 1.5

x_3 = 1 + \displaystyle \frac{1}{x_2} = 1 + \displaystyle \frac{1}{3/2} = \displaystyle \frac{5}{3} \approx 1.667

x_4 = 1 + \displaystyle \frac{1}{x_3} = 1 + \displaystyle \frac{1}{5/3} = \displaystyle \frac{8}{5} = 1.6

x_5 = 1 + \displaystyle \frac{1}{x_4} = 1 + \displaystyle \frac{1}{8/5} = \displaystyle \frac{13}{8} = 1.625

x_6 = 1 + \displaystyle \frac{1}{x_5} = 1 + \displaystyle \frac{1}{13/8} = \displaystyle \frac{21}{13} \approx 1.615

x_7 = 1 + \displaystyle \frac{1}{x_6} = 1 + \displaystyle \frac{1}{21/13} = \displaystyle \frac{34}{21} \approx 1.619

This sequence can be computed by entering 1 into a calculator, then entering 1 + 1 \div \hbox{Ans}, and then repeatedly hitting the = button.

We see that the sequence appears to be converging to something, and that something is a root of the equation x^2 - x - 1 = 0, which we now find via the quadratic formula:

x = \displaystyle \frac{1 \pm \sqrt{1 - 4 \cdot 1 \cdot (-1)}}{2} = \frac{1 \pm \sqrt{5}}{2}.

So it looks like the above sequence is converging to the positive root (1 + \sqrt{5})/2 \approx 1.618.

(Parenthetically, you might notice that the Fibonacci sequence appears in the numerators and denominators of this sequence. As you might guess, that’s not a coincidence.)

Like most numerical techniques, this method doesn’t always work like we think it would. Another solution is the negative root (1 - \sqrt{5})/2 \approx -0.618. Unfortunately, if we start with a guess near this root, like x_0 = -0.62, the sequence unexpectedly diverges from -0.618\dots but eventually converges to the positive root 1.618\dots:

x_1 = 1 + \displaystyle \frac{1}{x_0} = 1 + \displaystyle \frac{1}{-0.62} = -0.6129\dots

x_2 = 1 + \displaystyle \frac{1}{x_1} = 1 + \displaystyle \frac{1}{-0.6129\dots} = -0.6315\dots

x_3 = 1 + \displaystyle \frac{1}{x_2} = 1 + \displaystyle \frac{1}{-0.6315\dots} = -0.5833\dots

x_4 = 1 + \displaystyle \frac{1}{x_3} = 1 + \displaystyle \frac{1}{-0.5833\dots} = -0.7142\dots

x_5 = 1 + \displaystyle \frac{1}{x_4} = 1 + \displaystyle \frac{1}{-0.5833\dots} = -0.4

x_6 = 1 + \displaystyle \frac{1}{x_5} = 1 + \displaystyle \frac{1}{-0.4\dots} = -1.5

x_7 = 1 + \displaystyle \frac{1}{x_6} = 1 + \displaystyle \frac{1}{-1.5\dots} = 0.3333\dots

x_8 = 1 + \displaystyle \frac{1}{x_7} = 1 + \displaystyle \frac{1}{0.3333\dots} = 4

x_9 = 1 + \displaystyle \frac{1}{x_8} = 1 + \displaystyle \frac{1}{4} = 1.25

x_{10} = 1 + \displaystyle \frac{1}{x_9} = 1 + \displaystyle \frac{1}{1.25} = 1.8

x_{11} = 1 + \displaystyle \frac{1}{x_{10}} = 1 + \displaystyle \frac{1}{1.8} = 1.555\dots

x_{12} = 1 + \displaystyle \frac{1}{x_{11}} = 1 + \displaystyle \frac{1}{1.555\dots} = 1.6428\dots

x_{13} = 1 + \displaystyle \frac{1}{x_{12}} = 1 + \displaystyle \frac{1}{1.6428\dots} = 1.6086\dots

x_{14} = 1 + \displaystyle \frac{1}{x_{13}} = 1 + \displaystyle \frac{1}{1.6086\dots} = 1.6216\dots

x_{15} = 1 + \displaystyle \frac{1}{x_{14}} = 1 + \displaystyle \frac{1}{1.6216\dots} = 1.6166\dots

x_{16} = 1 + \displaystyle \frac{1}{x_{15}} = 1 + \displaystyle \frac{1}{1.6216\dots} = 1.6185\dots

I should note that the method of successive approximations generally converges at a slower pace than Newton’s method. However, this method will be good enough when we use it to predict the precession in Mercury’s orbit.

Square roots with a calculator (Part 11)

This is the last in a series of posts about square roots and other roots, hopefully providing a deeper look at an apparently simple concept. However, in this post, we discuss how calculators are programmed to compute square roots quickly.

Today’s movie clip, therefore, is set in modern times:

So how do calculators find square roots anyway? First, we recognize that \sqrt{a} is a root of the polynomial f(x) = x^2 - a. Therefore, Newton’s method (or the Newton-Raphson method) can be used to find the root of this function. Newton’s method dictates that we begin with an initial guess x_1 and then iteratively find the next guesses using the recursively defined sequence

x_{n+1} = x_n - \displaystyle \frac{f(x_n)}{f'(x_n)}

For the case at hand, since f'(x) = 2x, we may write

x_{n+1} = x_n - \displaystyle \frac{x_n^2 -a}{2 x_n},

which reduces to

x_{n+1} = \displaystyle \frac{2x_n^2 - (x_n^2 -a)}{2 x_n} = \frac{x_n^2 + a}{2x_n} = \frac{1}{2} \left( x_n + \frac{a}{x_n} \right)

This algorithm can be programmed using C++, Python, etc.. For pedagogical purposes, however, I’ve found that a spreadsheet like Microsoft Excel is a good way to sell this to students. In the spreadsheet below, I use Excel to find \sqrt{2000}. In cell A1, I entered 1000 as a first guess for \sqrt{2000}. Notice that this is a really lousy first guess! Then, in cell A2, I typed the formula

=1/2*(A1+2000/A1)

So Excel computes

x_2 = \frac{1}{2} \left( x_1 + \displaystyle \frac{2000}{x_1} \right) = \frac{1}{2} \left( 1000 + \displaystyle \frac{2000}{1000} \right) = 501.

Then I filled down that formula into cells A3 through A16.

squareroot

Notice that this algorithm quickly converges to \sqrt{2000}, even though the initial guess was terrible. After 7 steps, the answer is only correct to 2 significant digits (45). After 8 steps, the answer is correct to 4 significant digits (44.72). On the 9th step, the answer is correct to 9 significant digits (44.7213595).

Indeed, there’s a theorem that essentially states that, when this algorithm converges, the number of correct digits basically doubles with each successive step. That’s a lot better than the methods shown at the start of this series of posts which only produced one extra digit with each step.

This algorithm works for finding kth roots as well as square roots. Since \sqrt[k]{a} is a root of f(x) = x^k - a, Newton’s method reduces to

x_{n+1} = x_n - \displaystyle \frac{x_n^k - a}{k x_n^{k-1}} = \displaystyle \frac{(k-1) x_n^k + a}{k x_n^{k-1}} = \displaystyle \frac{k-1}{k} x_k + \frac{1}{k} \cdot \frac{a}{x_n},

which reduces to the above sequence if k =2.

See also this Wikipedia page for further historical information as well as discussion about how the above recursive sequence can be obtained without calculus.