Differentiation Rules - Yeah, Man, It Rules - Differentiation - Calculus For Dummies

Calculus For Dummies, 2nd Edition (2014)

Part IV. Differentiation

Chapter 10. Differentiation Rules - Yeah, Man, It Rules

IN THIS CHAPTER

Learning the rules whether you like it or not — sorry, buddy, but those are the rules

Mastering the basic differentiation rules and graduating to expert rules

Figuring out implicit differentiation

Using logarithms in differentiation

Differentiating inverse functions

Chapter 9 gives you the basic idea of what a derivative is — it’s just a rate like speed and it’s simply the slope of a function. It’s important that you have a solid, intuitive grasp of these fundamental ideas.

You also now know the mathematical foundation of the derivative and its technical definition involving the limit of the difference quotient. Now, I’m going to be forever banned from the Royal Order of Pythagoras for saying this, but, to be perfectly candid, you can basically forget that limit stuff — except that you need to know it for your final — because in this chapter I give you shortcut techniques for finding derivatives that avoid the difficulties of limits and the difference quotient.

Some of this material is unavoidably dry. If you have trouble staying awake while slogging through these rules, look back to the last chapter and take a peek at the next three chapters to see why you should care about mastering these differentiation rules. Countless problems in business, economics, medicine, engineering, and physics, as well as other disciplines, deal with how fast a function is rising or falling, and that’s what a derivative tells us. And it’s often important to know where a function is rising or falling the fastest (the largest and smallest slopes) and where its peaks and valleys are (where the slope is zero). Before you can do these interesting problems, you’ve got to learn how to find derivatives. If Chapters 11, 12, and 13 are like playing the piano, then this chapter is like learning your scales — it’s dull, but you’ve got to do it. You may want to order up a latte with an extra shot.

Basic Differentiation Rules

Calculus can be difficult, but you’d never know it judging by this section alone. Learning these first half dozen or so rules is a snap. If you get tired of this easy stuff, however, I promise plenty of challenges in the next section.

The constant rule

This is simple. images is a horizontal line with a slope of zero, and thus its derivative is also zero. So, for any number c, if images, then images. Or you can write images. End of story.

The power rule

Say images. To find its derivative, take the power, 5, bring it in front of the x, and then reduce the power by 1 (in this example, the power becomes a 4). That gives you images. To repeat, bring the power in front, then reduce the power by 1. That’s all there is to it.

In Chapter 9, I differentiated images with the difference quotient:

images

That takes some doing. Instead of all that, just use the power rule: Bring the 2 in front, reduce the power by 1, which leaves you with a power of 1 that you can drop (because a power of 1 does nothing). Thus,

images

Because this is so simple, you may be wondering why we didn’t skip the complicated difference quotient stuff and just go straight to the shortcut method. Well, admittedly, that would have saved some time, especially considering the fact that once you know this and other shortcut methods, you’ll never need the difference quotient again — except for your final exam. But the difference quotient is included in every calculus book and course because it gives you a fuller, richer understanding of calculus and its foundations — think of it as a mathematical character builder. Or because math teachers are sadists. You be the judge.

The power rule works for any power: a positive, a negative, or a fraction:

images

warning The derivative of x is 1. Make sure you remember how to do the derivative of the last function in the above list. It’s the simplest of these functions, yet the easiest one to miss.

The best way to understand this derivative is to realize that images is a line that fits the form images because images is the same as images (or images). The slope (m) of this line is 1, so the derivative equals 1. Or you can just memorize that the derivative of x is 1. But if you forget both of these ideas, you can always use the power rule. Rewrite images as images, then apply the rule: Bring the 1 in front and reduce the power by 1 to zero, giving you images. Because images equals 1, you’ve got images.

tip Rewrite functions so you can use the power rule. You can differentiate radical functions by rewriting them as power functions and then using the power rule. For example, if images, rewrite it as imagesand use the power rule. You can also use the power rule to differentiate functions like images. Rewrite this as images, then use the power rule.

