You are on page 1of 8

Math 21 - Spring 2015

Classnotes, Week 1

1.1 Derivatives of polynomials


Example 1.1 (Question 1 of Pre-quiz 1). Consider the polynomial function f : R → R given
2
by the rule f (x) = 2x3 + x2 + 4x + 3. Compute the following quantities:

a) f (0)

b) f 0 (0)

c) f 00 (0)

d) f 000 (0)

Now compare the following numbers:

a) Compare the number f (0) to the number a0 , where a0 is the constant term of f .

b) Compare the number f 0 (0) to the number a1 , where a1 is the coefficient of x in f .

c) Compare the number f 00 (0)/2 to the number a2 , where a2 is the coefficient of x2 in f .

d) Compare the number f 000 (0)/6 to the number a3 , where a3 is the coefficient of x3 in f .

What do you notice?

Your feeling should be that for any polynomial, you can compute any derivative you want
at the point x = 0 just by the knowing the rule of the polynomial. This is actually the case
(this is not just a feeling you’re having), and there is a way to know the derivatives of f
given its rule if f is a polynomial function.
Before we record this way, we need to introduce a new notation: n!, which is read “n
factorial”. We always have that

n! = 1 · 2 · 3 · 4 . . . · (n − 1) · n.

For example,
1! = 1,
2! = 1 · 2 = 2,
3! = 1 · 2 · 3 = 6,
and
4! = 1 · 2 · 3 · 4 = 24.
We also make the convention that 0! = 1 With this notation, we can say:

1
Proposition 1.2. The polynomial function f : R → R given by the rule:
N
X
2 3 N −2 N −1 N
f (x) = a0 + a1 x + a2 x + a3 x + . . . + aN −2 x + aN −1 x + aN x = an x n
n=0

has derivatives:

f (0) = a0 , f 0 (0) = a1 , f 00 (0) = 2a2 , f 000 (0) = 6a3 ,

and more generally


f (n) (0) = n! an .

1.2 Taylor polynomials


Definition 1.3 (Linearization). Let f : R → R be a differentiable function. The lineariza-
tion of f at x = 0 is the function L : R → R given by the rule

L(x) = f 0 (0) x + f (0).

Remark. This is simply the equation of the tangent line of the graph of f at the point
(0, f (0)).
If we think about this the right way, here is what we can notice: The tangent line, or
linearization, is, in a sense, the “best” line for f at the point x = 0. It is the line that is
“closest” to f near x = 0. It also has the property that

L(0) = f (0)
and L0 (0) = f 0 (0).

In other words, the fact that the linearization is the line with slope f 0 (0) and going through
the point (0, f (0)) means that f and L have the same value at x = 0, and also their first
derivatives have the same value at x = 0.

Example 1.4 (Question 2 of Pre-quiz 1). Consider the function f : R → R given by the
rule f (x) = e−x sin x. Find the linearization of f at x = 0, and graph f along with its
linearization.
If you use the Week 1 Sage worksheet, the linearization is the line that is green in the
Question 1 plot, and you should copy the graph of f and its linearization at x = 0 here.

2
Now, we might want the “best” degree 2 polynomial for f at x = 0. It would be a sort of
tangent polynomial of degree 2. How can we define that? Thinking back to the linearization
example, we might want to have it be a polynomial of degree 2 that has the same value at
x = 0 as f , whose first derivative at x = 0 has the same value as the first derivative of f at
x = 0, and whose second derivative also has the same value at x = 0 as the second derivative
of f .
In other words, we are looking for a polynomial of degree 2 which we will call T2 and
such that

T2 (0) = f (0),
T20 (0) = f 0 (0),
and T200 (0) = f 00 (0).

Thankfully with our formula telling us how the derivatives of polynomials are related to the
coefficients of the polynomial, we can easily write down this polynomial.
We call this “tangent polynomial of degree 2” the Taylor polynomial of degree 2 of
f . It is the polynomial function T2 : R → R given by the rule

