0:00

Welcome to Calculus, I'm professor Greist.

We're about to begin lecture 12 on linearization.

Derivatives are useful in so many contexts, moving far beyond computing

slopes. In this lesson, we'll cover one of the

primal application to linearization. This stems from our understanding of

Taylor series. Linearization is the first step in a

Taylor series, using the first derivative to approximate.

Thinking of derivatives in terms of linear variation can be frustrating, if

you're trying to visualize it. It's maybe not so easily visualized as is

slope, however in some samples you cant early see the variation.

Consider the area A, the square of side length x.

What happens if we increase x by small amount?

The area becomes x squared plus 2xh plus h squared.

We can see those terms by increasing the side length a little bit and decomposing

the extra area into a pair or rectangles the area x times h and a small square,

whose area is h squared. So, ignoring the terms in big O of h

squared, we see that the linear variation is 2x times h.

For a triangle, we would get something similar, let's say a right triangle with

length x and height x, then the area, one half x squared, has the following

variation. A of x plus h is one half x squared plus

x times h plus one half H squared. Visualizing the additional area, we can

break it up into a parallelogram. Whose width is h, and whose height is x,

giving a linear variation term of x times h.

The leftover material is in big O of h squared.

Lastly, for a circular disc of radius x. We have that the area is pi times x

squared. What does the variation look like in this

case? I ahve x plus h is pi x squared plus 2 pi

x h. Plus pi h squared.

that means if we increase The area a little bit then the, the first order term

has area two pi X times H. But then you've got this leftover higher

order term. How does that work?

That's a little harder to see. It's maybe a bit easier if you

approximate the circular disk by a regular polygon with many sides.

And extend those sides out to a height of h.

Then you see that there are a number of small triangles.

Left over, whose areas will add up, to that of a disc of radius h in the limit

as the number of sides is going to infinity.

These first order of variations are the basis for doing linear approximation.

For example, let's say you want to estimate the length.

Of a bannister for a staircase. If you know something about the

dimensions, let's say it's 13 units across and 9 units high, then that length

would be square root of 9 squared plus 13 squared or the square root of 250.

Let's say you want to come up with an estimate for that.

I don't know what that exact number is, and let's say I don't have a calculator.

Well, I could consider the function f of x equals square root of x.

And I do know what the square root of 256 is.

So, that's, 16 squared. To get from there to 250, I can use a

value of H, a perturbation of negative six.

So that from a Taylor Expansion, f of 250 is going to be f of 256 plus, well, the

derivative evaluated at 256 times the difference times h.

Negative six. Although the terms in the Taylor

expansion are of higher order, well, let's see.

The square root of 256, that's 16. Minus six over two times 16.

And that gives us 15 and 13 16ths. As as answer, and that's not so bad of an

approximation. That's about 15.8.

The true answer is the same up to the first three digits.

So, in this case, linear approximation works pretty well.

5:50

Consider a different example. Let's try to estimate pi raised to the

20th power without using a calculator. Here's a hint.

If you look at pi squared, that's pretty close to ten.

it's roughly 9.86. I'll let you do the math without a

calculator to verify that one fact. Having done that let's consider the

function f of x that raises x to the 10th Power and then, if we tailor expand that

function, about x equals 10, then we're not too far off of pie squared to the

10th or pie to the 20th. In this case, h your error, is pi squared

minus ten. Which, according to oru computation is

about, negative 0.14. All right, so in that case pi to the 20th

which is pi squared to the 10th. Is approximately 10 to the 10th plus the

derivative of x to the 10th. That's 10 times x to the 9th evaluated at

x equals 10 times h negative 0.14. Now if we simply that, a little bit, we

see that we get 0.86 times ten to the tenth, or 0.86 times ten to the ninth.

That's our approximation to pi to the 20th.

In scientific notation that would be 8.6E9.

The true answer is approximately 8.77E9. We're not terribly close but we at least

got the the number of digits correct and the first digit correct as well.

We're within 2%. Now I can hear you wondering why we don't

simply use a calculator. But what is the calculator?

How does the calculator compute a number? Well, a calculator is using linear

approximation as well, often through the following algorithm.

Newton's method is an algorithm for finding the root of a function f of x.

The first step in this method is to guess.

Pick some value let's call it x where we can compute the function and its

derivative Then, let's say that the root is nearby at some value x plus h, for

some h. We're going to linearize f at x, to get f

at x plus h equals f of x, plus f prime at x times h, plus Terms and [UNKNOWN]

another h squared, ignoring those terms and approximating we can solve for the

root. Set that equal to zero and solve for h.

That gives us minus f of x over f prime of x...

Now, h is not the root, x plus h is the root.

And so we get the following formula. And the genius of Newton's method is not

to stop there, but to repeat, or iterate. And do it again, getting a better

approximation. And then, your last step is to hope that

this repetition will converge to the desired root.

10:39

sequence of points x sub n where the next term in the sequence x sub n plus 1 is

given by x sub n minus f of x n over f prime at x n.

This is Newton's method. Now, hopefully it converges.

Let's consider the problem of trying to compute the reciprocol of a number, a.

One over a can be realized as the root of f of x equals a minus 1 over x.

What would it take to compute that root? Well the derivative of this function is

easy doc compute, it's one over x squared, and taking Neuton's update law,

substituting in for f and f prime. I'm doing a little bit of

simplification... Gives that x n plus 1 equals twice x n

minus a times xn squared. What's remarkable, in this formula is

that there's no division involved, only multiplication and subtraction.

So, let's, fire up the computer. And see if we can't, solve this for a

value of a equal to e 2.71828, et cetera. We'll make an initial guess of x not

equals 1/2. And then, we'll start computing using

Newton's updated law that we have derived.

And what we see is that after a few short steps, just four steps, seems to be

giving us 6 digits of accuracy. That's pretty good convergence.

Likewise, if we want to compute a cube root of A, we can realize that as the

root of F of X equals X cubed minus A. In this case also the derivative is

trivial to compute... And inserting these into Newton's update

law gives us xn plus 1 equals 2 3rds xn plus a over 3 times xn squared.

Now again, if we say evaluate this For a = 100.

What's the cube root of 100? We need to make a guess.

I know the cube root of 125 is five, so let's use that for our initial guess.

And then doing the computations Gives a value that seems to be converging

extremely quickly. Even after three steps, we've got as many

digits of accuracy as represented on this computer.

So what we see is that sometimes Newton's method converges very quickly.

But other things can happen. You have to be careful.

Let's say you pick an initial condition and start applying Newton's method.

One of the things that can happen is that you do not converge to the root you

wanted to get. You may converge to a different root.

14:19

Worse things can happen still. Depending on your initial condition, you

might wind up getting a value XN for which the derivative there vanishes.

As you can see either graphically or from the update law, this leads to a situation

where XN plus one is undefined. And this is really bad.

You might not converge to anything. But despite those dangers, Newton's

method and linearization are extremely useful in practice.

Linearization pervades mathematics, and there are all manner of things that you

can linearize. You can linearize data.

You can linearize differential equations and dynamics.

You can even linearize operators. We'll get to a little bit of this later

on in this course, but some of it is going to have to wait for you to take

more math. And so, we see the power of linearization

using the first derivative to approximate.

But this is really just the first step in a broader tailor expansion.

In our next lesson, we'll consider higher derivatives and their uses across a

variety of applications.