You are on page 1of 4

1

Taylor series
Have you wondered how your calculator knows the values for
all the trigonometric functions for every conceivable angle or ra-
dian measure? Is it likely that all those values have been stored,
like a massive table of dataor is there a way to calculate these
function values?
Of course there is! The following problems present one such Today, theres no real need to do
these calculations by hand, but
before there were calculatorsor
computerspeople had no
choice!
technique. Its not the technique used by calculators, but it is
a good one for calculating by hand.
1. Start with an approximation to a curve. Suppose you have
a continuous, dierentiable function f.
(a) The curve of y = f(x) can be approximated for values
of x near a particular value a using the tangent line
when x = a. Write an equation for that line.
(b) The tangent line is a line whose value at x = a is f(a),
and whose rst derivative at x = a is the same as the
rst derivative of f at x = a. You can make a bet-
ter approximating curve using a quadratic equation,
by also requiring the concavity (second derivative) to
be the same at x = a. Find a quadratic polynomial p
for which p(a) = f(a) and both the rst and second
derivatives are the same the rst and second deriva-
tives, respectively, of f at x = a.
(c) Extend this process to nd a cubic polynomial whose
rst, second, and third derivatives at x = a are the
same as the corresponding derivatives of f at x = a
and whose value for x = a is f(a).
(d) Find a quartic (fourth-degree) polynomial in the same
way.
(e) Write a general formula for an nth degree polyno-
mial p for which p(a) = f(a), p

(x) = f

(x), . . . , and
p
(n)
(x) = f
(n)
(x).
Problems with a Point: November 26, 2001 c EDC 2001
Taylor series: Problem 2
Polynomials of the type that you have been creating are called
Taylor polynomials after mathematician Brook Taylor (1685
1731). As terms are added, the approximation ts the original
function better and better, for values of x near x = a. If there are
an innite number of terms, the polynomial becomes a Taylor
series, which is equivalent to the original function. The Taylor Note that f must be
dierentiable at x = a an innite
number of times.
series expansions for trigonometric functions allow calculations
to as great an accuracy is needed.
2. Complete the following to nd the Taylor series expansion
of the sine function.
(a) Find the rst several derivatives of sin x, until you have
a pattern you can rely on.
(b) Evaluate the rst several derivatives of sin x at x = 0. The actual x value for the
evaluation doesnt really matter.
Using x = 0 will make
calculations easier.
(c) Use your calculations and the general formula you wrote
in problem 1 to write the fth-degree Taylor polyno-
mial for sin x.
(d) Write the (innite) Taylor series for sin x.
3. Write the Taylor series expansion for the cosine function.
4. The approximating polynomials you wrote are centered
around x = 0; that means the further from 0 your value
of x is, the more inaccurate your estimate will be. Since
the trigonometric functions are periodic and symmetric,
though, the furthest you have to go from x = 0 is

2
. Use a
calculator or a spreadsheet to nd how many terms of the
expansion are needed to calculate sin

2
and cos

2
to eight
digits of accuracy.
Problems with a Point: November 26, 2001 c EDC 2001
Taylor series: Hints 1
Hints
Hint for problem 1a. The slope of the tangent line at x = a
is the rst derivative of f evaluated at a. Use the point-slope
form of an equation for a line, y y
1
= m(x x
1
).
Hint for problem 1b. Your equation for the line should be of
the form y = f

(x)(x a) + f(a). You can add a term to this


expression with the following properties:
When evaluated at a, it must be 0 so it doesnt change the
value of f(a). That is, it must have a factor of x a.
The rst derivative, when evaluated at a, must also be 0.
The derivative must have a factor of x a.
The second derivative should be a constant, equal to f

(a).
When you think you have the correct term, be sure you take
the second derivative and check that its actually equal to f

(a).
You may need to multiply by a constant.
Hint for problem 4. If you use a spreadsheet, try to use the
Fill Down feature. For the rst cell, enter 1 or 0, whichever
you want to use to represent the rst term. (It may be easier if
you use 0 for the rst term.) For the rst row, second column,
enter the value of the rst term, evaluated at

2
.
Note: Your spreadsheet program
may have dened as a constant.
See the manual or the Help guide. Set up the second row to build o the rst row. Let the rst
column count the term number, so set cell A2 to be =A1+1.
Since you add a given term to the sum of all the terms that went
before it, start this entry with =B1+. The second term uses
the value for the term number (now the value in A2) in three
ways. (One is to identify if you should multiply by 1 or not.)
Enter a general formula for the nth termnot specically the Note: To do a special operation
like factorials (!), you may need
to use special syntax for your
spreadsheet. If using ! causes an
error, check the Help guide for
factorials.
second termand use A2 instead of n.
Select cells A2 and B2, and drag to also select several rows
below them. Then select Fill Down (or Fill. . . Down) from
the menu (perhaps the Edit menu). The spreadsheet will
automatically include the next term in each successive row.
Problems with a Point: November 26, 2001 c EDC 2001
Taylor series: Answers 1
Answers
1. (a) y = f

(a)(x a) + f(a) Teachers Note: The technique


used by calculators is the
CORDIC method, developed by
Jack E. Volder in 1959. Advanced
students might want to do some
research into this method.
(b) p(x) =
1
2
f

(a)(x a)
2
+ f

(a)(x a) + f(a)
(c) p(x) =
1
6
f

(a)(x a)
3
+
1
2
f

(a)(x a)
2
+ f

(a)(x
a) + f(a)
(d) p(x) =
1
n!
f
(n)
(a)(xa)
n
+. . .+
1
2
f

(a)(xa)
2
+f

(a)(x
a) + f(a)
2. (a) If f(x) = sin x, then:
f

(x) = cos x
f

(x) = sin x
f

(x) = cos x
f
(4)
(x) = sin x
(b)
f(0) = 0
f

(0) = 1
f

(0) = 0
f

(0) = 1
f
(4)
(0) = 0
(c) p(x) =
1
5!
x
5

1
3!
x
3
+ x
(d) sin x = x
1
3!
x
3
+
1
5!
x
5
+ + (1)
n 1
(2n+1)!
x
2n+1
+
3. cos x = 1
1
2!
x
2
+
1
4!
x
4
+ + (1)
n 1
(2n)!
x
2n
+
4. The expansion needs only 7 terms (n = 6) to give eight
digits of accuracy.
Problems with a Point: November 26, 2001 c EDC 2001

You might also like