DerivRules.mws

Differentiation Rules

>    restart;

>   

Lesson Overview

Evaluation of derivatives using the definition hinges on the ability to evaluate the limit of the difference quotient. This is tedious and time consuming. Even worse, the limits can be extremely difficult to evaluate. The Differentiation Rules are a collection of general rules for computing derivatives formed from polynomials, powers, roots, and constant multiples, sums, differences, products, quotients of these types of functions. Compositions of functions are handled separately, in the Chain Rule lesson.

Be careful to not confuse the Limit Laws and Differentiation Rules. While many are analogous, others are completely different.

The Differentiation  maplet [ Maplet Viewer] [ MapleNet] provides an excellent tool to learn the names of the Differentiation Rules and how they can be applied to evaluate a derivative. The three examples provided in this worksheet should get you started using this tool.

>   

The Differentiation Rules

In general, derivatives can be evaluated by applying the definition as in Examples 1 - 3 in the Precise Definition of the Derivative lesson. The first few rules are fairly simple, almost obvious. But, starting with the Product Rule, the rules are not so obvious and are quite different from the corresponding Limit Laws.

Let f and g be functions that are differentiable at x and let k be a constant.

  MATRIX([[Name,
 Formula, `Extra Conditions`], [___________________, ___________________________
__________________, ____________________________], [Constant, diff(k,x) = 0, non
e], [Identity, diff(x,x) = ...  

Note the conditions listed in the third column. If the conditions for a rule are not satisfied, the rule cannot be used to justify the evaluation of a limit.

Proofs

It is very difficult to give a formal proof of the Differentiation Rules using Maple. In some cases it is possible to give a geometric argument, using a Maple-generated graph, in other cases Maple can be used to identify difference quotients as derivatives. But, care must be exercised to distinguish between a proof and an argument based on "because Maple says so".

Proof of Constant Rule

The Constant Rule can be understood by noting that the graph of a constant function is a horizontal line, i.e., has slope 0.

>    plot( 2.3, x=-3..3, title="Constant functions have slope 0" );

[Maple Plot]

The defintion of the derivative of a constant function is simple to apply. Define the constant function: f(x) = k . Then apply the definition of the derivative and simplify:

  `f'`(x) = Limit((f(x+h)-f(x))/h,h = 0)  

  `` = Limit((k-k)/h,h = 0)          

  `` = Limit(0/h,h = 0)               

  `` = 0                            

>   

Proof of Identity Rule

The Identity Rule can be answered using our knowledge of linear functions. The graph of the function f(x) = x  is the straight line through the origin with slope m = 1  for all x . Thus, `f'`(x) = 1 .

A rigorous proof based on the definition is not difficult either:

  `f'`(x) = Limit((f(x+h)-f(x))/h,h = 0)  

  `` = Limit((x+h-x)/h,h = 0)     

  `` = Limit(h/h,h = 0)                 

  `` = limit(1,h = 0)                 

  `` = 1                             

>   

Proof of Power Rule ( n  a positive integer)

First, note that the Power Rule with n = 1  is the Identity Rule:

  diff(x^`1`,x)  = `1`*x^`1-1`  = x^`0`  = 1

We have also seen (Example 1 in the Precise Definition of the Derivative lesson) that diff(x^3,x) = 3*x^2 , that is the Power Rule holds for n = 3 .

The proof of the Power Rule when n  is a positive integer is based on the patterns observed in

>    for i from 1 to 10 do
  (x+h)^i = expand( (x+h)^i )
end do;

x+h = x+h

(x+h)^2 = x^2+2*x*h+h^2

(x+h)^3 = x^3+3*x^2*h+3*x*h^2+h^3

(x+h)^4 = x^4+4*x^3*h+6*x^2*h^2+4*x*h^3+h^4

(x+h)^5 = x^5+5*x^4*h+10*x^3*h^2+10*x^2*h^3+5*x*h^4+h^5

(x+h)^6 = x^6+6*x^5*h+15*x^4*h^2+20*x^3*h^3+15*x^2*h^4+6*x*h^5+h^6

(x+h)^7 = x^7+7*x^6*h+21*x^5*h^2+35*x^4*h^3+35*x^3*h^4+21*x^2*h^5+7*x*h^6+h^7

(x+h)^8 = x^8+8*x^7*h+28*x^6*h^2+56*x^5*h^3+70*x^4*h^4+56*x^3*h^5+28*x^2*h^6+8*x*h^7+h^8

(x+h)^9 = x^9+9*x^8*h+36*x^7*h^2+84*x^6*h^3+126*x^5*h^4+126*x^4*h^5+84*x^3*h^6+36*x^2*h^7+9*x*h^8+h^9

(x+h)^10 = x^10+10*x^9*h+45*x^8*h^2+120*x^7*h^3+210*x^6*h^4+252*x^5*h^5+210*x^4*h^6+120*x^3*h^7+45*x^2*h^8+10*x*h^9+h^10
(x+h)^10 = x^10+10*x^9*h+45*x^8*h^2+120*x^7*h^3+210*x^6*h^4+252*x^5*h^5+210*x^4*h^6+120*x^3*h^7+45*x^2*h^8+10*x*h^9+h^10

In particular, note that (x+h)^n = x^n+n*h*x^(n-1)+O(h^2) . (We say that g = O(h^p)  when limit(g/(h^p),h = 0)  exists; in particular, g = O(h)  means limit(g,h = 0) = 0 .) From here it is not difficult to obtain

  diff(x^n,x) = limit(((x+h)^n-x^n)/h,h = 0)                                      

  `` = limit((x^n+n*h*x^(n-1)+O(h^2)-x^n)/h,h = 0)  

  `` = limit((n*h*x^(n-1)+O(h^2))/h,h = 0)                   

  `` = limit(n*x^n-1+O(h),h = 0)                             

  `` = n*x^(n-1)                                                   

The Power Rule does hold when the exponent is zero, a negative integer, a rational number, or an irrational number The case for n = 0  is the Constant Rule. The proofs of the remaining cases depend on results that will come later in the course. The first of these, negative integers, is Example 4 in this lesson.

>   

Proof of Constant Multiple Rule

The Constant Multiple Rule should be contemplated prior to proving. Let h = Delta*x  and Delta*y = f(x+h)-f(x)  be the run and rise for f. If F(x) = k*f(x) , then the rise for F will be

  Delta*Y = F(x+h)-F(x)  = k*f(x+h)-k*f(x)  = k*(f(x+h)-f(x))  = k*Delta*y .

Thus, Delta*Y/(Delta*x) = k*Delta*y/(Delta*x)  for all h = Delta*x  > 0 and so

  diff(F(x),x)  = limit(Delta*Y/(Delta*x),Delta*x = 0) = k*limit(Delta*y/(Delta*x),Delta*x = 0)  = k*diff(f(x),x)  

A rigorous proof based on the definition is not difficult either:

  `F'`(x) = Limit((F(x+h)-F(x))/h,h = 0)  

                `` = Limit((k*f(x+h)-k*f(x))/h,h = 0)     

             `` = k*Limit((f(x+h)-f(x))/h,h = 0)  

  `` = k*diff(f(x),x)   

>   

Proof of Sum Rule

The Sum Rule makes intuitive sense. The rate of change of the sum of two functions should be the sum of their rates of change:

  Delta*(y+Y)/(Delta*x) = Delta(y)/(Delta*x)+Delta*Y/(Delta*x)  

To prove the Sum Rule it is necessary to work with f and g as arbitrary differentiable functions:

  diff(f(x)+g(x),x) = limit((f(x+h)+g(x+h)-(f(x)+g(x)))/h,h = 0)  

                                              `` = limit((f(x+h)-f(x))/h,h = 0)+limit((g(x+h)-g(x))/h,h = 0)  

  `` = diff(f(x),x)+diff(g(x),x)        

>   

Proof of Difference Rule

A proof of the Difference Rule can be given in exactly the same form as for the Sum Rule. An alternative is to use both the Constant Multiple and Sum Rules:

To prove the Sum Rule it is necessary to work with f and g as arbitrary differentiable functions:

  diff(f(x)-g(x),x) = diff(f(x)+`(-1)`*g(x),x)  

                                        `` = diff(f(x),x)+diff(`(-1)`*g(x),x)  

                                     `` = diff(f(x),x)+`(-1)`*diff(g(x),x)  

                               `` = diff(f(x),x)-diff(g(x),x)  

>   

Proof of Product Rule

On first thought one might think the Product Rule should simply multiply the derivatives. This is wrong!  A simple example illustrating this fallacy is   F(x) = f(x)*g(x)  with f(x)  = g(x) = x . Then `f'`(x) = `g'`(x)  = 1 but

  `F'`(x) = diff(x^2,x)  = 2*x <> `(1)`*`(1)`  = `f'(x)`*`g'`(x) .

The proof of the Product Rule requires a little extra work to put the difference quotient for the product in a form where derivatives of f and g can be identified. The key is to add and subtract the same quantity in the numerator so that difference quotients for f and g can be isolated in separate pairs of terms.

  diff(f(x)*g(x),x) = limit((f(x+h)*g(x+h)-f(x)*g(x))/h,h = 0)                                                                          

  `` = limit((f(x+h)*g(x+h)-f(x+h)*g(x)+f(x+h)*g(x)-f(x)*g(x))/h,h = 0)  

        `` = limit(f(x+h)*(g(x+h)-g(x))/h,h = 0)+limit((f(x+h)-f(x))*g(x)/h,h = 0)  

                 `` = limit(f(x+h),h = 0)*limit((g(x+h)-g(x))/h,h = 0)+limit((f(x+h)-f(x))/h,h = 0)*g(x)  

  `` = f(x)*diff(g(x),x)+diff(f(x),x)*g(x)                                                            

Note that limit(f(x+h),h = 0) = f(x)  because the assumption that f is differentiable at x  implies f is continuous at x .

>   

Proof of Quotient Rule

The proof of the Quotient Rule is similar to the proof of the Product Rule in that it involves the addition and subtraction of the same quantity from the difference quotient. This quantity is chosen so that difference quotients involving f and g can be identified.

  diff(f(x)/g(x),x) = limit((f(x+h)/g(x+h)-f(x)/g(x))/h,h = 0)                                                                                       

  `` = limit((f(x+h)*g(x)-f(x)*g(x+h))/(h*g(x)*g(x+h)),h = 0)                                                   

  `` = limit((f(x+h)*g(x)-f(x)*g(x)+f(x)*g(x)-f(x)*g(x+h))/(h*g(x)*g(x+h)),h = 0)              

          `` = limit((f(x+h)*g(x)-f(x)*g(x))/(h*g(x)*g(x+h)),h = 0)+limit((f(x)*g(x)-f(x)*g(x+h))/(h*g(x)*g(x+h)),h = 0)  

  `` = limit((f(x+h)-f(x))/(h*g(x+h)),h = 0)+f(x)/g(x)   limit((g(x)-g(x+h))/(h*g(x+h)),h = 0)                    

`` = limit((f(x+h)-f(x))/h,h = 0)/limit(g(x+h),h = 0)-f(x)/g(x)    limit((g(x+h)-g(x))/h,h = 0)/limit(g(x+h),h = 0)                   

  `` = diff(f(x),x)/g(x)-f(x)/g(x)*diff(g(x),x)/g(x)                                                                        

  `` = (diff(f(x),x)*g(x)-f(x)*diff(g(x),x))/(g(x)^2)                                                             

>   

Three Examples

The following three examples demonstrate the use of these derivatives in the evaluation of derivatives. Of the three, only the first example is even remotely reasonable to attempt to evaluate with the definition.

Example 1: Use the Differentiation Rules to evaluate diff(x^3-3*x^2+x+3,x)  

   MATRIX([[`Algebraic Manipulation`, Remarks], [________________________, ________________________], [diff(x^3-3*x^2+x+3,x), `original derivative`], [diff(x^3,x)-diff(3*x^2,x)+diff(x,x)+diff(3,x), `appli...  

That is, diff(x^3-3*x^2+x+3,x) = 3*x^2-6*x+1 .

This result can be verified using Maple's diff  (or Diff ) command:

>    q1 := x^3-3*x^2+x+3:
Diff( q1, x ) = diff( q1, x );

Diff(x^3-3*x^2+x+3,x) = 3*x^2-6*x+1

>   

In addition to following the steps provided in the examples you are encouraged to repeat these examples in the Differentiation  maplet [ Maplet Viewer][ MapleNet]. To specify a problem in the Differentiation  maplet note that the top line of this maplet contains fields for the function and variable. Press the Start  button, then apply the rules of differentiation by clicking the corresponding button in the Differentiation  maplet. The menu bars provide a summary of each known rule ( Rule Definition ), help , and another way to apply rules ( Apply the Rule ). Note that the selected rule is generally applied to the first possible occurrence in the expression; it may be necessary to apply a rule multiple times in succession. (This maplet does not have a Difference rule. Instead, as suggested by the proof, use the Sum and Constant Multiple rules.)

Example 2: Use the Differentiation Rules to evaluate diff((t-1)/(t^2+2),t)  

This derivative will be computed by first applying the Quotient Rule. The remaining derivatives require only the Sum, Difference, Constant, Identity, and Power Rules.

  diff((t-1)/(t^2+2),t) = (diff(t-1,t)*(t^2+2)-(t-1)*diff(t^2+2,t))/((t^2+2)^2)  

  `` = (1*(t^2+2)-(t-1)*2*t)/((t^2+2)^2)                   

  `` = (t^2+2-2*t^2+2*t)/((t^2+2)^2)                           

  `` = (-t^2+2*t+2)/((t^2+2)^2)                                  

This derivative agrees with the one found by Maple:

>    q2 := (t-1)/(t^2+2):
Diff( q2, t ) = diff( q2, t );
`` = simplify( diff(q2,t) );

Diff((t-1)/(t^2+2),t) = 1/(t^2+2)-2*(t-1)/(t^2+2)^2*t

`` = -(t^2-2-2*t)/(t^2+2)^2

>   

Example 3: Use the Differentiation Rules to evaluate diff((x^4+3*x^2+1)^2,x)  

At first glance we do not (yet) have the necessary techniques to evaluate this derivative. But, once we note that this problem can be written as the product of ( x^4+3*x^2+1 ) with itself, it is seen that the Product Rule can be used. (Note that the Differentiation  maplet does not believe the Product Rule can be applied here. The hint suggests that the Chain Rule should be applied. Since we do not yet know the Chain Rule, you will have to follow this example without the use of the Differentiation  maplet.)

  diff((x^4+3*x^2+1)^2,x) = diff((x^4+3*x^2+1)*(x^4+3*x^2+1),x)                                                                    

                                     `` = (x^4+3*x^2+1)*diff(x^4+3*x^2+1,x)+diff(x^4+3*x^2+1,x)*(x^4+3*x^2+1)  

  `` = 2*diff(x^4+3*x^2+1,x)*(x^4+3*x^2+1)                              

  `` = 2*(4*x^3+6*x)*(x^4+3*x^2+1)                                             

  `` = 4*x*(2*x^2+3)*(x^4+3*x^2+1)                                             

Note that an alternate approach to this problem is to compute

  (x^4+3*x^2+1)^2 = x^8+6*x^6+11*x^4+6*x^2+1  

and so

  diff((x^4+3*x^2+1)^2,x) = 8*x^7+36*x^5+44*x^3+12*x  

To cross-check these results, we turn to Maple to help with the algebra. First, the result using the Product Rule can be summarized as

>    q3 := (x^4+3*x^2+1)^2:
Diff( q3, x ) = expand( diff(q3,x) );

Diff((x^4+3*x^2+1)^2,x) = 8*x^7+36*x^5+44*x^3+12*x

The derivative obtained when the function is expanded prior to being differentiated is

>    Diff( q3, x ) = Diff( expand(q3), x );
`` = diff( expand(q3), x );

Diff((x^4+3*x^2+1)^2,x) = Diff(x^8+6*x^6+11*x^4+6*x^2+1,x)

`` = 8*x^7+36*x^5+44*x^3+12*x

This confirms our hand computations and verifies that the two approaches yield the same result.

Note that while expansion was easier for this problem, the Product Rule is easier to apply in most problems involving a power as in this example. An even more efficient method for computing the derivative of a composition of two functions will be addressed in the Chain Rule lesson.

>   

Extending the Power Rule to Negative Integer Exponents

The Quotient Rule can be applied to extend the Power Rule to negative integer exponents. Let n  be a negative integer and u <> 0 . The facts that u^n = 1/(u^(-n))  and -n  is a positive integer provide a way to differentiate u^n  via the Quotient and Power Rules:

  diff(u^n,u) = diff(1/(u^(-n)),u)                                      

  `` = (diff(1,u)*u^(-n)-1*diff(u^(-n),u))/((u^(-n))^2)  

  `` = (-1)*(-n)*u^(-n-1)/(u^(-2*n))               

  `` = n*u^(-n-1+2*n)                      

  `` = n*u^(n-1)                                  

That is, the formula in the Power Rule applies when n  is any integer - positve, zero, or negative.

>   

Lesson Summary

The Differentiation Rules provide the tools necessary to differentiate a function without explicitly evaluating a limit . With these rules it is possible to differentiate any polynomial or rational function. The Product and Quotient Rules are particularly noteworthy because they do not parallel their corresponding Limit Laws. We have already seen that the Power Rule actually applies for any integer.

The ability to recognize and apply appropriate differentiation rules is essential to success in the remainder of this course. You need to be able to compute derivatives with ease, speed, and accuracy.

>   

What's Next?

The Differentiation  maplet [ Maplet Viewer][ MapleNet] should be used to develop your ability to select the appropriate Differentiation Rule for each step in a differentiation problem. Since you are expected to be able to compute derivatives manually you need to be able to apply the rules by hand as well. The online practice problems should be used to improve - and monitor -  your skills before completing the textbook homework assignment and the online homework assignment.

This is the midpoint of Unit 2. Take some time to review the first three lessons. Then, take Quiz 1 for Unit 1.

Our list of Differentiation Rules is not yet complete. The Chain Rule is so important -- and powerful -- that it is discussed in a separate lesson.. Our list of rules will be completed once we learn how about Differentiation of Trigonometric Functions.  Both of these lessons will provide additional experience computing derivatives.

>   

>   

>