Find the minimum value of multivariable function $f(x, y) = x^2 + 4x + y^2 + 5$ Question:
Let $f$ be defined as $f(x,y)=x^2+4x+y^2+5$. What is the smallest possible value of $f(x,y)$
My workings and understanding:
My first approach was to complete the square in $x$ to simplify the equation.
$$x^2+4x+y^2+5=(x+2)^2+y^2+1$$
I then see that I have a sum of squares, so my thought was that if;
$$x^2+y^2=0$$ only for $$x=y=0$$ as all squared number will be positive and I am looking for the minimum value in my equation, then I could apply the same logic. Thus:
$$(x+2)^2+y^2$$ will only equal $0$ when $x=-2$ and $y=0$, so the minimum value for $f(x,y)$ is $1$.
Is my thought process correct or have I made a wrong turn in my logic?
 A: Your solution is correct and your logic is sound.
A: At points where there are extremes the first derivatives of f must be zero
$\frac{\partial f}{\partial x}=2x+4=0$   and   $\frac{\partial f}{\partial y}=2y=0$  
Solutions of this system of simultaneous equations are stationary points.
$2x+4=0\,\,\,\,\wedge \,\,\,\,2y=0\,\,\,\,\,\,\,\Leftrightarrow \,\,\,\,\,\,x=-2\,\,\wedge \,\,\,y=0$    
and point $P(-2,0)$  is a stationary point.
To decide what kind of stationary point is (maximum, minimum or saddle point) use the Hessian matrix of second derivatives
$H=\left[ \begin{matrix}
   \frac{{{\partial }^{2}}f}{\partial {{x}^{2}}} & \frac{{{\partial }^{2}}f}{\partial x\partial y}  \\
   \frac{{{\partial }^{2}}f}{\partial y\partial x} & \frac{{{\partial }^{2}}f}{\partial {{y}^{2}}}  \\
\end{matrix} \right]=\left[ \begin{matrix}
   2 & 0  \\
   0 & 2  \\
\end{matrix} \right]$ 
In general this matrix depends on the point P but in this particular case is valid for any ${{\mathbb{R}}^{2}}$.
As  $\det \left[ 2 \right]=2>0$  and  $\det H=4>0$   the Hessian matrix is a matrix of a quadratic defined positive form and so the stationary point is a minimum:
${{f}_{Min}}=f(-2,0)=4-8+5=1$
