Given the function y = x ^ 2 + 4x-5, try to find the maximum and minimum values of the function in the range of - 3 less than or equal to x less than or equal to 0

Given the function y = x ^ 2 + 4x-5, try to find the maximum and minimum values of the function in the range of - 3 less than or equal to x less than or equal to 0

y=x^2+4x-5=(x+2)^2-9
When x = - 2, the function has a minimum value of - 9
Due to - 3 & lt; - 2 & lt; 0
When x = - 3, y = - 8
When x = 0, y = - 5
So the maximum value of the function is - 5