Little Red Riding Hood's grandma has moved out of her cabin in the woods and has taken an apartment in the city. Little Red Riding Hood with her basket of goodies took the bus downtown to visit her. Before she left, Little Red Riding Hood's mother gave her specific instructions.
"Get off the bus at the intersection of Church and Chapel streets. Then continue to walk past the intersection in the same direction as the bus was going. Grandma's apartment is in the fourth building past the intersection. And be sure you don't talk to strangers, dear."
Little Red Riding Hood got off the bus at the proper place and crossed the street. But to her dismay, the buildings were all built right up against each other. She couldn't tell where one ended and the next one began. Again and again she tried to count the buildings, but in the end her efforts produced only tears of frustration.
The wolf, who was standing on the street-corner, saw everything. "Dear little girl," he said, "what could possibly be so troubling that you should cry like that?"
"Go away," she replied. "I'm not supposed to talk to strangers."
The wolf was undaunted. "So you would prefer to stand there crying when you could ask me for assistance? All I desire is to put an end to your tears. Now tell me please, sweet child, what is the matter?"
Little Red Riding Hood could see that asking the wolf for help was much more likely to get her to Grandma's than crying. So she told him the whole story.
"The solution is oh so simple, tender lass," he said. "You see, the width of each building is exactly seventeen of your steps. You know how to multiply, don't you? You need only multiply those seventeen steps per building times the four buildings you want to count, and you will be able to find your Grandma's house. Just start at the corner, walk down the street counting your steps, and when you have counted to sixty-eight, you will be there."
The wolf stayed with her for her first few steps, then disappeared into an alley-way. Little Red Riding Hood carefully counted off the sixty-eight steps and was pleased to discover that it brought her quite close to a doorway. In she went, climbed the stairs, and knocked on the door. "Enter deary," came a raspy voice from within. And she did.
"Grandma!" she exclaimed. "What awful plastic surgery you've had..."
I'll let you provide your own ending to the story. Besides the lesson about not talking to strangers, what other lesson is there for us in this tale?
Suppose that the intersection of Church and Chapel streets is
Well it seems the wolf was also a calculus instructor who lost his job for having his freshman students for dinner. So here is the wolf's line of thinking:
y(x) = x17, then everybody knows that y(1) = 1. The number, x = 1.0004, is very close to x = 1, which is means that Grandma's building is very close to Church and Chapel. But how close? I know that y'(x) = 17x16. And it's easy to see from that that y'(1) = 17. So whenever I'm nearby Church and Chapel, for every 0.0001 that x increases, I should see y(x) increase by approximately 17 times that.
In this way the wolf was able to approximate the location of Grandma's
The wolf's calculation is just another application of something that we have been using frequently in previous sections. That is, if f(x) is a continuous function and its derivative, f'(x), is also continuous, you can approximate f(x+h) using
f(x + h) » f(x) + hf'(x) eq. 8.4-1where the » symbol means "approximately equal to." And we know from our discussion of the
Step 1: 9.5 is close to 9, which is a perfect square. And indeed you know that the square root of 9 is 3
Step 2: Find the derivative of the square root function. We've done that one before.
_ f(x) = Öx 1 f'(x) =
Step 3: Find the value of the derivative at the x where you know the square root.
That would be at
1 1 f'(9) =
= 2Ö9 6
Step 4: What's the difference between the number you know the square root of and the number you are interested in taking the square root of? That value is h.
h = 9.5 - 9 = 0.5When you are not looking at this page you might have to ask yourself, "Which way do I take the difference?" Always set it up so that if you add h to the number where you know the value of the function (in this case that number is 9), you will get the number that you want to know the function of. Remember that you know f(x) and you are looking for
Step 5: Apply the approximation forumla.
___ _ 1 1 Ö9.5 » Ö9 + hf'(9) = 3 + 0.5 ×Using a calculator, I find that squaring the approximation yields 9.5064444, which is within 0.1% of 9.5. Using the calculator again, I find that the square root of 9.5 is, to 10 figures, 3.082207001, which differs from the approximation by less than 0.1%. Not bad.
= 3 6 12
In some textbooks they will use the symbol, Dx, instead of h. For the problem we just did, it would look like
Dx = 9.5 - 9 = 0.5 f(x + Dx) » f(x) + Dxf'(x)Don't let that throw you. It's the same thing just using a different name.
In the movie, Infinity, Richard Feynman was depicted challenging a Chinese merchant to an arithmetic contest in which the merchant was permitted to use his abacus. The merchant beat him on simple addition and multiplication problems. The problem where Feynman bested the merchant was taking the cube root of 1729. The merchant came up with 12, but Feynman insisted that they carry it out to some decimal places, and he used the method described above to do just that.
Step 1: 1729 is close to 1728, which is 123 (you know this because you recall from junior high that there are 1728 cubic inches in a cubic foot).
Step 2: Find the derivative of the cube root function:
f(x) = x1/3 1 f'(x) =
Step 3: Find the value of the derivative at the x where you know the cube root.
1 1 1 1 f'(1728) =
1728-2/3 = × = 3 3 122 432
Step 4: What's the difference between the number you know the cube root of and the number you are interested in taking the cube root of? That value is h.
h = 1729 - 1728 = 1
Step 5: Apply the approximation forumla.
1 17291/3 » 12 + hf'(1728) = 12How Feynman was able to divide out the fraction into the decimal, 12.0023, as quickly as he did, I don't know. Doing that division is the hardest part of this problem. The value Feynman gives is accurate to 4 places beyond the decimal. If you cube this number, you get 1728.99379.
1) Use the method we have discussed here to approximate
2) Use the method we have discussed here to approximate
__ Ö80Hint: h is negative in this case.
Transcendental functions are ones like sine, cosine, exponential, log, and all the others that cannot be described in terms of simple powers and roots of x. Even though these functions are qualitatively different from the roots we approximated so far, you can still apply the same approximation method to them as well. For example, lets apply the method to finding e1.1.
Step 1: For what x that is near 1.1 do we know
the value of ex? Well we know that
Step 2: What is the derivative of ex? That's an easy one.
f(x) = ex f'(x) = ex
Step 3: What is the value of the derivative at the x where we know the function? Again this is an easy one.
f'(1) = e1 = e » 2.72
Step 4: What is the difference between the x where you know the function's value and the x where you'd like to approximate the function's value?
h = 1.1 - 1 = 0.1
Step 5: Apply the approximation formula.
e1.1 = e(1 + h) » e + hf'(1) » 2.72 + 0.272 = 2.992The actual value of e1.1 is 3.004166.
Step 1: What x that is near 0.75 do I know the cosine of? A little investigation yields that 0.75 is very close to
= 0.7853981... 4
_ Ö2 cos(p/4) =(if you don't remember this, see the trig id table)
= 0.7071057... 2
Step 2: What is the derivative of
f(x) = cos(x)then
f'(x) = -sin(x)
Step 3: What is the value of the the derivative of
_ Ö2 -sin(p/4) = -
= -0.7071057... 2
Step 4: What is the difference between the x that you know the cosine of and the one you want to know the cosine of? That will be your h.
h = 0.75 - 0.7853981 = -0.0353981
Step 5: Apply the approximation formula.
_ Ö2 cos(0.75) = cos(p/4 + h) »The actual cosine of 0.75 is 0.7316888.
+ hf'(p/4) = 0.732137 2
All the approximations we have done so far have come out close. But the method begs some questions. Like, "How close will my approximation be?" and "How close does my x have to be to the number I want to take this function of for the method to work reasonably?" These two questions are not silly details. They probe deeply into what derivatives and continuous functions are all about.
For comparison, let's try the method on a very easy function.
f(x) = 3x + 2which is the function of a straight line with slope of 3 and a y-intercept of 2. We know that
Since you know the method by now and since this is an easy function, we'll take all the steps at once.
f(0) = 2 f'(x) = 3 h = 1 - 0 = 1 f(1) = f(0 + h) » 2 + hf'(0) = 2 + (1 × 3) = 5But indeed,
So what is special about straight-line functions that makes them so susceptible to our method? You could put together some words about how the function is linear and so is the method, and such an explanation would be correct. But another much more concise way to put it is simply, "The method works perfectly on straight-line functions because a straight-line function always has a second derivative of zero."
The second derivative is the key to figuring out how good an approximation the method yields each time. If the derivative of f(x) were constant (which is another way of saying the second derivative is zero), then the method would be infallible. But for most functions we are interested in applying the method to the derivative is not constant.
Let's call the error that the approximation formula is off by
by symbol, x (that's the
Greek letter, xi),
which is the traditional math symbol for an error term.
Suppose we know what f(x) is at
f(c + h) = f(c) + hf'(c) + x eq. 8.4-2You can bound the error term, x, if you know what the second derivative of f(x) is:
1 |x| £where a is some real number that lies somewhere between c and c+h. Although you probably won't have to know the derivation of equation 8.4-3, you might have to know the inequality itself. What it is saying is, pick the point, a, between c and c+h where f"(a) has its greatest magnitude. The error of the approximation will be no worse than half that magnitude times the square of the length of the interval.
|h2f"(a)| eq. 8.4-3 2
How we get equation 8.4-3 is optional material. You can read it by
Worked example: Develop a worst-case error term for when you approximate
the square root of 9.5 using the method introduced in this section
Step 1: Find the second derivative. We know that
_ f(x) = Öx = x1/2 1 1 f'(x) =So applying the power rule to f'(x) you get
= x-1/2 2Öx 2
1 f"(x) = -
Step 2: Where does the second derivative have its maximum magnitude?
This step is sometimes difficult, but not in this case. Observe that as x
increases, the magnitude (that is the absolute value) of f"(x) always
decreases. So the magnitude of f"(x) will be greatest at the lower
end of the interval. In this case the interval runs from
1 1 f"(9) = -
9-3/2 = - 4 108
Step 3: Take the absolute value of half that times the square of the length of the interval.
This is the application of the inequality in
1 1 1 1 1 |x| £And indeed using a calculator I find that the actual error is
|h2 f"(9)| = × × = 2 2 4 108 864
0.973 1 |x| = 0.001126331 =
£ 864 864
No tale about Little Red Riding Hood would be complete without the wolf jumping up out of Grandma's bed and shouting, "All the better to eat you with!" So we pick up the story from there.
Of course Little Red Riding Hood was frightened beyond imagining. But the quick-minded little girl grabbed the phone and ran into the bathroom. Once she had the door locked with the wolf bellowing on the other side, she dialed 911.
"Please help me," she cried. "I'm locked in the bathroom and the wolf is going to eat me."
"Can you see any way to escape?" asked the 911 operator.
"I can see through the window," she replied, still panting with fear. "There's a fire escape out there."
"Now stay calm, little girl," said the operator. "Go out the window and down the fire escape. Then go to the Three Little Pigs' apartment. You'll be safe there. We've got an animal control officer on the way."
"But where do the Three Little Pigs live?" she whimpered.
"They're in the fifteenth building from the corner," was the answer.
Little Red Riding Hood regained her composure. "I know what to do," she said. "It's seventeen steps for each each building. That's 255 steps from the corner, right?"
"Well, not exactly," the operator replied. "The buildings get smaller as you go down the street. After four buildings you start counting only sixteen steps per building."
"I get it," said Little Red Riding Hood. "And after eight buildings I start counting only fifteen steps per building, then at the twelfth building count only fourteen steps per building, right?"
"Well not quite," the operator explained. "You see the rate at which they get smaller increases as you go down the block as well. So in the next four buildings the number of steps per building decreases by two instead of one. That means at the eighth building start counting fifteen steps per building, but after the tenth building start counting only fourteen steps per building. By the twelfth building you are down to only thirteen steps per building."
"Now I get it," said Little Red Riding Hood. "With each four buildings the rate at which the steps per building decreases -- that rate increases by one step, right?"
"Well, almost," droned the operator. "You see the rate of that rate changes as well. And the rate of the rate of the rate isn't constant either..."
Poor Little Red Riding Hood. This was making her head spin. And the wolf was starting to huff and puff just outside the door. She dropped the phone and ran down the fire escape.
With that story in mind, let's play the Name That Function game again.
I'm thinking of a cubic polynomial. At
f(0) = 1 f'(0) = -2 f"(0) = 3 f(3)(0) = -5 table 8.4-1This description of f(x) is the same kind of description that the 911 operator gave Little Riding Hood for the function that finds the Three Little Pigs' apartment building. So is there a way to determine f(x) from this kind of information?
I've already given away that the function I'm thinking of is a cubic polynomial. So it must be in the form of
f(x) = Bx3 + Cx2 + Dx + E eq. 8.4-8You only have to find B, C, D, and E. But you know that when
f(0) = 1 = (0)B + (0)C + (0)D + E = E eq. 8.4-9aSo clearly you have
f'(x) = 3Bx2 + 2Cx + D eq. 8.4-9b f'(0) = -2 = (0)B + (0)C + D = D eq. 8.4-9cIt's just as clear from this that
f"(x) = 6Bx + 2C eq. 8.4-9d f"(0) = 3 = (0)B + 2C = 2C eq. 8.4-9eFrom this you can quickly see that
f(3)(x) = 6B eq. 8.4-9f f(3)(0) = -5 = 6B eq. 8.4-9gAnd from that you should readily see that
5 3 f(x) = -But suppose I had said that it was a 4th degree polynomial with the same values at
x3 + x2 - 2x + 1 eq. 8.4-10 6 2
f(0) = 1 f'(0) = -2 f"(0) = 3 f(3)(0) = -5 f(4)(0) = 7 table 8.4-2Before you were looking for the coefficients of
f(x) = Ax4 + Bx3 + Cx2 + Dx + E eq. 8.4-11If you go through the same procedure as we did for the cubic, you will find that the coefficients, B, C, D, and E are the same for this fourth degree polynomial as they were for the cubic (try it and see why). As you take the higher and higher derivatives you will have found that
f'(x) = 4Ax3 + 3Bx2 + 2Cx + D eq. 8.4-12a f"(x) = 12Ax2 + 6Bx + 2C eq. 8.4-12b f(3)(x) = 24Ax + 6B eq. 8.4-12c f(4)(x) = 24A eq. 8.4-12dSince
7 5 3 f(x) =The point here is that adding the condition that the fourth derivative of the polynomial had to be equal to a particular value at
x4 - x3 + x2 - 2x + 1 eq. 8.4-13 24 6 2
At this moment you might be trying to generalize this last point. And the generalization
is true. For any polynomial function, imposing the condition that the nth
derivative is equal to
a particular value at
The nth derivative of xn is equal to the constant, n!.Recall that n! (that's pronounced "n factorial") means the product of the counting numbers from 1 to n. In equations, the above statement is: If
f(x) = xnthen
f(n)(x) = n!Can you see why? The power rule tells us that
f(n)(x) = n(n-1)(n-2)(n-3) × ... × 3 × 2 × 1 × x0Clearly the product of all those terms ahead of the x is just n!. And you already know that
If the nth derivative of xn is the constant, n!, then the n+1st derivative of xn must be zero. Why? Because the derivative of a constant is always zero.
Now suppose I told you, for example, that the sixth derivative of a polynomial was equal
to 13 at
13 = 6!A6 13 A6 =So the condition that the sixth derivative of a polynomial is equal to 13 at
If you impose the condition that the nth derivative of a polynomial is equal to C at
x = 0, then the coefficient of the nth degree term of the polynomial must be equal to C/n!.
But what if the function you are trying to match is not a polynomial? Can we use what
we learned about derivatives at
Let's begin using the approximation method we started with to find e0.2.
We know that
e0.2 » e0 + he0 = 1.2 eq. 8.4-14The real e0.2 is more like 1.221402758. But you could have chosen any small x rather than 0.2. If you did so then h would be equal to x. You would get for the approximation:
ex » e0 + xe0 = 1 + x eq. 8.4-15Look carefully. This is a first degree polynomial approximation of ex. And although it works pretty well for small x, you can experiment to find that you don't have to make x very large before this approximation fails pretty miserably.
f(0) = P1(0) f'(0) = P1'(0)In other words, at
f"(0) ¹ P"1(0)But ex is the same as its first derivative, its second derivative, its third derivative, and so on. That means that we know that
1 ex » P2(x) = 1 + x +You should be able to see that P2(x) matches ex at
x2 eq. 8.4-16a 2!
1 1 1 ex » Pn(x) = 1 + x +Using sigma notation, the above is the same as
x2 + x3 + ... + xn eq. 8.4-16b 2! 3! n!
n 1 ex » Pn(x) = åremembering that
xk eq. 8.4-16c k=0 k!
So with all that in mind, would it surprise you to learn that
1 1 1 ex = lim Pn(x) = lim 1 + x +In other words, as you add more and more terms to this polynomial, it gets closer and closer to ex. No matter how big an x you choose, you can add enough terms to the polynomial to make it as accurate as you like. In sigma notation the polynomial is
x2 + x3 + ... + xn n > ¥ n > ¥ 2! 3! n!
n 1 ex = lim Pn(x) = lim åBut the more traditional way to write the limit on the right is to drop the limit sign and write
xk eq. 8.4-17a n > ¥ n > ¥ k=0 k!
¥ 1 ex = åWhen you see the ¥ atop the å, it means you are taking the limit as the n that would have been on top goes to infinity.
xk eq. 8.4-17b k=0 k!
Equation 8.4-17b is an example of something called a Maclaurin series.
Click here to see
a brief biography of Maclaurin. If, at
To create a Maclaurin series of a function, you must know the value of all its derivatives
The Maclaurin Formula: In general, if you have a continuous function, f(x), all of whose derivatives are also continuous, and you know or can somehow figure out that
f(0) = A0 f'(0) = A1 f"(0) = A2 f(3)(0) = A3 . . .for every derivative of f(x), then the Maclaurin series is
1 1 1 f(x) = lim A0 + A1x +
or in sigma notation
¥ 1 f(x) = å
In some cases this formula will not work for all x, but it will work for some range of x near zero.
Problem: Find the Maclaurin series for
Step 1: Make a table of the first few derivatives of f(x). This is often the hardest part of problems like this, but in this case sin(x) is a very orderly function with repsect to its derivatives.
f(x) = sin(x) f'(x) = cos(x) f"(x) = -sin(x) f(3)(x) = -cos(x) f(4)(x) = sin(x)
Step 2: Try to discern a pattern as the derivatives go higher. Since the fourth derivative brings sin(x) back to itself, we can expect that the pattern of the first four derivatives will repeat indefinitely for still the higher derivatives.
Step 3: Put x = 0 into the table and evaluate.
f(0) = sin(0) = 0 = A0 f'(0) = cos(0) = 1 = A1 f"(0) = -sin(0) = 0 = A2 f(3)(0) = -cos(0) = -1 = A3 f(4)(0) = sin(0) = 0 = A4Here is where you really have to identify the pattern that the Aj's are making. Clearly whenever the subscript, j, is even, the corresponding Aj is zero. When j is odd, then the Aj is either 1 or -1 depending upon whether j is 1 more than a multiple of 4 or 3 more than a multiple of 4 respectively. That is the pattern of Aj's that will go on forever.
Step 4: Put it all into the Maclaurin formula.
Since the even-power terms will be all zero, we put up only the odd-power terms.
1 1 1 1
sin(x) = lim x -
It might seem at first as if this one would be hard to put into sigma form,
but with a little practice you will learn some tricks that enable you to tackle
more difficult sigma expressions. The trick you use here is that
(-1)n is -1 if n is odd and +1 if
n is even. Also, to get a guaranteed unique odd number from any n
sin(x) = å
Remember in trig identity section we mentioned that sin(x)
is an odd function
Likewise with even functions. For any even function
(that is where
The graph shows the first six Maclaurin approximations to sin(x). That is in green is the first degree polynomial approximation, in brown is the third degree polynomial approximation (has two nonzero terms), and so on out to the black trace, which has six nonzero terms. The actual trace of sin(x) is shown in blue, but for most of the graph the traces of the Maclaurin approximation polynomials are so close that they obscure the blue trace. You can see how the higher degree approximations stay close to sin(x) over a larger range of x. If you added more and more higher degree terms, you would be able to get the Maclaurin approximation to stay near sin(x) over as long an interval as you like.
Since cos(x) is the derivative of sin(x), what would
you expect the Maclaurin series for cos(x) to be? Once you know
the Maclaurin series for sin(x), you don't even have to apply
the Maclaurin formula to find it for cos(x). All you need to do
is take the derivative, term by term, of the Maclaurin series for
sin(x). That is, take the nth power term, reduce that
exponent by 1, and multiply the coefficient by n. In
¥ (-1)k(2k + 1) ¥ (-1)k cos(x) = åAnd remember that cos(x) is an even function.
x2k+1-1 = å x2k eq. 8.4-19c k=0 (2k + 1)! k=0 (2k)! 1 1 1 1 cos(x) = lim 1 - x2 + x4 - x6 + ... ± x2n n > ¥ 2! 4! 6! (2n)!
Find the Maclaurin series (or at least the first four nonzero terms of it) for
1 f(x) =
x + 1
Step 1: Find the derivatives of the function.
Go ahead and find the first three derivatives, f'(x), f"(x), and
f(3)(x). Use the
Step 2: Look for the pattern in the derivatives.
Can you see what's happening as you continue to take higher derivatives
of this function? With each successive derivative you multiply
by the next negative integer and take the next higher power in
the denominator. Based upon that try to come up with a general
expression for f(n)(x). When you think you
Step 3: Evaluate the function and derivatives at
Step 4: Put it all into the Maclaurin formula.
Simply gather up the An's that you came up with in the
preceding step and plug them in. Then make any simplifications that seem
evident. When you are done,
Think carefully about the formula:
= lim 1 - x + x2 - x3 + x4 - ... ± xn x + 1 n > ¥
But let's try this Maclaurin series on a value that it can do, say,
1Pretty close, eh? Try it yourself with, say,
» 0.6660151625 1 + 0.5
1 f(x) =Maclaurin is not going to get it for you. Why? Because Maclaurin requires that you find the function's value at
eq. 8.4-20 x
In the previous paragraphs, though, we did discover that we can find a perfectly serviceable Maclaurin series for
1 f(x) =Suppose you substituted
eq. 8.4-21 x + 1
1 f(x) = f(u + 1) =But the right-hand side of equation 8.4-22 is just the right-hand side of equation 8.4-20 by a different name. And we know how to do a Maclaurin series for that:
eq. 8.4-22 u + 1
1 ¥So what happens when you substitute back
= å (-1)k uk eq. 8.4-23a u + 1 k=0
1 ¥This is called a Taylor series taken around
= å (-1)k (x - 1)k eq. 8.4-23b x k=0
Finding a Taylor series is, in reality, the same thing as finding a Maclaurin series, only
you've shifted the x-axis by some amount (in this case we shifted it by 1).
In general the Taylor formula for finding the series taken around the point,
1 1 f(x) = lim f(a) + f'(a)(x-a) +
or in sigma notation
¥ 1 f(x) = å
But once you know the Maclaurin formula, the recipe for the Taylor formula is easy.
To find the Taylor series around the point,
If learning to find a Maclaurin series were learning to tie your shoes when you
are at home, then finding a Taylor series is no more different than
tying your shoes at school. The two are really the same thing. Indeed a Maclaurin
series is nothing but a Taylor series taken around
Find the first four nonzero terms of the Tayor series for the following functions
(and observe which point you are asked to take the series around).
3) f(x) = Öx
ex + e-x
4) f(x) =
5) f(x) = tan(x)
6) f(x) = arctan(x)
Suppose c is any real number and n is any positive integer. Let
f(x) = (x + c)n
Return to Table of Contents
Move on to Power Tools for Taking Derivatives of Products
email me at email@example.com