In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information about the concavity of a function. The usefulness of derivatives to find extrema is proved mathematically by Fermat's theorem of stationary points.
First-derivative test The first-derivative test examines a function's monotonic properties (where the function is increasing or decreasing), focusing on a particular point in its domain. If the function "switches" from increasing to decreasing at the point, then the function will achieve a highest value at that point. Similarly, if the function "switches" from decreasing to increasing at the point, then it will achieve a least value at that point. If the function fails to "switch" and remains increasing or remains decreasing, then no highest or least value is achieved. One can examine a function's monotonicity without calculus. However, calculus is usually helpful because there are sufficient conditions that guarantee the monotonicity properties above, and these conditions apply to the vast majority of functions one would encounter.
Precise statement of monotonicity properties Stated precisely, suppose that f is a real-valued function defined on some open interval containing the point x and suppose further that f is continuous at x.
If there exists a positive number r > 0 such that f is weakly increasing on (x − r, x] and weakly decreasing on [x, x + r), then f has a local maximum at x. If there exists a positive number r > 0 such that f is strictly increasing on (x − r, x] and strictly increasing on [x, x + r), then f is strictly increasing on (x − r, x + r) and does not have a local maximum or minimum at x. Note that in the first case, f is not required to be strictly increasing or strictly decreasing to the left or right of x, while in the last case, f is required to be strictly increasing or strictly decreasing. The reason is that in the definition of local maximum and minimum, the inequality is not required to be strict: e.g. every value of a constant function is considered both a local maximum and a local minimum.
Precise statement of first-derivative test The first-derivative test depends on the "increasing–decreasing test", which is itself ultimately a consequence of the mean value theorem. It is a direct consequence of the way the derivative is defined and its connection to decrease and increase of a function locally, combined with the previous section. Suppose f is a real-valued function of a real variable defined on some interval containing the critical point a. Further suppose that f is continuous at a and differentiable on some open interval containing a, except possibly at a itself.
If there exists a positive number r > 0 such that for every x in (a − r, a) we have f′(x) ≥ 0, and for every x in (a, a + r) we have f′(x) ≤ 0, then f has a local maximum at a. If there exists a positive number r > 0 such that for every x in (a − r, a) we have f′(x) ≤ 0, and for every x in (a, a + r) we have f′(x) ≥ 0, then f has a local minimum at a. If there exists a positive number r > 0 such that for every x in (a − r, a) ∪ (a, a + r) we have f′(x) > 0, then f is strictly increasing at a and has neither a local maximum nor a local minimum there. If none of the above conditions hold, then the test fails. (Such a condition is not vacuous; there are functions that satisfy none of the first three conditions, e.g. f(x) = x2 sin(1/x)). Again, corresponding to the comments in the section on monotonicity properties, note that in the first two cases, the inequality is not required to be strict, while in the third, strict inequality is required.
Applications The first-derivative test is helpful in solving optimization problems in physics, economics, and engineering. In conjunction with the extreme value theorem, it can be used to find the absolute maximum and minimum of a real-valued function defined on a closed and bounded interval. In conjunction with other information such as concavity, inflection points, and asymptotes, it can be used to sketch the graph of a function.
Second-derivative test (single variable) After establishing the critical points of a function, the second-derivative test uses the value of the second derivative at those points to determine whether such points are a local maximum or a local minimum. If the function f is twice-differentiable at a critical point x (i.e. a point where f′(x) = 0), then:
If f″(x)<0, then f has a local maximum at x. If f″(x)>0, then f has a local minimum at x. If f″(x)=0, the test is inconclusive. In the last case, Taylor's theorem may sometimes be used to determine the behavior of f near x using higher derivatives.
Proof of the second-derivative test Suppose we have f″(x)>0 (the proof for f″(x)<0 is analogous). By assumption, f′(x)=0. Then 0<f″(x)=limh→0f′(x+h)−f′(x)h=limh→0f′(x+h)h. Thus, for h sufficiently small we get f′(x+h)h>0, which means that f′(x+h)<0 if h<0 (intuitively, f is decreasing as it approaches x from the left), and that f′(x+h)>0 if h>0 (intuitively, f is increasing as we go right from x). Now, by the first-derivative test, f has a local minimum at x.
Concavity test A related but distinct use of second derivatives is to determine whether a function is concave up or concave down at a point. It does not, however, provide information about inflection points. Specifically, a twice-differentiable function f is concave up if f″(x)>0 and concave down if f″(x)<0. Note that if f(x)=x4, then x=0 has zero second derivative, yet is not an inflection point, so the second derivative alone does not give enough information to determine whether a given point is an inflection point.
… excerpt ends here. Continue reading the full article.

