BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

A ring on a string, and Newton's method

A ring sliding on a string hangs at the lowest point of its constraint curve; implicit differentiation shows the two halves of the string make equal angles, so they carry equal tension. Then Newton's method: replace the curve by its tangent line, find where that crosses zero, and repeat. Each step roughly doubles the number of correct digits.

You need this first

Full reading path (10 pages)
  1. The derivative: slope of the tangent line and rate of change (18.01)
  2. Limits and continuity (18.01)
  3. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  4. The chain rule and higher derivatives (18.01)
  5. Implicit differentiation and the derivatives of inverse functions (18.01)
  6. Exponentials and logarithms: the number e and its derivatives (18.01)
  7. Linear and quadratic approximations (18.01)
  8. Curve sketching with the first and second derivative (18.01)
  9. Sketching strategy and maximum–minimum problems (18.01)
  10. More max–min, and related rates (18.01)
On this page · 4 sections
  1. The rate is not the volume
  2. A ring on a string
  3. Newton's method
  4. Summary

Lecture 13 opens by finishing the two related-rates examples begun last time, the radar trap (x˙=−100\dot x = -100 ft/s) and the filling cone (h˙=1/(2π)\dot h = 1/(2\pi) ft/min), which the previous page already works through (transcript, pp. 1–5). [On the board the cone's answer is first given "per second"; a student points out it is per minute, since the inflow is in cubic feet per minute (p. 4).] Two new topics follow: a max–min problem with a constraint, and Newton's method.

The rate is not the volume#

One student's question is worth keeping: if water flows in at 2 ft³/min, why is the level not rising at 2? Because the rate at which volume is added is a different quantity from the rate at which the height rises; how they are related depends on how wide the surface is at that height. Related rates is about keeping track of one changing quantity in terms of another, and the link is always the chain rule, dV/dt=(dV/dh)(dh/dt)dV/dt = (dV/dh)(dh/dt) (transcript, pp. 4–5).

A ring on a string#

Tie a string between two points at different heights and let a ring slide freely on it. Where does the ring come to rest (transcript, pp. 5–6)? Jerison has two students hold the ends against the board and traces the possible positions. If both ends were at the same height the ring would settle in the middle; the question is what happens when one is higher. He notes that problems of this kind arise in designing suspension bridges (p. 6).

Put one end at (0,0)(0, 0) and the other at (a,b)(a, b), and call the ring's position (x,y)(x, y), with y<0y < 0. The ring settles at the lowest point, where its potential energy is least, so the task is to minimise yy. The constraint is that the string has a fixed length LL; by Pythagoras on the two pieces (pp. 6–7; notes, p. 5):

Constraint: fixed length of string
x2+y2+(a−x)2+(b−y)2=L\sqrt{x^2 + y^2} + \sqrt{(a - x)^2 + (b - y)^2} = L
In words

the square root of x squared plus y squared, end of root, plus the square root of the quantity a minus x, all squared plus the quantity b minus y, all squared, end of root, equals L

This defines yy as a function of xx implicitly. The ends of the curve are higher than the middle (you can see it in the experiment), so the lowest point is a critical point, where the tangent is horizontal: y′=0y' = 0 (pp. 7–8). [The curve is part of an ellipse with foci at the two ends, but Jerison stresses that knowing this does not help: writing out the ellipse makes the problem harder (p. 8).]

Differentiate the constraint implicitly with respect to xx (pp. 8–9; notes, p. 5):

Constraint differentiated
x+y y′x2+y2−(a−x)+(b−y) y′(a−x)2+(b−y)2=0\frac{x + y\,y'}{\sqrt{x^2 + y^2}} - \frac{(a - x) + (b - y)\,y'}{\sqrt{(a - x)^2 + (b - y)^2}} = 0
In words

the quantity x plus y y prime, all over the square root of x squared plus y squared, end of root, minus the quantity the quantity a minus x, all plus the quantity b minus y, y prime, all over the square root of the quantity a minus x, all squared plus the quantity b minus y, all squared, end of root, equals 0

At the critical point y′=0y' = 0, so

Balance at the lowest point
xx2+y2=a−x(a−x)2+(b−y)2,sin⁡α=sin⁡β\frac{x}{\sqrt{x^2 + y^2}} = \frac{a - x}{\sqrt{(a - x)^2 + (b - y)^2}}, \qquad \sin\alpha = \sin\beta
In words

x over the square root of x squared plus y squared, end of root, equals the quantity a minus x, all over the square root of the quantity a minus x, all squared plus the quantity b minus y, all squared, end of root, sine alpha equals sine beta

where α\alpha and β\beta are the angles that the left and right pieces of string make with the vertical: each fraction is the opposite side over the hypotenuse of a right triangle (p. 9). So α=β\alpha = \beta, a hidden symmetry: however the string is tilted, the two pieces hang at equal angles.

What it means. A force diagram for the ring shows that equal angles mean equal tension in the two halves: the load is shared evenly, the balanced arrangement that a minimum problem tends to produce (pp. 9–10; notes, p. 6). And read as optics, the equal angles say that a ray of light from one focus of an elliptical mirror reflects to the other focus. Jerison recalls a miniature-golf artwork built on this: tee at one focus, hole at the other, a hole in one every time (p. 10).

The notes complete what the lecture left out, the formulas for the position (notes, p. 6). Adding the horizontal legs of the two triangles gives a=Lsin⁡αa = L\sin\alpha; adding the vertical legs gives b−2y=Lcos⁡αb - 2y = L\cos\alpha; similar triangles give xx:

Where the ring hangs
sin⁡α=aL,y=12(b−L2−a2),x=a2(1−bL2−a2)\sin\alpha = \frac{a}{L}, \qquad y = \frac12\left(b - \sqrt{L^2 - a^2}\right), \qquad x = \frac{a}{2}\left(1 - \frac{b}{\sqrt{L^2 - a^2}}\right)
In words

sine alpha equals a over L, y equals one half the quantity b minus the square root of L squared minus a squared, end of root, x equals a over 2, times the quantity 1 minus b over the square root of L squared minus a squared, end of root

The notes add that in 18.02 constrained problems in any number of variables are done with Lagrange multipliers (p. 6).

Worked example

A ring on a 6 m rope

A 6.0 m rope is tied at (0,0)(0, 0) and at (4.0,1.0)(4.0, 1.0) m. Where does a ring on it settle, and at what angle do the two pieces hang?

Angle

sin⁡α=a/L=4.0/6.0=2/3\sin\alpha = a/L = 4.0/6.0 = 2/3, so α=β≈41.8°\alpha = \beta \approx 41.8° from the vertical.

Height

L2−a2=36−16≈4.472\sqrt{L^2 - a^2} = \sqrt{36 - 16} \approx 4.472 m, so y=12(1.0−4.472)≈−1.74y = \tfrac12(1.0 - 4.472) \approx -1.74 m.

Horizontal position and check

x=4.02(1−1.0/4.472)≈1.55x = \tfrac{4.0}{2}(1 - 1.0/4.472) \approx 1.55 m: left of the middle, towards the lower end. Check: the two pieces measure 1.552+1.742≈2.33\sqrt{1.55^2 + 1.74^2} \approx 2.33 m and 2.452+2.742≈3.67\sqrt{2.45^2 + 2.74^2} \approx 3.67 m, together 6.0 m.

Newton's method#

Newton's method is "one of the greatest applications of calculus": a way to solve almost any equation f(x)=0f(x) = 0 numerically, and at the heart of many of the ways calculators work (transcript, p. 11). The lecture's example is x2=5x^2 = 5, written as f(x)=x2−5=0f(x) = x^2 - 5 = 0; the notes use x2−3x^2 - 3 (notes, p. 1).

The idea. Start with a guess x0x_0; here x0=2x_0 = 2, since 5\sqrt5 is close to 4\sqrt4. Pretend the function is linear: draw the tangent line at (x0,f(x0))(x_0, f(x_0)) and take as the next guess x1x_1 the point where that line crosses the xx-axis (p. 11). The tangent line is y−y0=m(x−x0)y - y_0 = m(x - x_0); setting y=0y = 0 at x=x1x = x_1 gives x1=x0−y0/mx_1 = x_0 - y_0/m, with y0=f(x0)y_0 = f(x_0) and m=f′(x0)m = f'(x_0) (pp. 11–12). Repeating this:

Newton's method
xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}
In words

