Let f(x) = sin(x). By taking derivatives, find a function g(x) of the form g(x) = a + bx + cx2 that has the same value, slope, and second derivative} as f when x = 0.
Graph f and g on the same axes.
We want g(0) and f(0) to be the same. We can see that
g(0) = a + b(0) + c(0)2 = a
and we know that
f(0) = sin(0) = 0.
In order for g(0) and f(0) to be the same, we must have a = 0.
Next, we want g'(0) and f'(0) to be the same. We can compute
g'(x) = b + 2cx
and we know f'(x) = cos x. To have these derivatives be the same at 0, we need
g'(0) = b + 2c(0) = b
f'(0) = cos(0) = 1
to be the same, so we must have b = 1.
Finally, we want the second derivatives to be the same. We calculate the second derivatives:
g(2)(x) = 2c
f(2)(x) = -sin(x)
so we need
2c = g(2)(0) = f(2)(0) = -sin(0) = 0
which means c = 0. Now that we know a, b, and c, we can write
g(x) = a + bx + cx2 = 0 + x + 0x2 = x.
If we graph g(x) and f(x) on the same graph, g does look like a good approximation of f close to zero:
In this case, it just happened that the second derivative of f was zero, so we ended up with g being a line anyway.
Find the 5th-degree Taylor polynomial centered at 0 for cos x.
Taking derivatives of cos x and evaluating at 0 we get
We plug these values into the formula and get
Again, we leave the factorials in factorial form. Since the coefficient of the x5 term is 0, this is the 5th degree Taylor polynomial even though it only has degree 4. Again, it looks like we did things right:
What is the Maclaurin series for f(x) = cos x (a.k.a. the Taylor series for f(x) = cos x near x = 0) ?
Continuing the pattern we found for the Taylor polynomials in the previous exercise, the Taylor series is
where the terms start at n = 0.
What is the nth term, or general term, of the Taylor series for f(x) = ex near x = 0?
The Taylor series for f(x) = ex is
so the general term, or nth term, is
(a) Find the Taylor series for .
(b) Why does your answer make sense?
(a) Remember the chain rule (link) and be careful with the minus signs.
(b) You've seen the expression before. Where?
a) Let's take some derivatives and evaluate them at 0. We start with
Taking the derivative and remembering to use the chain rule, we get
Each time we take a derivative, we'll get two negative signs, one from the exponent and one from the derivative of the inside function (1 – x). These negative signs will always cancel out.
So we get
Evaluating at 0, we have
and so on. For every n, f(n)(0) = n!.
Now we put this information into the formula and get
A graph confirms that this is reasonable:
b) The expression is the sum of the infinite geometric series with ratio x, where |x| < 1.We just found that the Taylor series for near zero is
1 + x + x2 + x3 + ... + xn + ...
This is the infinite geometric series with ratio x. The condition |x| < 1 sounds like x being "close to zero".
Which is the Taylor series for the function f(x) near x = 5 ?
The correct answer is (C). (A) is the generic formula and doesn't mention 5 at all. (B) put 5 in for x, but the phrase "near x = 5" means we want to substitute 5 for a, not for x. (D) has the exponents wrong - according to the formula we want to have the expression (x – 5)2, not (x2 – 5).
Find the Taylor series for the function f(x) = ln x at a = 1.
We have f(x) = ln x. We need to take derivatives of this function and evaluate at a = 1, then plug the resulting values into the formula.
Putting this information into the formula we have
Let's graph the original function f(x) and the first 4 terms of the Taylor series to make sure everything looks ok:
Which of the following functions could be the second degree Taylor polynomial for the function f(x) near -π/2?
The correct answer is (A). Functions (B) and (C) have too many direction changes to be second-degree polynomials (link to wherever this got discussed),
so (A) is the only possibility. Since (A) appears linear, we assume the second-degree Taylor polynomial has coefficient 0 on the term.
Find the 5th degree Taylor polynomial for the function f(x) = cos x at .
We take some derivatives and evaluate them at . Since , we don't even have to think to evaluate half of these derivatives.
Then we plug the values into the formula, making sure we keep parentheses in the right places and keep track of the negative signs:
Graphing f(x) and g(x), we see the functions f(x) and (C) from the previous exercise:
Find the first four nonzero terms of the Taylor series for f(x) = x1/3 centered at x = 1.
Let's hope that none of the terms are zero, and find the degree 3 Taylor polynomial centered at 1 (since the degree n polynomial has n + 1 terms). We find derivatives, evaluate them at 1, and plug the resulting values into the magic formula. Since 1 raised to any power is 1, these aren't quite as messy as they appear at first. As with previous examples, we leave terms in expanded form to make the patterns easier to see.
Putting this into the formula, we get
Since none of the terms are zero, we've successfully found the first four nonzero terms. A graph confirms that our answer makes sense: