How can the max value of $f(1,y)=y^{2}+y+5$ be $(1,1)?$ Shouldn't it be imaginary? I am working on a maximum and minimum problem, see picture below. The book video says that the max value of $$f(1,y)=y^{2}+y+5$$
is $(1,1).$ How can I solve this function and get $(1,1)$, as its root is imaginary. this doesn't make any sense to me. Please let me know why. thanks. 

 A: We find $f_x = 2 x + 2 x y$, $f_y = x^2+2 y$.
Now we find where $f_x =  f_y = 0$, which gives three points, but two are outside our square, so we only have $(x, y) = (0,0)$.
Now, we need to test the function at this critical point and it gives $f(x, y) = f(0,0) =  4$.
We also have to test the endpoints and find that at $(x, y) = (-1, 1), (1, 1)$, we get $f(x, y) = 7$.
Those are the absolute min and max.
There are other local min and max, but they are not the absolute ones and that is what the solution shows. However, we certainly needed to find those to rule out that they are not absolute ones.
Update
We have four points on the square and "everything" in between those four points that can potentially provide an absolute or local min and max. We must test all of them and the critical points to determine where all the extrema are.
So, lets do one of the points. What we do, is fix the point and then evaluate the function on the other variable. Lets take $L_3$.
We start by fixing $x = 1$ and we substitute this in $f(x, y) = f(1, y) = y^2 + y + 5$.
Now, we find the derivative and set equal to zero to find the extrema.
$f'(1, y) = 2 y + 1 = 0 \implies y = -\dfrac{1}{2}$.
We now test $L_3 = (1, 1)$ and this local critical point $\left(1, -\dfrac{1}{2}\right)$. We find that $f(1, 1) = 7$ and $f\left(1, -\dfrac{1}{2}\right) = \dfrac{19}{4}$.
Can you now proceed with the other three points?
Once you do those, then we compare the results from all of the calculations for absolute min and max, recalling that we have the four points, plus the critical point.
Note: The reason we throw out the critical points $(\pm \sqrt{2}, -1)$ is that $\sqrt{2} > 1$, that is, those points are outside our square.
A: The only critical point interior to the region is $(0,0)$ and the value there is $4$, as noted.
Any other maximum or minimum will occur along the boundary when $\vert x\vert=1$ or $\vert y\vert=1$. So you check the maximum and minimum values of each of those four functions restricted to the intervals $[-1,1]$ for both $x$ values and $y$ values.
For example, $f(1,y)=y^{2}+y+5$ has a maximum value of $7$ at $(1,1)$ and a minimum value of $4.75$ at $x=-\frac{1}{2}$.
Do that for all four sides of the square and find the minimum and maximum on the square.