The constant multiple rule

What if the function you’re differentiating begins with a coefficient? Makes no difference. A coefficient has no effect on the process of differentiation. You just ignore it and differentiate according to the appropriate rule. The coefficient stays where it is until the final step when you simplify your answer by multiplying by the coefficient.

Differentiate images.

Solution: You know by the power rule that the derivative of images is images, so the derivative of images is images. The 4 just sits there doing nothing. Then, as a final step, you simplify: images equals images. So images. (By the way, most people just bring the 3 to the front, like this: images, which gives you the same result.)

Differentiate images.

Solution: This is a line of the form images with images, so the slope is 5, and thus the derivative is 5: images. (It’s important to think graphically like this from time to time.) But you can also solve the problem with the power rule: images; so images.

One final example: Differentiate images.

Solution: The coefficient here is images. So, because images (by the power rule), images.

warning pi, e, c, k, etc. are not variables! Don’t forget that images (~3.14) and e (~2.72) are numbers, not variables, so they behave like ordinary numbers. Constants in problems, like c and k also behave like ordinary numbers. (By the way, the number e, named for the great mathematician Leonhard Euler, is perhaps the most important number in all of mathematics, but I don’t get into that here.)

Thus, if images, images — this works exactly like differentiating images. And because images is just a number, if images then images — this works exactly like differentiating images. You’ll also see problems containing constants like c and k. Be sure to treat them like regular numbers. For example, the derivative of images (where k is a constant) is 5, not images.

The sum rule — hey, that’s some rule you got there

When you want the derivative of a sum of terms, take the derivative of each term separately.

What’s images if images?

Solution: Just use the power rule for each of the first four terms and the constant rule for the final term. Thus, images.

The difference rule — it makes no difference

If you’ve got a difference (that’s subtraction) instead of a sum, it makes no difference. You still differentiate each term separately. Thus, if images, then images. The addition and subtraction signs are unaffected by the differentiation.

Differentiating trig functions

Ladies and gentlemen: I have the high honor and distinct privilege of introducing you to the derivatives of the six trig functions:

images

Make sure you memorize the derivatives of sine and cosine. They’re a snap, and I’ve never known anyone to forget them. If you’re good at rote memorization, memorize the other four as well. Or, if you’re not wild about memorization or are afraid that this knowledge will crowd out the date of the Battle of Hastings (1066) — which is much more likely to come up in a board game than trig derivatives — you can figure out the last four derivatives from scratch by using the quotient rule (see the section “The quotient rule” later on). A third option is to use the following mnemonic trick.

tip Psst, what’s the derivative of cosecant? Imagine you’re taking a test and can’t remember those four last trig derivatives. You lean over to the guy next to you and whisper, “Psst, what’s the derivative of csc x?” Now, the last three letters of psst (sst) are the initial letters of sec, sec, tan. Write these three down, and below them write their cofunctions: csc, csc, cot. Put a negative sign on the csc in the middle. Finally, add arrows like in the following diagram:

images

(This may seem complicated, but, take my word for it, you’ll remember the word psst, and after that the diagram is very easy to remember.)

Look at the top row. The sec on the left has an arrow pointing to sec tan — so the derivative of sec x is sec x tan x. The tan on the right has an arrow pointing to sec sec, so the derivative of tan x is images. The bottom row works the same way except that both derivatives are negative.

Differentiating exponential and logarithmic functions

Caution: Memorization ahead.

Exponential functions

If you can’t memorize the next rule, hang up your calculator.

images

That’s right — break out the smelling salts — the derivative of images is itself! This is a special function: images and its multiples, like images, are the only functions that are their own derivatives. Think about what this means. Look at the graph of images in Figure 10-1.

image

FIGURE 10-1: The graph of images

Pick any point on this function, say image, and the height of the function at that point, images, is the same as the slope at that point.

