مبرهنة فيرما
By using Fermat's theorem, the potential extrema of a function formula_1, with derivative formula_2, are found by solving an equation in formula_2. Fermat's theorem gives only a necessary condition for extreme function values, as some stationary points are inflection points (not a maximum or minimum). The function's second derivative, if it exists, can sometimes be used to determine whether a stationary point is a maximum or minimum.