Maximizing a Quadratic Function

A quadratic function is a function of the form

f(x) = a x2 + b x + x

If a is positive then the graph of f(x) is shaped like a valley and the function f(x) has a minimum. If a is negative then the graph of the function f(x) is shaped like a mountain and the function f(x) has a maximum. See the graphs below.

We can rewrite the function f(x) as shown below.

Missing equation

The important part of the formula on the right hand side of the last line is the factor

Missing equation

which is the only factor involving x. The important part of this factor is the term

Missing equation

which is the only term involving x. Notice that this term is zero if x = -b/2a and is positive otherwise. Therefore the minimum value of

Missing equation

is

Missing equation

and occurs when

Missing equation

If a is positive then the minimum value of f(x) is

Missing equation

and occurs when

Missing equation

If a is negative then the maximum value of f(x) is

Missing equation

and occurs when

Missing equation


Copyright c 1997 by Frank Wattenberg, Department of Mathematics, Montana State University, Bozeman, MT 59717