If the base is a number other than e, you have to tweak the derivative by multiplying it by the natural log of the base:

images

Logarithmic functions

And now — what you’ve all been waiting for — the derivatives of logarithmic functions. (See Chapter 4 if you want to brush up on logs.) Here’s the derivative of the natural log — that’s the log with base e:

images

If the log base is a number other than e, you tweak this derivative — like with exponential functions — except that you divide by the natural log of the base instead of multiplying. Thus,

images

images

Differentiation Rules for Experts — Oh, Yeah, I’m a Calculus Wonk

Now that you’ve totally mastered all the basic rules, take a breather and rest on your laurels for a minute… . Okay, ready for a challenge? The following rules, especially the chain rule, can be tough. But you know what they say: “No pain, no gain,” “No guts, no glory,” yada, yada, yada.

The product rule

You use this rule for — hold on to your hat — the product of two functions like

images

mathrules The product rule:

images

So, for images,

images

The quotient rule

I have a feeling that you can guess what this rule is for — the quotient of two functions like

images

mathrules The quotient rule:

images

Just about every calculus book I’ve ever seen gives this rule in a slightly different form that’s harder to remember. And some books give a “mnemonic” involving the words lodeehi and hideelo or hodeehi and hideeho, which is very easy to get mixed up — great, thanks a lot.

Memorize the quotient rule the way I’ve written it. You’ll have no problem remembering what goes in the denominator — no one ever forgets it. The trick is knowing the order of the terms in the numerator. Think of it like this: You’re doing a derivative, so the first thing you do is to take a derivative. And is it more natural to begin at the top or the bottom of a fraction? The top, of course. So the quotient rule begins with the derivative of the top. If you remember that, the rest of the numerator is almost automatic. (Note that the product rule begins with the derivative of the first function you read as you read the product of two functions from left to right. In the same way, the quotient rule begins with the derivative of the first function you read as you read the quotient of two functions from top to bottom.) Focus on these points and you’ll remember the quotient rule ten years from now — oh, sure.

So here’s the derivative of images:

images

In the “Differentiating trig functions” section, I promised to show you how to find the derivatives of four trig functions — tangent, cotangent, secant, and cosecant — with the quotient rule. I’m a man of my word, so here goes. All four of these functions can be written in terms of sine and cosine, right? (See Chapter 6.) For instance, images. Now, if you want the derivative of tan x, you can use the quotient rule:

images

Granted, this is quite a bit of work compared to just memorizing the answer or using the mnemonic device presented several pages back, but it’s nice to know that you can get the answer this way as a last resort. The other three functions are no harder. Give them a try.

The chain rule

The chain rule is by far the trickiest derivative rule, but it’s not really that bad if you carefully focus on a few important points. Let’s begin by differentiating images. You use the chain rule here because you’ve got a composite function, that’s one function images inside another function (the square root function).

tip How to spot a composite function: images is not a composite function because the argument of the square root function — that’s the thing you take the square root of — is simply x. Whenever the argument of a function is anything other than a plain old x, you’ve got a composite function. Be careful to distinguish a composite function from something like images, which is the product of two functions, images and sin x, each of which does have just a plain old x as its argument.

Okay, so you’ve got this composite function, images. Here’s how to differentiate it with the chain rule:

1. You start with the outside function, images, and differentiate that, IGNORING what’s inside. To make sure you ignore the inside, temporarily replace the inside function with the word stuff.

So you’ve got images. Okay, now differentiate images the same way you’d differentiate images. Because images is the same as images, the power rule gives you images. So for this problem, you begin with images.

2. Multiply the result from Step 1 by the derivative of the inside function, images.

images

Take a good look at this. All chain rule problems follow this basic idea. You do the derivative rule for the outside function, ignoring the inside stuff, then multiply that by the derivative of the stuff.

3. Differentiate the inside stuff.

The inside stuff in this problem is images and its derivative is images by the power rule.

4. Now put the real stuff and its derivative back where they belong.

images

