Some notes for Quantitative Methods, lecture 8

Note: html isn't very good for typesetting maths. I use the following notation in these notes: x^2 means "x squared", x^3 means "x cubed" and so on. pi means 3.14159..., so that the area of a circle of radius r is written 2 pi r.


Lecture 8:

More about differentiation


The meaning of differentiation

Summary so far:

  1. The definition of the derivative of a function f(x) is

        ****************************************
        *      df          f(x + h) - f(x)     *
        *      -- =  lim   ---------------     *
        *      dx   h -> 0        h            *
        ****************************************
    

  2. If f(x) = x^m (m can be any number: positive, negative, fractional...) then

                   **********************
                   *      m             *
                   *  d  x       m-1    *
                   *  --    =  mx       *
                   *  dx                *
                   **********************
    

So much for definitions. What does differentiating a function actually mean?

The short answer is that when you differentiate a function f(x), you get a new function of x, written df/dx, which gives the slope or gradient of the function at point x.

Note that
if df/dx > 0 then f(x) increases as x increases (the function goes up);
if df/dx < 0 then f(x) decreases as x increases (the function goes down);
if df/dx = 0 then f(x) is horizontal at that point.

Two examples were given in the lecture and the pictures are included here. Here is the graph of a function:

Starting at the left-hand side, f(x) increases as x increases, so df/dx is positive (i.e. it is above the x-axis). At approximately x = 0, it turns around, so df/dx = 0 here; then it starts decreasing with increasing x, so df/dx is negative. At about x = 5, it again turns around, so df/dx = 0 once more, and after that, f increases with x, so df/dx is once more positive. The actual graph of df/dx is shown below:

Here's one you can try yourself; if f(x) is like this:

what does the graph of df/dx look like? The answer is:

The `sum rule' for differentiation

There are altogether four rules we need for differentiation and this is the first of them. We first of all state the rule:

If u(x) and v(x) are given functions of x, and a and b are constants, then if

y = a u(x) + b v(x)

then

dy     du     dv
-- = a -- + b --
dx     dx     dx

You may think this is obvious. It is also quite easy to prove, using just the definition of differentiation given at the top of the notes for this lecture.

Proof If y = a u(x) + b v(x) then, by definition,

dy    lim   a u(x+h) + b v(x+h) - [a u(x) + b v(x)]
-- = h -> 0 ---------------------------------------
dx                          h


      lim   a u(x+h) - a u(x) + b v(x+h) - b v(x)
   = h -> 0 -------------------------------------
                            h

      lim     u(x+h) - u(x)     v(x+h) - v(x)
   = h -> 0 a ------------- + b -------------
                     h                 h

       du     dv
   = a -- + b --
       dx     dx

The tangent to a curve

The definition of the tangent to a curve is

The tangent to a curve y = f(x) at the point x, is the straight line that touches the curve at x, and has the same gradient as the curve at that point.

Worked example

We now use the sum rule, and the definition of the tangent, to calculate the equation of the tangent to the curve y = f(x) = 2 x^2 + 3 x at the point x = 1.

The definition says the tangent is a straight line; you should recall that it must therefore have the equation y = m x + c; the problem is to find m and c.

Remember that m is the gradient of the straight line; and that df/dx is the gradient of the curve. Using the sum rule, and the rule for differentiating x^m, we get

df    d    2
-- = -- 2 x  + 3 x = 4 x + 3
dx   dx
and so at x = 1, the slope of f(x) is 4 + 3 = 7. Hence, the tangent slope m = 7.

What about c? Well, we also know that the tangent must touch the curve at the point x = 1, and so y = 2*1 + 3*1 = 5. Hence, y = m x + c becomes

5 = 7 * 1 + c = 7 + c
giving c = -2. Therefore, the tangent is the line y = 7x - 2. The curve, and this tangent, are plotted below.

The product rule for differentiation

This is the second differentiation rule that we need. It is

If u(x) and v(x) are given functions of x, and if

y = u(x) v(x)

[that is, y is u(x) multiplied by v(x)] then

dy     du     dv
-- = v -- + u --
dx     dx     dx

This is a bit harder to prove, but again we need only to use the definition of differentiation.

Proof If y = u(x) v(x) then, by definition,

dy    lim   u(x+h) v(x+h) - u(x) v(x)
-- = h -> 0 ------------------------
dx                     h


      lim   u(x+h) v(x+h) - u(x) v(x+h) + u(x) v(x+h) - u(x) v(x)
   = h -> 0 -----------------------------------------------------
                                      h

Note that we have added, and then subtracted u(x) v(x+h), the middle two terms, leaving the expression the same.


      lim          u(x+h) - u(x)        v(x+h) - v(x)
   = h -> 0 v(x+h) ------------- + u(x) -------------
                        h                    h

       du     dv
   = v -- + u --
       dx     dx

Worked example If y = (1+x)(3+2x), find dy/dx.

Let u = 1+x and v = 3+2x; then

dy     du     dv
-- = v -- + u -- = (3+2x)*1 + (1+x)*2 = 3 + 2x + 2 + 2x = 5 + 4x.
dx     dx     dx
We could veriify this by multiplying out the brackets and differentiating each term.


Back to index.

Any constructive comments? E-mail me: J.Deane@ee.surrey.ac.uk


J.Deane@ee.surrey.ac.uk
February 2001