## 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 local maximum (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 $\lim_{x\to a}\frac{f(x)-f(a)}{x-a}$. Now when x>a, we have f(x)≤f(a), so $\frac{f(x)-f(a)}{x-a}\le 0$ and so the limit ≤ 0. On the other hand, when x<a, the inequality f(x)≤f(a) also gives $\frac{f(x)-f(a)}{x-a}\ge 0$ so the limit ≥ 0. These two inequalities force the limit to be 0. ♦

Example 1

We have a piece of wire of length 2L. 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 of Rn, and f:C→Rn 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 $C\subseteq \mathbf{R}^n$ is closed if its complement Rn-C is an open subset of Rn. 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 aab gives 2a+b = 2L. By Heron’s formula, the area is:

$\sqrt{L\cdot (L-a)^2 (L-b)}$

so we need to maximise $f(a) := (L-a)^2 (L-b) = (L-a)^2 (2a -L)$. 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:

$f(x) = (L-x)^2 (2x-L) = 2x^3 - 5L\cdot x^2 + 4L^2\cdot x - L^3 \implies \frac{df}{dx} = 6x^2 - 10L\cdot x + 4L^2.$

Setting $\frac{df}{dx} = 0$ gives us  x=L or (2/3)L. Clearly, the latter is the correct answer. So the optimum dimensions are (2L/3, 2L/3, 2L/3), an equilateral triangle.

Example 2.

Suppose we have a piece of wire of fixed length 2L 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 ab, 2L-(a+b). To form a triangle, we need the following inequalities:

• $a+b \ge 2L-(a+b) \implies a+b \ge L$;
• $a+2L-(a+b) \ge b \implies 0\le b \le L$;
• $b+2L-(a+b) \ge a \implies 0\le a\le L$.

Thus, we get a map fC → R, where C is the subset of R2 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 (ab) in C.

Now fix a and vary b, where max{0, La} ≤ b ≤ L. Now either b is an edge-point in this region, or it’s a local maximum for f(ab). But the edge-points give f = 0, so it must be a local maximum. Write the area as the square root of $L(L-a)(L-b)(a+b-L)$. 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 [ab] is closed and bounded, we know from the above that f([ab]) attains a maximum at x and minimum at y. Now if axb, 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 [ab] in which case any ax < 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 $f'(x) = \frac{f(b)-f(a)}{b-a}$.

Proof

Apply a slight transformation to reduce it to the case of Rolle’s theorem: let $g(x) = f(x) - cx$, for some constant c such that g(a) = g(b). Clearly, $c=\frac{f(b)-f(a)}{b-a}$. Rolle’s theorem says there exists x in (ab) such that g’(x) = 0, whence we have $f'(x) = g'(x) + c = c$. ♦

One particularly useful corollary is as follows.

Corollary. Suppose f : (a, b) → R is 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 y and f(x) ≥ f(y), then by Mean Value Theorem, we can find xy such that $f'(z) = \frac{f(y)-f(x)}{y-x} \le 0$, which is a contradiction. ♦

Example 3.

Suppose we have the function f : (0, ∞) → R, given by $f(x) = x^{1/x}$. Let’s check the behaviour of f(x) as x increases. The above results suggest that the derivative is helpful: indeed, writing $f(x) = \exp(\log(x)/x)$ gives:

$f'(x) = \exp(\log(x)/x)\frac{x \cdot (1/x) - \log(x)}{x^2} = \frac{1 - \log(x)}{x^2}.$

We thus see that:

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

We claim that there’s a local maximum at x=e. Indeed, if e satisfies f(x) ≥ f(e), then Mean Value Theorem says there exists yxye such that $f'(y) = \frac{f(x)-f(e)}{x-e}\ge 0$ which contradicts the second point. Likewise, if xe 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 [ab] → R which are differentiable on (ab). If g’(x) ≠ 0 for all x in (ab), then there exists xaxb, such that $\frac{f'(x)}{g'(x)} = \frac{f(b)-f(a)}{g(b)-g(a)}$.

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:

• $\lim_{x\to c} f(x) = \lim_{x\to c} g(x) = 0$,
• $g'(x) \ne 0$ for all x in (a, b), x ≠ c,
• $\lim_{x\to c}\frac {f'(x)}{g'(x)} = L$,

then $\lim_{x\to c}\frac{f(x)}{g(x)} = L$.

Proof.

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

$\frac{f'(y)}{g'(y)} = \frac{f(x) - f(c)}{g(x) - g(c)} = \frac{f(x)}{g(x)}.$

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 $\lim_{x\to c} f(x)/g(x)$ to converge. E.g. take our earlier example of $f(x) = x^2 \sin(1/x)$ and g(x) = x, defined on x≠0. Then the first two conditions are satisfied, but now

$\lim_{x\to 0}\frac{f'(x)}{g'(x)} = 2x\sin(1/x)-\cos(1/x)$

which doesn’t converge. On the other hand $\lim_{x\to 0} \frac{f(x)}{g(x)}\to 0$ 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(3x) and g(x) = x – sin(x). The first two conditions of L’Hopital’s Rule are satisfied. So $\lim_{x\to 0} \frac{f(x)}{g(x)}=L$ if $\lim_{x\to 0} \frac{f'(x)}{g'(x)}=L$. [ Note that the converse isn’t true, as the above warning tells us. ]

So, we write:

$\frac{f'(x)}{g'(x)} = \frac{3\cos(x) - 3\cos(3x)}{1-\cos(x)}.$

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

$\frac{f''(x)}{g''(x)} = \frac{-3\sin(x)+9\sin(3x)}{\sin(x)}.$

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

$\frac{f'''(x)}{g'''(x)} = \frac{-3\cos(x)+27\cos(3x)}{\cos(x)}.$

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

This entry was posted in Notes and tagged , , , , , . Bookmark the permalink.