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 and for every x in (a, a + r) we have 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) ∪ (a, a + r) we have 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 next two, 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 (x) = 0), then: If , then has a local maximum at . If , then has a local minimum at . If , 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 (the proof for is analogous). By assumption, . Then Thus, for h sufficiently small we