To find the maximum and minimum of an expression, set the derivative of the expression equal to zero.
let y = sin²(x) + 4
y' = 2sin(x)cos(x) = 0
y" = 2[cos²(x) - sin²(x)]
sin(x) = 0 => x = 0, 180
cos(x) = 0 => x = 90, 270
The expression evaluated at 0, 180, 90, and 270 will be the maximum and minimum values.
the second derivative will be negative at the maximum values, and positive at the minimum values
Since y" = 2[cos²(x) - sin²(x)] is positive at 0 and 180 and negative at 90 and 270, the values at 0 and 180 are minimums and the values at 90 and 270 are maximums.
let y = cos^2(x)+2cos(x)+6
y' = -2cos(x)sin(x) - 2sin(x) = 0
y" = -2(cos²(x) - sin²(x) - 2cos(x)
y" = 2[sin²(x) - cos²(x) + cos(x)]
sin(x)[cos(x) + 1] = 0
sin(x) = 0 => x = 0, 180
cox(x) = -1 => x = 180
The maximum and minimum occur at 0 and 180.