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

## Calculus For Dummies, 2nd Edition (2014)

### 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. is a horizontal line with a slope of zero, and thus its derivative is also zero. So, for any number c, if , then . Or you can write . End of story.

The power rule

Say . 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 . 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 with the difference quotient:

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,

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:

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 is a line that fits the form because is the same as (or ). 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 as , then apply the rule: Bring the 1 in front and reduce the power by 1 to zero, giving you . Because equals 1, you’ve got .

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 , rewrite it as and use the power rule. You can also use the power rule to differentiate functions like . Rewrite this as , 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 .

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

Differentiate .

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

One final example: Differentiate .

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

pi, e, c, k, etc. are not variables! Don’t forget that (~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 , — this works exactly like differentiating . And because is just a number, if then — this works exactly like differentiating . You’ll also see problems containing constants like c and k. Be sure to treat them like regular numbers. For example, the derivative of (where k is a constant) is 5, not .

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 if ?

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

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 , then . 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:

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.

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:

(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 . The bottom row works the same way except that both derivatives are negative.

Differentiating exponential and logarithmic functions

Exponential functions

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

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

FIGURE 10-1: The graph of

Pick any point on this function, say , and the height of the function at that point, , 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:

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:

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,

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

The product rule:

So, for ,

The quotient rule

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

The quotient rule:

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 :

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, . Now, if you want the derivative of tan x, you can use the quotient rule:

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 . You use the chain rule here because you’ve got a composite function, that’s one function inside another function (the square root function).

How to spot a composite function: 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 , which is the product of two functions, and sin x, each of which does have just a plain old x as its argument.

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

1. You start with the outside function, , 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 . Okay, now differentiate the same way you’d differentiate . Because is the same as , the power rule gives you . So for this problem, you begin with .

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

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 and its derivative is by the power rule.

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

5. Simplify.

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

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

Let’s try differentiating another composite function, :

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

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

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

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.

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 with the power outside a set of parentheses: .

For example — this is a tough one, gird your loins — differentiate . First, rewrite the cubed sine function: . Now it’s easy to see the order in which the functions are nested. The innermost function is inside the innermost parentheses — that’s . Next, the sine function is inside the next set of parentheses — that’s . Last, the cubing function is on the outside of everything — that’s . (Because I’m a math teacher, I’m honor bound to point out that the stuff in is different from the stuff in . 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 and its derivative is given by the power rule.

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

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

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, . Just treat as if it were the original problem and take its derivative. The derivative of sin x is cos x, so the derivative of begins with . Multiply that by . Thus, the derivative of is

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

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

7. This can be simplified a bit.

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.

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 . The argument of this natural logarithm function is . Don’t touch it during the first step of the solution, which is to use the natural log rule: . 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 , you’ve got . You then finish the problem by multiplying that by the derivative of which is . Final answer after simplifying: .

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, , you first use the natural log rule, then, as a separate step, you use the power rule to differentiate . At no point in any chain rule problem do you use both rules at the same time. For example, with , you do not use the natural log rule and the power rule at the same time to come up with .

Here’s the chain rule mumbo jumbo.

The chain rule (for differentiating a composite function):

Or, equivalently,

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 . 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, . 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):

Mere child’s play.

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

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 . You evaluate — that’s 100; then, after getting , you do , which is about . Finally, you multiply 100 by . Because your lastcomputation is multiplication, your first step in differentiating is to use the product rule. (Had your last computation been instead something like , then you’d begin with the chain rule.) Remember the product rule?

The product rule:

So for ,

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

And now simplify:

Differentiating Implicitly

All the differentiation problems presented in previous sections of this chapter are functions like or . 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 as in , but remember that that’s the same thing as .)

Sometimes, however, you are asked to differentiate an equation that’s not solved for y, like . 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 with the stuff technique? The derivative of sine is cosine, so the derivative of is . You finish the problem by finding the derivative of the stuff, , which is , and then making the substitutions to give you . With implicit differentiation, a y works like the word stuff. Thus, because

The twist is that while the word stuff is temporarily taking the place of some known function of x ( 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 — unlike the stuff and the 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 :

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

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.

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

3. Factor out .

4. Divide for the final answer.

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 is used instead of in every step of solutions like the one above. I find easier and less cumbersome to work with. But 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 . 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.

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

3. Differentiate both sides.

According to the chain rule, the derivative of is , or . (The 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:

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

(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.

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

Figure 10-2 shows a pair of inverse functions, f and g. Recall that inverse functions are symmetrical with respect to the line, . As with any pair of inverse functions, if the point is on one function, is on its inverse. And, because of the symmetry of the graphs, you can see that the slopes at those points are reciprocals: At the slope is and at the slope is . 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 on f can be written as and the slope at this point — and thus the derivative — can be expressed as . The point on g can be written as . Then, because , you can replace the 4s in with giving you . The slope and derivative at this point can be expressed as . These two slopes are reciprocals, so that gives you the equation

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:

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

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:

All polynomial functions like this one eventually go to zero when you differentiate repeatedly. Rational functions like , 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,

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.

﻿