There are many ways to find the maximum and minimum. For example, a linear function, look at the slope k, k is greater than 0, x is greater and y is greater, and when k is less than 0, x is greater and y is smaller. If it is a quadratic function, use the matching method, first add a constant in a completely flat way, and then see that a is greater than 0, this constant is the minimum value, if a is less than 0, this constant is the maximum value.
Hope to adopt, thank you.