What are the global and local extrema of f(x)=4x-x^2 ?

1 Answer
Feb 12, 2016

x=2 is both a global and local maximum.

Explanation:

Assume that the domain of f is all real numbers.

Complete the square

f(x) = -(x-2)^2-4

As anything squared cannot be less than zero, f(2)=-4 is the local maximum as well as the global maximum.

To show using calculus, take the first derivative of f.

f'(x) = 4-2x

Solve for f'(x)=0.

4-2x=0

x=2

Perform the second derivative test.

f''(x) = -2

f''(2) = -2 < 0

This means that the gradient is decreasing at x=2.

This means that the gradient changes from positive to zero to negative in a small neighborhood around x=2.

This means that x=2 is a local maximum.

There are no other local extrenum and f is continuous everywhere.

x=2 is also a global maximum.