Karl's Calculus Tutor - Box 4.4x: Rules for Derivatives

# Box 4.4x: Summary of Rules for Taking Derivatives

Here it is, boiled down and distilled. These are the basic rules you should know for taking derivatives. Click here to see a table of derivatives of a number of common functions.

Rule 1) The Derivative of any constant is always zero. You can know constants because they do not change with any variable. So if C never changes no matter what x (or any other variable) does, for example, then C is a constant and

```   dC
=  C'(x)  =  0
dx
```
Examples:
• The number, 14, doesn't change no matter what else varies. So the derivative of 14 is zero.
• The value of p doesn't change no matter what else changes, so the derivative of p is always zero.
• If a circle of fixed size has radius, r, then r is constant and the derivative of r is zero.
• If a problem states that such-and-such happens at a constant rate, k, then k is a constant and the derivative of k is zero.

Rule 2) Multiplying a function by a constant multiplies the resulting derivative by that same constant. Remember from rule 1 that a constant is anything that doesn't change its value no matter what the variables do. So if f(x) is a function whose derivative is f'(x), and g(x) = C f(x) where C is a constant, then

```   dg     d(Cf)                 df
=         =  g'(x)  =  C     =  C f'(x)
dx      dx                   dx
```
Examples:
• You know that the derivative of x2 is 2x. Then the derivative of 10x2 is 20x.
• The derivative of sin(x) is cos(x). If r is constant, then the derivative of r sin(x) is r cos(x).
• The derivative of ex is also ex. So the derivative of C ex, where C is constant is again C ex.

Rule 3) The derivative of the sum is the sum of the derivatives. This is the sum rule. In equations this means that if f(x) and g(x) are both functions of x and h(x) = f(x) + g(x) then

```   dh               df   dg
=  h'(x)  =     +     =  f'(x) + g'(x)
dx               dx   dx
```
Examples:
• If f(x) = x2 + 4x, which is a sum, then to find f'(x) you take the derivatives of the two summands, x2 and 4x, separately and take the sum of those derivatives. So f'(x) = 2x + 4.
• The derivative of sin(x) + cos(x) is cos(x) - sin(x).
• The derivative of ex + ln(x) is ex + 1/x.

Rule 4) If you raise x to any constant power, you find the derivative by multiplying x raised to one less than that power by the power itself. This is the power rule. In equations, if you have f(x) = xn, then

```   df
=  f'(x)  =  n xn-1
dx
```
Examples:
• The derivative of x3 is 3x2.
• The derivative of x10 is 10x9.
• Since Öx (that is sqrt(x)) is the same as x1/2, the derivative of Öx is
```   1          1
x-1/2 =
2         2Öx
```
And yes, the power rule applies even when the power is not a whole number. The power can be anything as long as it's constant.

Rule 5) To find the derivative of the product of two functions, take the first times the derivative of the second and add it to the second times the derivative of the first. This is the product rule. In equations, if f(x) and g(x) are both functions of x and h(x) = f(x)g(x) then

```   dh                    dg          df
=  h'(x)  =  f(x)     +  g(x)     =  f(x)g'(x) + g(x)f'(x)
dx                    dx          dx
```
Examples:
• Suppose you have the function
```                  _
f(x) = (x + 3)Öx
```
This is the product of (x + 3) and Öx (that is sqrt(x)). The derivative of (x + 3) is 1, and the derivative of Öx is 1/(2Öx). So
```                      1       _
f'(x)  =  (x + 3)      +  Öx
2Öx
```
• By the same rule, the derivative of sin(x)cos(x) is -sin2(x) + cos2(x). This is because the derivative of sin(x) is cos(x) and the derivative of cos(x) is -sin(x).
• If y(x) = x2ex, then
```   f'(x)  =  x2 ex + 2x ex  =  (x2 + 2x) ex
```

Rule 6) To find the derivative of a quotient or ratio, take the denominator times the derivative of the numerator, subtract from it the numerator times the derivative of the denominator, then divide the whole thing by the square of the denominator. This is the quotient rule. In equations, if f(x) and g(x) are functions of x, and h(x) = f(x)/g(x), then

```   dh               g(x)f'(x) - f(x)g'(x)
=  h'(x)  =
dx                       g2(x)
```
Examples:
• The derivative of
```            (x + 1)
f(x)  =
(x - 1)
```
The derivative of both the numerator and denominator are both 1. So
```             (x - 1) - (x + 1)        -2
f'(x)  =                     =
(x - 1)2           (x - 1)2
```
• If you have
```            x2 + 1
g(x)  =
x3 + 1
```
then
```             (x3 + 1)(2x) - (x2 + 1)(3x2)
g'(x)  =
(x3 + 1)2
```
which you can simplify using algebra if you like.
• Since tan(x) = sin(x)/cos(x), you can use the quotient rule to find the derivative of tan(x):
```   dtan(x)     cos2(x) + sin2(x)        1
=                     =           =  sec2(x)
dx             cos2(x)          cos2(x)
```

Rule 7) Use the chain rule to find the derivative of composites. If f(x) and g(x) are both functions of x, and h(x) = f(g(x)) (which means that you apply h to x by first applying g to x and then applying f to the result), then

```   dh               df dg
=  h'(x)  =         =  f'(g(x)) g'(x)
dx               dg dx
```
This means, apply the derivative of f to g(x) and multiply that by the derivative of g(x).

Examples:

