## Finding Extremum Points

One of the most common applications of differentiation is in finding all local maximum and minimum points.

Definition. We say f(x) has a localmaximum(resp.minimum) at x=a, if there is an open interval (b, c) containing a, such that f(x) attains a maximum (resp. minimum) in this interval at x=a.

Theorem. If f(x) has a local maximum or minimum at x=a and f'(a) exists, then f'(a) = 0.

**Proof**.

We’ll only prove it for maximum (for minimum, replace *f* with –*f*). Restrict *f* to a small open interval about *a* so that *f*(*x*) takes the maximum there.

By definition, the derivative *f’*(*a*) is . Now when *x*>*a*, we have *f*(*x*)≤*f*(*a*), so and so the limit ≤ 0. On the other hand, when *x*<*a*, the inequality *f*(*x*)≤*f*(*a*) also gives so the limit ≥ 0. These two inequalities force the limit to be 0. ♦

**Example 1**

We have a piece of wire of length 2*L*. We wish to bend it to form an isosceles triangle so that the area is maximum. What’re the optimum dimensions?

Unlike secondary school calculus, we’ll solve this in a rigourous manner. Bear with us if the reasoning below seems a little lengthy, but we wish to have no gaps in our proof.

First, it’s not even clear a maximum exists even if the area is upper-bounded. To solve this problem: we’ll quote a theorem without proof.

Theorem. If C is a closed and bounded subset ofR^{n}, and f:C→R^{n}is continuous, then f(C) is also closed and bounded.In particular, since f(C) is bounded it has a supremum and an infimum. Since it’s closed, both these values must belong to f(C). Thus, f(C) has a maximum and minimum, which is the crucial property we need.

Here, a subset is

closedif its complementR^{n}-C is an open subset ofR^{n}. We’ll have more to say about closed subsets in a later article.[ Question to think about: is it possible to find C closed but not bounded, and continuous f, such that f(C) is neither closed nor bounded? What about a bounded but not closed C? ]

Proving this requires the concept of *compactness*, which we’ll delay until a later article. We urge the reader to take our word for now.

Back to the problem. Bending the wire into a triangle of side lengths *a*, *a*, *b* gives 2*a*+*b* = 2*L*. By Heron’s formula, the area is:

so we need to maximise . Now to form a triangle, we need *L*/2 ≤ *a* ≤ *L* which gives a function *f* : [*L*/2, *L*] → **R**. Since [*L*/2, *L*] is closed and bounded, the image of *f* attains a maximum and a minimum.

Suppose *f*(*x*) attains a maximum at *x*=*a*. Then *a* either lies in (*L*/2, *L*) or *a*=*L*/2 or *a*=*L*. The last two cases are out since *f*(*L*/2) = *f*(*L*) = 0. The first case is a local maximum which gives *f’*(*a*) = 0. But:

Setting gives us *x*=*L* or (2/3)*L*. Clearly, the latter is the correct answer. So the optimum dimensions are (2*L*/3, 2*L*/3, 2*L*/3), an equilateral triangle.

**Example 2**.

Suppose we have a piece of wire of fixed length 2*L* and we wish to bend it to form a triangle. What is the largest possible area of the triangle?

First, label the sides of the triangle by *a*, *b*, 2*L*-(*a*+*b*). To form a triangle, we need the following inequalities:

- ;
- ;
- .

Thus, we get a map *f* : *C* → **R**, where *C* is the subset of **R**^{2} defined by the above inequalities and *f* denotes the area of the resulting triangle. Since each inequality defines a closed subset, the resulting intersection is also closed. Finally, the second and third inequalities clearly imply region *C* is bounded.

Hence, *f*(*C*) is closed and bounded, so in particular it attains a maximum and a minimum. Suppose *f* attains a maximum at (*a*, *b*) in *C*.

Now fix *a* and vary *b*, where max{0, *L*–*a*} ≤ *b* ≤ *L*. Now either *b* is an edge-point in this region, or it’s a local maximum for *f*(*a*, *b*). But the edge-points give *f* = 0, so it must be a local maximum.* *Write the area as the square root of* *. Since *b* varies, we differentiate this with respect to *b* and set it to zero, which gives *b* = *L*-(*a*/2), i.e. the sides are *a*, *L*-(*a*/2) and *L*-(*a*/2) so we get an isosceles triangle, which reduces this to the previous problem.

Conclusion: the largest area occurs when the triangle is equilateral.

In summary, since the image of a closed and bounded set under a continuous map is closed and bounded, it must attain a maximum and minimum (if the map is real-valued). Both these extrema points are either in the interior, in which case the derivative is zero since it’s a local extremum, or on a boundary.

## Rolle’s Theorem

This says:

Rolle’s Theorem. Suppose f:[a, b] →R(a<b) is a continuous function which is differentiable in the interior (a, b). If f(a) = f(b), then there is a point a < x < b for which f'(x) = 0.