x sub n plus 1 equals x sub n minus f( x sub n ) over the quantity f prime ( x sub n )

For f(x)=x2−5f(x) = x^2 - 5, f′(x)=2xf'(x) = 2x and the step simplifies (p. 12):

Newton's method for the square root of 5
xn+1=xn−xn2−52xn=12 xn+52xnx_{n+1} = x_n - \frac{x_n^2 - 5}{2x_n} = \frac12\,x_n + \frac{5}{2x_n}
In words

x sub n plus 1 equals x sub n minus the quantity x sub n squared minus 5, all over the quantity 2 x sub n, equals one half x sub n plus 5 over the quantity 2 x sub n

From x0=2x_0 = 2: x1=1+54=94x_1 = 1 + \tfrac54 = \tfrac94, x2=12⋅94+52⋅49=16172x_2 = \tfrac12\cdot\tfrac94 + \tfrac52\cdot\tfrac49 = \tfrac{161}{72}, and so on (p. 12). The errors ∣5−xn∣|\sqrt5 - x_n| shrink astonishingly fast (pp. 12–13):

nnxnx_nerror
02about 2×10−12 \times 10^{-1}
19/4 = 2.25about 10−210^{-2}
2161/72 ≈ 2.236111about 4×10−54 \times 10^{-5}
3≈ 2.2360680about 10−1010^{-10}