f 00 (0) 2
T2 (x) = x + f 0 (0) x + f (0).
2
We sometimes wish to emphasize that T2 agrees with f near x = 0. In this case we might say
that T2 is the Taylor polynomial of f centered at a = 0, or the Maclaurin polynomial
of f . We will always talk about Taylor polynomials centered at a = 0 in this class, but the
book always considers the case of general a. If you continue on in math after Math 21, you
should really learn about Taylor polynomials centered at a general a, and solve the practice
problems about general a on Homework 1.

Example 1.5 (Question 3 of Pre-quiz 1). Consider again the function f : R → R given by
the rule f (x) = e−x sin x. Find the Taylor polynomial of degree 2 of f at x = 0, and graph
f along with its Taylor polynomial of degree 2 .
If you use the Week 1 Sage worksheet, the Taylor polynomial of degree 2 is the parabola that
is green in the Question 2 plot, and you should copy the graph of f along with its Taylor
polynomial of degree 2 here.

3
We can continue this by asking for a degree 3 polynomial T3 such that

T3 (0) = f (0),
T30 (0) = f 0 (0),
T300 (0) = f 00 (0),
and T3000 (0) = f 000 (0).

This polynomial is the Taylor polynomial of degree 3 of f (centered at a = 0) and it is the


polynomial function T3 : R → R given by the rule

f 000 (0) 3 f 00 (0) 2


T3 (x) = x + x + f 0 (0) x + f (0).
6 2
Nothing stops us from continuing forever, and we make a general definition. Before we
make the general definition we will need one more notation: we will write f (n) (x) to mean
“the nth derivative of f ”. Out of habit, we will still often write

f 0 (x) instead of f (1) (x),


f 00 (x) instead of f (2) (x),
f 000 (x) instead of f (3) (x),
and almost always f (x) instead of f (0) (x),

where the symbols on the right are the same thing as the symbols on the left, and the ones
on the right are in our new notation.
Strangely, we will never write f 0000 (x), and always write f (4) (x), since for whatever reason
4 derivatives is just too many.
To define the Taylor polynomial of f of degree N , we will need more particularly the
numbers f (n) (0), which is the nth derivative of f evaluated at x = 0, for the numbers n
smaller than or equal to N . For example when n = 1 we have f 0 (0) = f (1) (0).

Definition 1.6. The Taylor polynomial of degree N of f is the polynomial function


TN : R → R given by the rule

f (N ) (0) N f (N −1) (0) N −1 f 00 (0) 2


TN (x) = x + x + ... + x + f 0 (0) x + f (0).
N! (N − 1)! 2

Example 1.7 (Question 4 of Pre-quiz 1). Consider again the function f : R → R given by
the rule f (x) = e−x sin x. Find the degree 5 Taylor polynomial of f at x = 0.
If you use the Week 1 Sage worksheet, the Taylor polynomial of degree 5 appears when you
slide the slider to 5 in Question 3. Otherwise, you can just compute the first five derivatives
of f , plug in x = 0 in each, and plug all of these numbers in the formula above, with N = 5.

4
1.3 The remainder function
After playing with Taylor polynomials for a while, one gets the sense that the higher the
degree of the Taylor polynomial (by choosing a large number N ), the better the Taylor
polynomial should be at approximating f near x = 0. In many examples this is true both
in the sense that the approximation is closer to f for values of x that are near x = 0, and
in the sense that the approximation remains fairly accurate for values that are further away
from x = 0. We will now spend some time discussing this idea in more depth.
We first define the Remainder function, which is simply how far off we are when we
use TN to approximate f :
RN (x) = f (x) − TN (x),
or alternatively:
f (x) = TN (x) + RN (x).
Computing the Remainder function is difficult. In fact, it is as difficult as computing
f itself, since the Remainder is the difference between f (which is hard to compute) and
TN (which is easy to compute). However, knowing about the Remainder is of the utmost
importance: If we use TN to approximate f , for most applications it is critical to know how
far off our approximation is.
As usual when thinking of our mistake when approximating, we will want to know how
big the Remainder gets in absolute value. This is because we mostly care about how wrong
we are, and not so much about if we are wrong from overestimating or underestimating.
Proposition 1.8 (Taylor’s Inequality, Theorem 9 in Section 8.7). Let K be a number such
that
|f (N +1) (x)| ≤ K when −r ≤ x ≤ r.
Then
K
|RN (x)| ≤ |x|N +1 when − r ≤ x ≤ r.
(N + 1)!