**Proof**.

Since [*a*, *b*] is closed and bounded, we know from the above that *f*([*a*, *b*]) attains a maximum at *x* and minimum at *y*. Now if *a* < *x* < *b*, then *x* is a local extremum so we have *f’*(*x*) = 0 as desired. Same goes for *y*. The only remaining possibility is that both *x* and *y* are edge-points, i.e. *a* or *b*. But that means *f*(*a*)=*f*(*b*) is both the maximum and the minimum so *f*(*x*) is constant on [*a*, *b*] in which case any *a* < *x* < *b* would do. ♦

This can be generalised as follows.

Mean Value Theorem. Suppose f:[a, b] →R(a<b) is a continuous function which is differentiable in the interior (a, b). There exists x in (a, b) such that .

**Proof**

Apply a slight transformation to reduce it to the case of Rolle’s theorem: let , for some constant *c* such that *g*(*a*) = *g*(*b*). Clearly, . Rolle’s theorem says there exists *x* in (*a*, *b*) such that *g’*(*x*) = 0, whence we have . ♦

One particularly useful corollary is as follows.

Corollary. Suppose f : (a, b) →Ris differentiable and its derivative at every a < x < b is positive. Then f is strictly increasing, i.e. if x < y, then f(x) < f(y).

**Proof**.

If *x *< *y* and *f*(*x*) ≥ *f*(*y*), then by Mean Value Theorem, we can find *x* < *z *< *y* such that , which is a contradiction. ♦

**Example 3**.

Suppose we have the function *f* : (0, ∞) → **R**, given by . Let’s check the behaviour of *f*(*x*) as *x* increases. The above results suggest that the derivative is helpful: indeed, writing gives:

We thus see that:

- for 0 <
*x*<*e*,*f’*(*x*) > 0 so the function is strictly increasing on (0,*e*); - for
*x*>*e*,*f’*(*x*) < 0 so the function is strictly decreasing on (*e*, ∞); - when
*x*=*e*,*f’*(*x*) = 0.

We claim that there’s a local maximum at *x*=*e*. Indeed, if *x *> *e* satisfies *f*(*x*) ≥ *f*(*e*), then Mean Value Theorem says there exists *y*, *x* > *y* > *e* such that which contradicts the second point. Likewise, if *x* < *e* satisfies *f*(*x*) ≥ *f*(*e*), then this contradicts the first point.

**Exercise**

Prove the **Extended Mean Value Theorem** : suppose *f* and *g* are continuous functions [*a*, *b*] → **R** which are differentiable on (*a*, *b*). If *g’*(*x*) ≠ 0 for all *x* in (*a*, *b*), then there exists *x*, *a* < *x* < *b*, such that .

[ **Answer** (highlight to read) : find a constant *c* such that *h*(*x*) := *f*(*x*) + *c**·g*(*x*) satisfies *h*(*a*) = *h*(*b*). Show that *c* exists. Apply Rolle’s theorem to *h*. ]

## L’Hopital’s Rule

This theorem is useful for evaluating the limit of *f*(*x*)/*g*(*x*) when both the numerator and denominator approach 0. However, we have to be careful in stating it since there’re many traps for the unwary. First, we consider one variation.

Theorem (L’Hopital’s Rule). Suppose f and g are differentiable functions (a, b) – {c} →R. If:

- ,
- for all x in (a, b), x ≠ c,
- ,
then .

**Proof**.

We’ll need the Extended Mean Value Theorem in the above exercise: for every *x* in (*a*, *b*), *x**≠c*, there exists *y* between *x* and *c* such that:

Since *f’*(*x*)/*g’*(*x*) → *L*, for every ε>0, |*f’*(*x*)/*g’*(*x*) – *L*| < ε when *x* is close to *c*. The above equality tells us that |*f*(*x*)/*g*(*x*) – *L*| < ε when *x* is close to *c*. This proves the theorem. ♦

**Warning**

Even if *f’*(*x*)/*g’*(*x*) does not converge as *x* → *c*, it may still be possible for to converge. E.g. take our earlier example of and *g*(*x*) = *x*, defined on *x*≠0. Then the first two conditions are satisfied, but now

which doesn’t converge. On the other hand by squeeze theorem. **In summary, even if f’(x)/g’(x) fails to converge as x→c, it’s still possible for f(x)/g(x) to converge.**

**Example 4**.

Suppose *f*(*x*) = 3sin(*x*) – sin(3*x*) and *g*(*x*) = *x* – sin(*x*). The first two conditions of L’Hopital’s Rule are satisfied. So if . [ Note that the converse isn’t true, as the above warning tells us. ]

So, we write:

Again the first two conditions of L’Hopital’s Rule are satisfied for this expression, so let’s look at the next derivative:

The same thing happens, so we take the derivative again:

This time, as *x*→0, the expression approaches 24. Thus, the original *f*(*x*)/*g*(*x*)→24 as *x*→0.