Already x2x_2 is "as good an approximation to 5\sqrt5 as you'll ever need", and x3x_3 reaches the edge of a calculator's precision (p. 13). The notes' example, 3\sqrt3 from x0=1x_0 = 1, behaves the same way, and they put it in one sentence: the number of correct digits roughly doubles with each step (notes, p. 3).

f(x)=x2−5f(x) = x^2 - 5 and its tangent line at the current guess x0x_0, computed from the formulas. The tangent crosses the xx-axis at the next guess, x0/2+5/(2x0)x_0/2 + 5/(2x_0). From x0=3x_0 = 3 that is 2.333, already close to 5≈2.236\sqrt{5} \approx 2.236; move the slider to see how the tangent's crossing approaches the root.

Where it ends up. If the iterates converge to a limit x∞x_\infty, take n→∞n \to \infty in the recursion: x∞=12x∞+32x∞x_\infty = \tfrac12 x_\infty + \tfrac{3}{2x_\infty} (for 3\sqrt3), so x∞2=3x_\infty^2 = 3, as hoped (notes, pp. 3–4).

Two warnings (notes, p. 4):

  1. Newton's method can find an unexpected root: starting from x0=−1x_0 = -1, the iterates for x2−3x^2 - 3 go to −3-\sqrt3, not +3+\sqrt3.
  2. It can fail completely: for some functions and starting points the iterates cycle, x2=x0x_2 = x_0, x3=x1x_3 = x_1, …, and never converge.
Worked example

Where cos⁡x=x\cos x = x

Solve cos⁡x=x\cos x = x with Newton's method, starting at x0=1x_0 = 1.

Set up

f(x)=x−cos⁡xf(x) = x - \cos x, f′(x)=1+sin⁡xf'(x) = 1 + \sin x, so xn+1=xn−xn−cos⁡xn1+sin⁡xnx_{n+1} = x_n - \dfrac{x_n - \cos x_n}{1 + \sin x_n}.

Iterate

x1=1−(1−0.5403)/(1+0.8415)≈0.7504x_1 = 1 - (1 - 0.5403)/(1 + 0.8415) \approx 0.7504; x2≈0.7391x_2 \approx 0.7391; x3≈0.739085x_3 \approx 0.739085, and further steps change only digits beyond the sixth.

Why the method is needed

No known formula solves cos⁡x=x\cos x = x; a numerical method is the only way, and Newton's reaches six decimal places in three steps.

Worked example

A cube root

Find 21/32^{1/3} with Newton's method from x0=1x_0 = 1.

