Some notes for Quantitative Methods, lecture 10

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 10:

An application of differentiation: maxima and minima


The following is an attempt to draw the graph of a function y(x)


      ^ y
      |
      | y'>0  | y'<0 | y'>0 .
      |       |      |    .
      |      .|.     |   .
      |     . |  .   |  .
------|-------|------|------------------>
      |    .  |    . | .               x 
      |   .   |     .|.
      |  .    |      |
      |.      x1     x2
      |

Note that the slope, or derivative, of the function, abbreviated to y' on the figure, is positive on the left, negative in the middle, and positive again on the right. Actually at the two vertical lines (corresponding to x = x1 and x = x2), y' = 0, and so the graph has stationary points (i.e. points at which it goes niether up nor down) there.

This lecture is all about how we find these stationary points and determine mathematically whether they are maxima (MAX) or minima (MIN), or a third type of stationary point called a point of inflection.

Let us look at a worked example.

Example: find the stationary points of the function

y = x3 - 6 x2 + 9 x - 1

and determine whether each one is a maximum or a minimum.


Solution

The stationary points are the values of x at which dy/dx = 0. Hence, differentiating y, we have

dy/dx = 3x2 - 12 x + 9 = 0

This is a quadratic equation, which we can solve for x; note first that we can divide by 3 to get

x2 - 4 x + 3 = 0

and the quadratic formula gives

               4 +/- sqrt(16 - 12)
           x = ------------------- = 2 +/- 1 = 1, 3.
                       2
Hence the function has stationary points at x = 1 and x = 3. Are they maxima or minima?

To answer this, look at the picture above again. The stationary point at x = x1 is a maximum. Note that dy/dx > 0 to the left of it, and dy/dx < 0 to the right. That is dy/dx decreases as x increases. In other words, the derivative of dy/dx is negative at a maximum. The derivative of dy/dx is called the second derivative of y, written d2y/dx2, and calculated by differentiating dy/dx:


 2          2
d y    d  (x  - 4 x + 3) = 2 x - 4
--- = --
  2   dx
dx 

Now, at x = 1, d2y/dx2 = 2 - 4 = -2 < 0; so x = 1 is a maximum. The reverse of this applies at a minimum; hence, at x = 3, d2y/dx2 = 6 - 4 = +2 > 0; so x = 3 is a minimum.

To confirm this, look at the plot of y(x) below.





There is one other case we need to consider. Let us use

y = (1/3) x3 - x2 + x

as an example. Find the stationary point(s) by differentiating, as before:

dy/dx = x2 - 2 x + 1 = (x - 1)2

Hence, there is only one point at which dy/dx = 0; it is at x = 1. Is this a maximum or a minimum? Differentiate again:


 2          2
d y    d  (x  - 2 x + 1) = 2 x - 2
--- = --
  2   dx
dx 

and at x = 1, this is 0. This is neither positive nor negative! In fact, x = 1 is neither a maximum nor a minimum; it is instead what is known as a point of inflection, which is a point where the slope of the graph is zero, but which is neither a maximum nor a minimum. A plot of this y(x) should make clear what happens at x = 1:




Summary

To find and classify the stationary points of y(x):

find the values of x such that dy/dx = 0; then find d2y/dx2 at each of these values of x.




Some examples

  1. A window consists of a semicircular arch of radius x, on top of a rectangle of height h. Find the maximum area it can have, subject to the constraint that the perimeter is 10m.
    
                  ..
               .      .
            .            .
          .                .
         .                  .
        .      x       x     .
        .----------*---------.
        |                    |
        |                    |
        |                    |
        |                    |
        |                    |
        |                    | h
        |                    |
        |                    |
        |                    |
        |                    |
        |                    |
        |                    |
        ----------------------
                  2x
    
    
    The area, A, is the area of the rectangle + the area of the semicircle, so

    A = 2 h x + (1/2) pi x2

    We want to maximise A as a function of x; but the above expression has H in it as well. Therefore, we first need to get rid of h, and the fact that the perimeter must be 10m allows us to do this:
    The perimeter (= distance round the outside) = 2x + 2h + pi x = 10. Hence, solving:

    2h = 10 - pi x - 2x = 10 - x(pi + 2)

    Using this in the formula for A:

    A = [10 - x(pi + 2)]x + (1/2) pi x2

    = 10 x - x2(pi + 2) + (1/2) pi x2

    Differentiating:

    dA/dx = 10 - 2x(pi + 2) + pi x = 0 at stationary point.

    Solving for x:

                10
          x = ------ = approx. 1.4  at stationary point.
              4 + pi
    

    Is this a MAX or MIN? To answer this, find d2y/dx2 = -2 pi - 4 + pi = -4 -pi < 0, hence MAX.

    The actual value of the maximum area is found by substituting x = 1.4 into the formula for A, giving A(max) = 7 sq. m.



  2. A lead trough is made from a 4ft * 4ft square of lead sheet, by cutting out squares of side x from all four corners, and folding along the dotted lines:
    
        <--       4ft          -->
    
            -------------------      ^
            |x                |      |
         x  |                 |
        ----...................----
        |   .                 .   |
        |   .                 .   |
        |   .                 .   |  4ft
        |   .                 .   |
        |   .                 .   |
        |   .                 .   |
        ----...................----
            |                 |
            |                 |      |
            -------------------      v
    
    
    
    Find the maximum volume, V, of the trough so made.

    First, note that V = area of base * height = (4 - 2x) (4 -2x) x, so

    V = 4 x3 - 16 x 2 + 16 x

    Now differentiate:

    dV/dx = 12 x2 - 32 x + 16 = 0 at stationary point.

    We can divide this by 4 to simplify things:

    3 x2 - 8 x + 4 = 0 at stationary point.

    and use the quadratic formula to get

        8 +/- sqrt(64 - 48)   8 +/- 4
    x = ------------------- = ------- = 2, 2/3 ft.
                6                6
    
    Which, if any, of these is a maximum? To answer that, differentiate again:

    d2V/dx2 = 24 x - 32

    At x = 2, this is 24*2 - 32 = 16 > 0, so x = 2 is a minimum;

    At x = 2/3, this is 24*2/3 - 32 = -16 < 0, so x = 2/3 is a maximum.

    Thus, the maximum volume is

    V = 4 x3 - 16 x 2 + 16 x with x = 2/3

    which gives V (max) = 128/27 cu. ft = 4.74 cu. ft. approx.




Back to index.

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


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