5. Simplify.

images

Or, if you’ve got something against negative powers, images.

Or, if you’ve got something against fraction powers, images.

Let’s try differentiating another composite function, images:

1. The outside function is the sine function, so you start there, taking the derivative of sine and ignoring the inside stuff, images. The derivative of sin x is cos x, so for this problem, you begin with

images

2. Multiply the derivative of the outside function by the derivative of the stuff.

images

3. The stuff in this problem is images, so images is 2x. When you plug these terms back in, you get

images

Sometimes figuring out which function is inside which can be a bit tricky — especially when a function is inside another and then both of them are inside a third function (you can have four or more nested functions, but three is probably the most you’ll see). Here’s a tip.

tip Parentheses are your friend. For chain rule problems, rewrite a composite function with a set of parentheses around each inside function, and rewrite trig functions like images with the power outside a set of parentheses: images.

For example — this is a tough one, gird your loins — differentiate images. First, rewrite the cubed sine function: images. Now it’s easy to see the order in which the functions are nested. The innermost function is inside the innermost parentheses — that’s images. Next, the sine function is inside the next set of parentheses — that’s images. Last, the cubing function is on the outside of everything — that’s images. (Because I’m a math teacher, I’m honor bound to point out that the stuff in images is different from the stuff in images. It’s quite unmathematical of me to use the same term to refer to different things, but don’t sweat it. I’m just using the term stuff to refer to whatever is inside any function.) Okay, now that you know the order of the functions, you can differentiate from outside in:

1. The outermost function is images and its derivative is given by the power rule.

images

2. As with all chain rule problems, you multiply that by images.

images

3. Now put the stuff, images, back where it belongs.

images

4. Use the chain rule again.

You can’t finish this problem quickly by just taking a simple derivative because you have to differentiate another composite function, images. Just treat images as if it were the original problem and take its derivative. The derivative of sin x is cos x, so the derivative of images begins with images. Multiply that by images. Thus, the derivative of images is

images

5. The stuff for this step is images and its derivative is images. Plug those things back in.

images

6. Now that you’ve got the derivative of images, plug this result into the result from Step 3, giving you the whole enchilada.

images

7. This can be simplified a bit.

images

I told you it was a tough one.

It may have occurred to you that you can save some time by not switching to the word stuff and then switching back. That’s true, but some people like to use the technique because it forces them to leave the stuff alone during each step of a problem. That’s the critical point.

warning Make sure you … DON’T TOUCH THE STUFF.

As long as you remember this, you don’t need to actually use the word stuff when doing a chain rule problem. You’ve just got to be sure you don’t change the inside function while differentiating the outside function. Say you want to differentiate images. The argument of this natural logarithm function is images. Don’t touch it during the first step of the solution, which is to use the natural log rule: images. This rule tells you to put the argument of the function in the denominator under the number 1. So, after the first step in differentiating images, you’ve got images. You then finish the problem by multiplying that by the derivative of images which is images. Final answer after simplifying: images.

tip With the chain rule, don’t use two derivative rules at the same time. Another way to make sure you’ve got the chain rule straight is to remember that you never use more than one derivative rule at a time.

In the preceding example, images, you first use the natural log rule, then, as a separate step, you use the power rule to differentiate images. At no point in any chain rule problem do you use both rules at the same time. For example, with images, you do not use the natural log rule and the power rule at the same time to come up with images.

Here’s the chain rule mumbo jumbo.

mathrules The chain rule (for differentiating a composite function):

images

Or, equivalently,

images

See the sidebar, “Why the chain rule works,” for a plain-English explanation of this mumbo jumbo.

WHY THE CHAIN RULE WORKS

You wouldn’t know it from the difficult math in this section or the fancy chain rule mumbo jumbo, but the chain rule is based on a very simple idea. Say one person is walking, another jogging, and a third is riding a bike. If the biker goes four times as fast as the jogger, and the jogger goes twice as fast as the walker, then the biker goes 4 times 2, or 8 times as fast as the walker, right? That’s the chain rule in a nutshell — you just multiply the relative rates.