Recursion

f(x)=x3−2f(x) = x^3 - 2, f′(x)=3x2f'(x) = 3x^2, so xn+1=xn−xn3−23xn2=23xn+23xn2x_{n+1} = x_n - \dfrac{x_n^3 - 2}{3x_n^2} = \dfrac23 x_n + \dfrac{2}{3x_n^2}.

Iterates

x1=23+23≈1.3333x_1 = \tfrac23 + \tfrac23 \approx 1.3333, x2≈1.2639x_2 \approx 1.2639, x3≈1.25993x_3 \approx 1.25993; the true value is 1.259921…1.259921\ldots

Summary#

  • Related rates: the rate of change of one quantity determines another's through the chain rule; volume rate and height rate are different things.
  • Ring on a string: minimise yy subject to fixed string length; implicit differentiation with y′=0y' = 0 gives sin⁡α=sin⁡β\sin\alpha = \sin\beta, so the two halves hang at equal angles and carry equal tension.
  • Newton's method: xn+1=xn−f(xn)/f′(xn)x_{n+1} = x_n - f(x_n)/f'(x_n), following the tangent line to its zero. For 5\sqrt5 from 2: 94\tfrac94, 16172\tfrac{161}{72}, … The number of correct digits roughly doubles each step.
  • It can converge to an unexpected root, or not converge at all.

Symbols on this page