• If
```            ______
f(x) = Ö1 - x2
```
then f is a composite of taking the square root and taking 1 - x2. If all you were doing were taking the square root of a variable, g, then the derivative would be 1/(2Ög) (that is 1/(2 sqrt(g))). But g is not just a variable here, it is a function of x. We know that the derivative of g(x) is -2x. So
```               -2x         -x
f'(x)  =           =
2 Ög(x)     Ö1 - x2
```
• By the same method, the derivative of ex2 is ex2(2x).
• The derivative of
```        _
sin(Öx)
```
is
```        _
cos(Öx)

2Öx
```
• The derivative of sin2(x) is 2 sin(x) cos(x).

Rule 8) If you multiply the independent variable by a constant, then the entire derivative gets multiplied by that same constant. This is an immediate consequence of the chain rule, but it is useful to know because it gives you a short cut. In equations, if f(x) is a function of x and g(x) = f(kx) where k is a constant, then

```   g'(x)  =  k f'(kx)
```
Examples:
• We know from the rule 7 what the derivative of
```    ______
Ö1 - x2
```
is. Applying this rule to that derivative you find that the derivative of
```    __________
Ö1 - (2x)2)
```
is
```         -x
2
Ö1 - (2x)2
```
• If w is a constant, then the derivative of sin(wx) is w cos(wx).

Rule 9) If you add a constant to the independent variable, just treat the sum of the two as if it were the independent variable itself. So if  g(x) = f(x + a),  where a is constant, then

```   g'(x)  =  f'(x + a)
```
Examples:
• We know that  ex  is its own derivative. So according to this rule, if  f(x) = ex+3,  then
```   f'(x)  =  ex+3
```
• You know how to take the derivative of  x3.  So to take the derivative of  f(x) = (x + n)3,  where n is constant, you have
```   f'(x)  =  3(x + n)2
```

Table 4-1
Derivatives of some elementary functions:
```       function                           derivative

1                                   -1
=  x-1                               =  -x-2
x                                   x2

|x|                                 sgn(x)   sgn(x) =  1 if x > 0
sgn(x) = -1 if x < 0

xn                                  nxn-1

_                                   1      1
Öx  =  x1/2                              =    x-1/2
2Öx     2

ex                                  ex

1
ln(x)
x

sin(x)                              cos(x)

cos(x)                              -sin(x)

tan(x)                              sec2(x)  =  1 + tan2(x)

cot(x)                              -csc2(x)  =  -1 - cot2(x)

sec(x)                              sec(x)tan(x)

csc(x)                              -csc(x)cot(x)

1
arcsin(x)
Ö1 - x2

-1
arccos(x)
Ö1 - x2

1
arctan(x)
1 + x2

-1
arccot(x)
1 + x2
```
Note that the phrase, elementary function, does not mean these functions are easy in the sense of, "It's elementary, Watson." It means that these functions comprise the elements for forming more complex functions.

How and when to do implicit differentiation. The chain rule applies to composites even when the function inside the composite is unknown. So, for example, if you only knew that y(x) is a function of x, and you needed to write an expression for the derivative of

```   f(x)  =  y2 - 3y + sin(y)
```
then simply take each term and find its derivative with respect to y, then multiply that by a symbol that indicates the derivative of y. To that end, the symbol, y' does very nicely.
```   f'(x)  =  2y y'  -  3y'  +  cos(y) y'
```
You could factor out a y' and get (2y - 3 + cos(y)) y', but here is an example of why it is better to start out with the y-primes on each term.
```   g(x)  =  xy2 + y cos(x)
```
Observe that to do this one you will have to apply the
product rule twice (once for each product).
```   g'(x)  =  [2xyy' + y2] + [-y sin(x) + y' cos(x) ]
```
Observe that the derivative of each of the products is shown in square brackets so that you can more easily see the organization. But
```   g'(x)  =  2xyy' + y2 - y sin(x) + y' cos(x)
```
would be just as correct. Notice that when you take derivatives of terms that are purely functions of the independent variable, x, you don't need to multiply by x' because x' = dx/dx = 1. You only multiply the terms that depend on y (which is a function of the independent variable, x) by y' because in general y' ¹ 1. For example, in the above you have a term, xy2, to take the derivative of. Since it is a product, you need to apply the product rule. That means the first factor, x, times the derivative of the second factor, 2yy', plus the second factor, y2, times the derivative of the first (and the derivative of x is 1). In this case, when you take the second factor times the derivative of the first, there is no y' because that first factor contains no y.

The equation of x's and y's need not have an f(x) all alone on one side of the equal in order for you to use implicit differentiation. You can have complex expressions of x and y on both sides. Example:

```    _______
Öx2 + y2  =  xy + y3
```
To apply implicit differentiation to this equation, simply bring the appropriate rules for taking derivatives to bear onto each term as you encounter it. Remember to multiply by y' wherever it is appropriate. In this case, you apply the chain rule to the sqrt, the product rule to xy and the power rule to y3:
```   1 2x + 2yy'
=  y + xy' + 3y2y'
2 Öx2 + y2
```

Going implicit with second derivatives: If you have the equation,

```   x3  =  yy'
```
and you wanted to apply implicit differentiation to it, you would use the power rule on the x3 and the product rule on the yy':
```   3x2  =  yy" + (y')2
```
Observe that as part of applying the product rule to yy' you had to take the derivative of y'. And the derivative of y' is its second deriative, y".