To determine the maxima and minima of the function we can use the first derivative test:
First Derivative Test
If f'(x)>0 for all xEI, then f is increasing on I
If f'(x)<0 for all xEI, then f is decreasing on I
Given the equation: x^2-4x+4
f'(x) = 2x - 4
First we need to find the case at 0:
f'(x) = 2x-4 = 0 --> 2x=4 --> x = 2
Now we need to know whether the function is increasing or decreasing before 2, and after 2.
For x=2 to be a maximum the function needs to be increasing for x<2 and decreasing for x>2.
For it to be a minimum the function needs to be decreasing for x<2 and increasing for x>2.
To test this we pick a value above 2 and below 2:
x= 3 --> f'(x) = 2(3) - 4 = 2 (positive = increasing)
x=1 --> f'(x) = 2(1) - 4 = -2 (negative = decreasing)
Therefore there is a minima in this function at x=2.