since you know its a one-variable optimization problem or max-min problem
we know to use the theorem to find max and min points