Remember Figure 9-5 showing Laurel and Hardy on a teeter-totter? Recall that for every inch Hardy goes down, Laurel goes up 2 inches. So, Laurel’s rate of movement is twice Hardy’s rate, and therefore images. Now imagine that Laurel has one of those party favors in his mouth (the kind that unrolls as you blow into it) and that for every inch he goes up, he blows the noisemaker out 3 inches. The rate of movement of the noisemaker (N) is thus 3 times Laurel’s rate of movement. In calculus symbols, images. So, how fast is the noisemaker moving compared to Hardy? This is just common sense. The noisemaker is moving 3 times as fast as Laurel, and Laurel is moving 2 times as fast as Hardy, so the noisemaker is moving 3 times 2, or 6 times as fast as Hardy. Here it is in symbols (note that this is the same as the formal definition of the chain rule next to the Mumbo Jumbo icon):

images

Mere child’s play.

One final example and one last tip. Differentiate images. This problem has a new twist — it involves the chain rule and the product rule. How should you begin?

tip Where do I begin? If you’re not sure where to begin differentiating a complex expression, imagine plugging a number into x and then evaluating the expression on your calculator one step at a time. Your lastcomputation tells you the first thing to do.

Say you plug the number 5 into the xs in images. You evaluate images — that’s 100; then, after getting images, you do images, which is about images. Finally, you multiply 100 by images. Because your lastcomputation is multiplication, your first step in differentiating is to use the product rule. (Had your last computation been instead something like images, then you’d begin with the chain rule.) Remember the product rule?

remember The product rule:

images

So for images,

images

You finish the problem by taking the derivative of images with the power rule and the derivative of images with the chain rule:

images

And now simplify:

images

Differentiating Implicitly

All the differentiation problems presented in previous sections of this chapter are functions like images or images. In such cases, y is written explicitly as a function of x. This means that the equation is solved for y; in other words, y is by itself on one side of the equation. (Note that y was sometimes written as images as in images, but remember that that’s the same thing as images.)

Sometimes, however, you are asked to differentiate an equation that’s not solved for y, like images. This equation defines y implicitly as a function of x, and you can’t write it as an explicit function because it can’t be solved for y. For such a problem, you need implicit differentiation. When differentiating implicitly, all the derivative rules work the same, with one exception: When you differentiate a term with a y in it, you use the chain rule with a little twist.

Remember using the chain rule to differentiate something like images with the stuff technique? The derivative of sine is cosine, so the derivative of images is images. You finish the problem by finding the derivative of the stuff, images, which is images, and then making the substitutions to give you images. With implicit differentiation, a y works like the word stuff. Thus, because

images

The twist is that while the word stuff is temporarily taking the place of some known function of x (images in this example), y is some unknown function of x (you don’t know what the y equals in terms of x). And because you don’t know what y equals, the y and the images — unlike the stuff and the images must remain in the final answer. But the concept is exactly the same, and you treat y just like the stuff. You just can’t make the switch back to xs at the end of the problem like you can with a regular chain rule problem.

I suppose you’re wondering whether I’m ever going to get around to actually doing the problem. Here goes. Again, differentiate images:

1. Differentiate each term on both sides of the equation.

images

For the first and fourth terms, you use the power rule and, because these terms contain ys, you also use the chain rule. For the second term, you use the regular power rule. And for the third term, you use the regular sine rule.

images

2. Collect all terms containing a images on the left side of the equation and all other terms on the right side.

images

3. Factor out images.

images

4. Divide for the final answer.

images

Note that this derivative, unlike the others you’ve done so far, is expressed in terms of x and y instead of just x. So, if you want to evaluate the derivative to get the slope at a particular point, you need to have values for both xand y to plug into the derivative.

