## 122. Maxima and Minima.

We shall say that the value \(\phi(\xi)\) assumed by \(\phi(x)\) when \(x = \xi\) is a *maximum* if \(\phi(\xi)\) is greater than any other value assumed by \(\phi(x)\) in the immediate neighbourhood of \(x = \xi\), if we can find an interval \({[\xi – \delta, \xi + \delta]}\) of values of \(x\) such that \(\phi(\xi) > \phi(x)\) when \(\xi – \delta < x < \xi\) and when \(\xi < x < \xi + \delta\); and we define a *minimum* in a similar manner. Thus in the figure the points \(A\) correspond to maxima, the points \(B\) to minima of the function whose graph is there shown. It is to be observed that the fact that \(A_{3}\) corresponds to a maximum and \(B_{1}\) to a minimum is in no way inconsistent with the fact that the value of the function is greater at \(B_{1}\) than at \(A_{3}\).

**Theorem C.** A **necessary** condition for a maximum or minimum value of \(\phi(x)\) at \(x = \xi\) is that \(\phi'(\xi) = 0\).^{1 }

This follows at once from Theorem A. That the condition is not *sufficient* is evident from a glance at the point \(C\) in the figure. Thus if \(y = x^{3}\) then \(\phi'(x) = 3x^{2}\), which vanishes when \(x = 0\). But \(x = 0\) does not give either a maximum or a minimum of \(x^{3}\), as is obvious from the form of the graph of \(x^{3}\) (Fig. 10, § 23).

But *there will certainly be a maximum at \(x = \xi\) if \(\phi'(\xi) = 0\), \(\phi'(x) > 0\) for all values of \(x\) less than but near to \(\xi\), and \(\phi'(x) < 0\) for all values of \(x\) greater than but near to \(\xi\)*: and if the signs of these two inequalities are reversed there will certainly be a minimum. For then we can (by Cor. 3 of § 121) determine an interval \({[\xi – \delta, \xi]}\) throughout which \(\phi(x)\) increases with \(x\), and an interval \({[\xi, \xi + \delta]}\) throughout which it decreases as \(x\) increases: and obviously this ensures that \(\phi(\xi)\) shall be a maximum.

This result may also be stated thus. If the sign of \(\phi'(x)\) changes at \(x = \xi\) from positive to negative, then \(x = \xi\) gives a maximum of \(\phi(x)\): and if the sign of \(\phi'(x)\) changes in the opposite sense, then \(x = \xi\) gives a minimum.

## 123.

There is another way of stating the conditions for a maximum or minimum which is often useful. Let us assume that \(\phi(x)\) has a second derivative \(\phi”(x)\): this of course does not follow from the existence of \(\phi'(x)\), any more than the existence of \(\phi'(x)\) follows from that of \(\phi(x)\). But in such cases as we are likely to meet with at present the condition is generally satisfied.

**Theorem D.** If \(\phi'(\xi) = 0\) and \(\phi”(\xi) \neq 0\), then \(\phi(x)\) has a maximum or minimum at \(x = \xi\), a maximum if \(\phi”(\xi) < 0\), a minimum if \(\phi”(\xi) > 0\).

Suppose, , that \(\phi”(\xi) < 0\). Then, by Theorem A, \(\phi'(x)\) is negative when \(x\) is less than \(\xi\) but sufficiently near to \(\xi\), and positive when \(x\) is greater than \(\xi\) but sufficiently near to \(\xi\). Thus \(x = \xi\) gives a maximum.

## 124.

In what has preceded (apart from the last paragraph) we have assumed simply that \(\phi(x)\) has a derivative for all values of \(x\) in the interval under consideration. If this condition is not fulfilled the theorems cease to be true. Thus Theorem B fails in the case of the function \[y = 1 – \sqrt{x^{2}},\] where the square root is to be taken positive. The graph of this function is shown in Fig. 40. Here \(\phi(-1) = \phi(1) = 0\): but \(\phi'(x)\), as is evident from the figure, is equal to \(1\) if \(x\) is negative and to \(-1\) if \(x\) is positive, and never vanishes. There is no derivative for \(x = 0\), and no tangent to the graph at \(P\). And in this case \(x = 0\) obviously gives a maximum of \(\phi(x)\), but \(\phi'(0)\), as it does not exist, cannot be equal to zero, so that the test for a maximum fails.

The bare existence of the derivative \(\phi'(x)\), however, is all that we have assumed. And there is one assumption in particular that we have not made, and that is that *\(\phi'(x)\) itself is a continuous function*. This raises a rather subtle but still a very interesting point. *Can* a function \(\phi(x)\) have a derivative for all values of \(x\) which is not itself continuous? In other words can a curve have a tangent at every point, and yet the direction of the tangent not vary continuously? The reader, if he considers what the question means and tries to answer it in the light of common sense, will probably incline to the answer *No*. It is, however, not difficult to see that this answer is wrong.

Consider the function \(\phi(x)\) defined, when \(x \neq 0\), by the equation \[\phi(x) = x^{2}\sin(1/x);\] and suppose that \(\phi(0) = 0\). Then \(\phi(x)\) is continuous for all values of \(x\). If \(x \neq 0\) then \[\phi'(x) = 2x \sin(1/x) – \cos(1/x);\] while \[\phi'(0) = \lim_{h \to 0} \frac{h^{2}\sin(1/h)}{h} = 0.\] Thus \(\phi'(x)\) exists for all values of \(x\). But \(\phi'(x)\) is discontinuous for \(x = 0\); for \(2x\sin(1/x)\) tends to \(0\) as \(x \to 0\), and \(\cos(1/x)\) oscillates between the limits of indetermination \(-1\) and \(1\), so that \(\phi'(x)\) oscillates between the same limits.

What is practically the same example enables us also to illustrate the point referred to at the end of § 121. Let \[\phi(x) = x^{2}\sin(1/x) + ax,\] where \(0 < a < 1\), when \(x \neq 0\), and \(\phi(0) = 0\). Then \(\phi'(0) = a > 0\). Thus the conditions of Theorem A of § 121 are satisfied. But if \(x \neq 0\) then \[\phi'(x) = 2x\sin(1/x) – \cos(1/x) + a,\] which oscillates between the limits of indetermination \(a – 1\) and \(a + 1\) as \(x \to 0\). As \(a – 1 < 0\), we can find values of \(x\), as near to \(0\) as we like, for which \(\phi'(x) < 0\); and it is therefore impossible to find any interval, including \(x = 0\), throughout which \(\phi(x)\) is a steadily increasing function of \(x\).

It is, however, impossible that \(\phi'(x)\) should have what was called in Ch. V (Ex. XXXVII. 18) a ‘simple’ discontinuity; that \(\phi'(x) \to a\) when \(x \to +0\), \(\phi'(x) \to b\) when \(x \to -0\), and \(\phi'(0) = c\), unless \(a = b = c\), in which case \(\phi'(x)\) is continuous for \(x = 0\). For a proof see § 125, Ex. XLVII. 3.

$\leftarrow$ 121. General theorems concerning derivatives. Rolle’s Theorem | Main Page | 125-126. The Mean Value Theorem $\rightarrow$ |