Show the 39 symbols used here
α\alpha alpha.
The angle the left piece of string makes with the vertical. Unit: rad (here degrees). Say it: “alpha”.
β\beta beta.
The angle the right piece of string makes with the vertical. Unit: rad (here degrees). Say it: “beta” (sounds like “bay-ta or bee-ta”).
θ\theta theta.
In the cosmology note, the development angle of the closed universe. Unit: rad. Say it: “theta” (sounds like “thay-ta or thee-ta”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
∝\propto proportional to.
Is proportional to: doubling one doubles the other. Say it: “is proportional to”.
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
aa a.
The horizontal distance to the right end of the string; in the cosmology note, the scale factor. Say it: “a”.
cc c.
In the cosmology note, the given value in θ − sin θ = c. Say it: “c”.
xx x.
The variable; for the ring, its horizontal position. Say it: “x”.
yy y.
For the ring, its height (negative, below the left end); for a tangent line, its vertical coordinate. Say it: “y”.
tt t.
Time (in minutes for the cone, seconds for the radar); in the cosmology note, cosmic time. Say it: “t”.
dd d.
The d of a derivative, as in dV/dt. Say it: “d”.
nn n.
The step number in Newton's method. Say it: “n”.
mm m.
The slope of the tangent line, f′(x₀). Say it: “m”.
ff f.
The function whose zero Newton's method seeks. Say it: “f”.
bb b.
The height of the right end of the string above the left end. Unit: m. Say it: “b”.
hh h.
The depth of water in the cone. Unit: ft. Say it: “h”.
LL L.
The fixed length of the string. Unit: m. Say it: “L”.
f′f' f prime.
The derivative of f: the slope of the tangent line. Say it: “f prime”.
y′y' y prime.
The slope dy/dx of the ring's constraint curve. Say it: “y prime”.
x0x_{0} x nought.
The starting guess for Newton's method. Say it: “x nought”.
y0y_{0} y nought.
The value f(x₀) at the starting guess. Say it: “y nought”.
x1x_{1} x 1.
The first Newton iterate. Say it: “x one”.
x2x_{2} x 2.
The second Newton iterate. Say it: “x two”.
VV V.
The volume of water in the cone. Unit: ft³. Say it: “V”.
x˙\dot{x} x dot.
The car's velocity along the road in the radar example. Unit: ft/s. Say it: “x dot”.
h˙\dot{h} h dot.
How fast the water level rises in the cone. Unit: ft/min. Say it: “h dot”.
xn+1x_{n+1} x n plus 1.
The next Newton iterate, where the tangent line at x_n crosses zero. Say it: “x sub n plus 1”.
xnx_{n} x n.
The n-th Newton iterate (the current guess). Say it: “x sub n”.
x3x_{3} x three.
The third Newton iterate. Say it: “x three”.
x∞x_{\infty} x infinity.
The limit of the Newton iterates, if they converge. Say it: “x sub infinity”.
θn\theta_{n} theta n.
In the cosmology note, the n-th Newton iterate for θ. Say it: “theta sub n”.
θn+1\theta_{n+1} theta n plus 1.
In the cosmology note, the next Newton iterate for θ. Say it: “theta sub n plus 1”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 33 words used here

New here

Newton's method.
A way to solve f(x) = 0: make a guess, follow the tangent line to where it crosses zero, and repeat from there.
Lagrange multipliers.
A method for finding the largest or smallest value of a function when its variables must satisfy a constraint.

Also used

p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
constraint.
A condition that limits what is allowed, such as a rope of fixed length that links the motions of the bodies it joins. Explained in Tension in ropes and the spring force.
related rates.
Problems in which several quantities change together, and differentiating the equation that links them links their rates of change. Explained in More max–min, and related rates.
chain rule.
The rule for the derivative of a function of a function: multiply the derivative of the outer one by that of the inner one. Explained in Circular motion: polar coordinates, position and velocity.
potential energy.
Energy stored in the arrangement of a system, such as a raised weight or a stretched spring, that a conservative force can give back. Explained in Gravitational potential energy.
critical point.
A point where a function's derivative is zero, so its graph is level there; maxima and minima are found among such points. Explained in Curve sketching with the first and second derivative.
tangent.
A straight line that touches a curve at a point and runs in the same direction as the curve there. Explained in Angles, radians and trigonometry.
ellipse.
An oval curve: the set of points whose distances from two fixed points, the foci, add up to the same total. Explained in Kepler's laws and orbits.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
with respect to.
Taking that variable as the one that changes: a derivative with respect to t measures change as t changes, others held fixed. Explained in Average value, weighted averages and probability.
tension.
The pulling force carried along a stretched rope, string or cable, felt at each point as the pull between its two sides. Explained in What is a force?.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
converge.
To settle towards a definite finite value: an integral, series or sequence converges when its partial results approach a limit. Explained in Improper integrals.
limit.
The value a quantity gets closer and closer to, as near as we like, as its input approaches some value, without having to reach it. Explained in Rates of change and area under a graph.
recursion.
A rule giving each term from the ones before it, or a method that solves a problem by applying itself to smaller copies of it. Explained in Complex matrices and the fast Fourier transform.
closed universe.
A universe with more than the critical density, whose space curves back on itself like a sphere, so it is finite. Explained in Open, closed and flat universes.
scale factor.
The number a(t) that tells how much distances in the universe have stretched: when it doubles, every distance between galaxies doubles. Explained in Towards the universe: an expanding gas cools.
eccentricity.
A number saying how stretched an orbit or ellipse is: zero for a circle, nearer one for a long thin ellipse. Explained in Kepler's laws and orbits.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
implicit differentiation.
Finding dy/dx from an equation that links x and y, by differentiating both sides and solving for dy/dx, without first solving for y. Explained in Implicit differentiation and the derivatives of inverse functions.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
implicit.
Of a function: given by an equation linking x and y, such as x² + y² = 1, not by a formula y = f(x).
numerically.
In terms of actual numbers rather than symbols; often worked out step by step, by computer, instead of from an exact formula.
error.
The difference between a measured or computed value and the true one; often how large that difference may be.
approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
precision.
How finely a measurement is made, or how close repeated measurements are to each other.
iterate.
To repeat a step again and again, each time starting from the previous result.
limiting case.
A situation at the extreme of a range, where some quantity is very large or very small.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
accuracy.
Closeness to the true value: an accurate measurement or calculation gives a result near the right answer.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

33 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Newton's method replaces xnx_n by…
  2. For f(x)=x2−5f(x) = x^2 - 5 with x0=2x_0 = 2, the first Newton step gives…
  3. Roughly how does the error change from one Newton step to the next, once it is small?
  4. A ring hangs on a string tied at two points of different heights. At the lowest point, the two halves of the string…
0 of 4 answered

Flashcards

1 / 3