UBC MATH 100/180 . Final Exam Prep VideosWatch Now

Calculus · Newton's method and Euler's method

Newton's method and Euler's method

Two methods, one idea: follow the tangent line. Learn the formula and the table, watch them move, then solve 34 questions, most of them from past finals.

Problems seen0 of 34

One idea behind both methods: the tangent line

Zoom in close to a point on a curve. The curve looks more and more like a straight line: its tangent line. Newton's method and Euler's method both use this idea, again and again.

0.00.51.01.52.02.53.03.54.01.52.02.53.03.5zoom ×1tangent linecurvegap at the edge: 34% of the picture

Far away, the curve clearly bends away from its tangent line.

The linear approximation

f(x)≈f(a)+f′(a) (x−a)\displaystyle f(x) \approx \cval{f(a)} + \cslope{f'(a)}\,(x - a)

for xx close to aa

The tangent line needs only two numbers: the height f(a)\cval{f(a)} and the slope f′(a)\cslope{f'(a)}. Close to aa it is almost the same as the curve. This is the linear approximation you already know.

The big idea

Newton's method and Euler's method are the linear approximation, used one step at a time.

Two ways to use the tangent line

01234−50510xyx0x3

Finds a root

Newton's method

Find where a curve meets the xx-axis. Follow the tangent line to the xx-axis. The point where it meets the axis is your next guess. Do it again from there.

xn+1=xn−f(xn)f′(xn)\cnext{x_{n+1}} = \cnow{x_n} - \dfrac{\cval{f(x_n)}}{\cslope{f'(x_n)}}

0.000.250.500.751.0001234ty

Follows a changing quantity

Euler's method

You know where yy starts and the rule for its slope, dydt\dfrac{dy}{dt}. Follow the tangent line for one short step. The point where you stop is your next point. Do it again from there.

yn+1=yn+h⋅F(tn,yn)\cnext{y_{n+1}} = \cnow{y_n} + \cstep{h}\cdot\cslope{F(t_n, y_n)}

What does “iterate” mean?

Both methods repeat one small calculation. The answer of one round is the start of the next round. Repeating like this is called iterating. One round is one iteration, or one step.

x0=2\cnow{x_0 = 2}
one step
x1=94\cnow{x_1 = \dfrac{9}{4}}
= 2.25
one step
x2=16172\cnext{x_2 = \dfrac{161}{72}}
≈ 2.2361
5\sqrt{5}= 2.2360679…
Newton's method for 5\sqrt{5}. Each arrow is one use of the formula, and each guess is closer. The decimals are only here to show how close; on paper you keep the fractions.

Reading the small numbers

x0\cnow{x_0}
the start: the first guess.
x1, x2, x3x_1,\ x_2,\ x_3
the guesses after one, two, three steps.
xn\cnow{x_n}
the guess you have now.
xn+1\cnext{x_{n+1}}
the next guess, the one you are finding.
yn, tn\cnow{y_n},\ \ctime{t_n}
the same idea in Euler's method: the value and the time after nn steps.

Count the steps, not the numbers

From x0x_0 to x2x_2 is two steps: x0→x1→x2x_0 \to x_1 \to x_2. Some older exams start at x1x_1. Then two steps go from x1x_1 to x3x_3. Read which number the question starts with.

Why the little n?

The formula is the same in every step. So it is written once, with nn: put n=0n = 0 for the first step, n=1n = 1 for the second, and so on.

Newton or Euler?

Newton's methodEuler's method
What it findsA root: an xx where f(x)=0f(x) = 0.A later value: yy at a later time tt.
You are givenf(x)f(x), and a start x0x_0.dydt=F(t,y)\dfrac{dy}{dt} = F(t, y), a start y(t0)=y0y(t_0) = y_0, and a step size hh (or a number of steps).
One stepxn+1=xn−f(xn)f′(xn)\cnext{x_{n+1}} = \cnow{x_n} - \dfrac{\cval{f(x_n)}}{\cslope{f'(x_n)}}yn+1=yn+h⋅F(tn,yn)\cnext{y_{n+1}} = \cnow{y_n} + \cstep{h}\cdot\cslope{F(t_n, y_n)}
The tangent line isfollowed to the xx-axis.followed for one step of length hh.
Do you differentiate?Yes: you find f′(x)f'(x) yourself.No: the equation gives the slope.
It gets better withmore steps. It is very fast.smaller steps (more of them).
The answer isthe last xx.the last yy.

Words you will see

Root (or zero)
A number xx where f(x)=0f(x) = 0. On the graph, where the curve meets the xx-axis.
Iteration (or step)
One use of the formula. Two iterations means you use it twice.
Start (initial guess, initial value)
Where you begin: x0x_0 in Newton's method, y(t0)=y0y(t_0) = y_0 in Euler's method.
Converge
The guesses get closer and closer to one number.
Differential equation
An equation with a derivative in it, like dydt=t+y\dfrac{dy}{dt} = t + y. It gives the slope at every point.
Initial condition
The start of the solution, like y(0)=1y(0) = 1.
Step size
hh (also written Δt\Delta t or Δx\Delta x): how far tt moves in one Euler step.
Slope field
Many short line segments, each with the slope the equation gives at that point.
Steady state
A height yy where the slope is 00 at every time tt: a row of flat segments in the slope field. A solution that starts there stays there, and no solution crosses it.
Overestimate, underestimate
An estimate that is too big, or too small.

More of the same kind: related rates and optimization, every type of problem. One recipe per kind of question: the Math 100 Problem Playbook.