Book reading: This week you will also want to read:


• Example 4 on page 609 of the book (Section 8.7) where they use Taylor’s Inequality
to give a bound for the Remainder function for f (x) = sin x.
• For more examples and background information, read Section 8.8 of the book. In
particular, starting on page 623 there are two applications of Taylor polynomials to
physics that are quite interesting.

1.4 Geometric series


In this section we study the Taylor polynomials of the function f : (−∞, 1) ∪ (1, ∞) → R
given by the rule
1
f (x) = .
1−x

5
In class we will compute the first few Taylor polynomials of f and conclude that

TN (x) = 1 + x + x2 + x3 + . . . + xN .

There is actually a shorter way to write TN : We first multiply through by x:

xTN (x) = x + x2 + x3 + . . . + xN + xN +1

and find out that

(x − 1) TN (x) = xTN (x) − TN (x)


= (x + x2 + . . . + xn + xN +1 ) − (1 + x + x2 + . . . + xN )
= xN +1 − 1

And dividing both sides by (x − 1) we have

xN +1 − 1 1 − xN +1
TN (x) = = .
x−1 1−x
Therefore, for any N we have

RN (x) = f (x) − TN (x)


1 1 − xN +1
= −
1−x 1−x
N +1
x
= .
1−x

1.5 Taylor polynomials you must know


Here we will collect some Taylor polynomials which you are responsible for this quarter.
Write down the Taylor polynomial of degree N for the following functions:
• f : R → R, f (x) = ex

• f : R → R, f (x) = sin x

6
• f : R → R, f (x) = cos x

• f : R → R, f (x) = e−x

• f : [−1, 1) → R, f (x) = ln(1 − x)

1
• f : (−1, 1) → R, f (x) = 1−x

1.6 Bonus: The integral form of the remainder function


This material will not be covered at this time, but might be covered at the end of the quarter
depending on how things go. In any case, this is interesting stuff, and important if you want
to prove Taylor’s Inequality.
Proposition 1.9 (Integral form of the Remainder). Let f : R → R be smooth. Then the N th
Remainder function RN defined above is given by the rule
Z x
1
RN (x) = f (N +1) (t)(x − t)N dt.
N! 0
Proof. We do the case N = 1. You should work out the case of N = 2 by yourself. Then, if
you are interested in mathematics, read up on proofs by induction (or ask a TA or instructor
about proofs by induction), then try to prove this theorem by induction for any N .
We must show that Z x
R1 (x) = f 00 (t)(x − t) dt,
0

7
and since R1 (x) = f (x) − T1 (x) by definition, we must show that
Z x
f (x) − T1 (x) = f 00 (t)(x − t) dt, (1)
0

Since T1 (x) = f 0 (0) x + f (0), again by definition, the left hand side of equation (1) is equal
to

f (x) − T1 (x) = f (x) − [f 0 (0) x + f (0)]


= f (x) − f 0 (0) x − f (0)
= −f 0 (0) x + [f (x) − f (0)], (2)

where square brackets mean the same thing as round brackets.


Combining Equations (1) and (2) together, our goal is to show that
Z x
f 00 (t)(x − t) dt = −f 0 (0) x + f (x) − f (0).
0

We do integration by parts on the left side, letting u = x − t and dv = f 00 (t) dt. Then
du = −dt and v = f 0 (t). So
Z x Z x
00 0 t=x
f (t)(x − t) dt = (x − t)f (t)|t=0 − f 0 (t)(−dt)
0 0
Z x
0 0
= 0 · f (x) − x · f (0) + f 0 (t) dt.
0
Rx
By the Fundamental Theorem of Calculus, 0 f 0 (t) dt = f (x) − f (0), since f is an antideriva-
tive of f 0 . Therefore
Z x
f 00 (t)(x − t) dt = −xf 0 (0) + f (x) − f (0),
0

as we wanted, and the proof is done.

You might also like