Also note that in many textbooks, the symbol images is used instead of images in every step of solutions like the one above. I find images easier and less cumbersome to work with. But images does have the advantage of reminding you that you’re finding the derivative of y with respect to x. Either way is fine. Take your pick.

Getting into the Rhythm with Logarithmic Differentiation

Say you want to differentiate images. Now, you could multiply the whole thing out and then differentiate, but that would be a huge pain. Or you could use the product rule a few times, but that would also be too tedious and time-consuming. The better way is to use logarithmic differentiation:

1. Take the natural log of both sides.

images

2. Now use the property for the log of a product, which you remember of course (if not, see Chapter 4).

images

3. Differentiate both sides.

According to the chain rule, the derivative of images is images, or images. (The images works just like the word stuff in a regular chain rule problem or a y in an implicit differentiation problem.) For each of the four terms on the right side of the equation, you use the chain rule:

images

4. Multiply both sides by images and you’re done.

images

(Note: Make sure you read this monster equation correctly. The right side of the first line gets multiplied by the second line.)

Granted, this answer is pretty hairy, and the solution process isn’t exactly a walk in the park, but, take my word for it, this method is much easier than the other alternatives.

Differentiating Inverse Functions

There’s a difficult-looking formula involving the derivatives of inverse functions, but before we get to it, look at Figure 10-2, which nicely sums up the whole idea.

image

FIGURE 10-2: The graphs of inverse functions, images and images

Figure 10-2 shows a pair of inverse functions, f and g. Recall that inverse functions are symmetrical with respect to the line, images. As with any pair of inverse functions, if the point image is on one function, image is on its inverse. And, because of the symmetry of the graphs, you can see that the slopes at those points are reciprocals: At image the slope is images and at image the slope is images. That’s how the idea works graphically, and if you’re with me so far, you’ve got it down at least visually.

The algebraic explanation is a bit trickier, however. The point image on f can be written as image and the slope at this point — and thus the derivative — can be expressed as images. The point image on g can be written as image. Then, because images, you can replace the 4s in image with images giving you image. The slope and derivative at this point can be expressed as images. These two slopes are reciprocals, so that gives you the equation

images

This difficult equation expresses nothing more and nothing less than the two triangles on the two functions in Figure 10-2.

Using x instead of 10 gives you the general formula:

mathrules The derivative of an inverse function: If f and g are inverse functions, then

images

In words, this formula says that the derivative of a function, f, with respect to x, is the reciprocal of the derivative of its inverse function with respect to f.

Okay, so maybe it was a lot trickier.

Scaling the Heights of Higher Order Derivatives

Finding a second, third, fourth, or higher derivative is incredibly simple. The second derivative of a function is just the derivative of its first derivative. The third derivative is the derivative of the second derivative, the fourth derivative is the derivative of the third, and so on. For example, here’s a function and its first, second, third, and subsequent derivatives. In this example, all the derivatives are obtained by the power rule:

images

All polynomial functions like this one eventually go to zero when you differentiate repeatedly. Rational functions like images, on the other hand, get messier and messier as you take higher and higher derivatives. And the higher derivatives of sine and cosine are cyclical. For example,

images

The cycle repeats indefinitely with every multiple of four.

In Chapters 11 and 12, I show you several uses of higher derivatives — mainly second derivatives. (Here’s a sneak preview: The first derivative of position is velocity, and the second derivative of position is acceleration.) But for now, let me give you just one of the main ideas in a nutshell. A first derivative, as you know, tells you how fast a function is changing — how fast it’s going up or down — that’s its slope. A second derivative tells you how fast the first derivative is changing — or, in other words, how fast the slope is changing. A third derivative tells you how fast the second derivative is changing, which tells you how fast the rate of change of the slope is changing. If you’re getting a bit lost here, don’t worry about it — I’m getting lost myself. It gets increasingly difficult to get a handle on what higher derivatives tell you as you go past the second derivative, because you start getting into a rate of change of a rate of change of a rate of change, and so on.