critical points of the function Find the critical points of the function
$$f(x,y)=(4x-x^2)\cos y$$
first let's determinate Partial derivatives:
$$\dfrac{\partial f}{\partial x}(x,y)=(4-2x)\cos y$$
$$\dfrac{\partial f}{\partial y}(x,y)=-\sin y(4x-x^2) $$
To find the critical points, we solve:
\begin{cases}\dfrac{\partial f}{\partial x}(x,y)=0 & \\
\\
\dfrac{\partial f}{\partial y}(x,y)=0 & \end{cases} 
\begin{cases}
(4-2x)\cos y=0 & \\
\\
-\sin y(4x-x^2)=0 & \end{cases} 
\begin{cases}
(4-2x)\cos y=0 & \\
\\
(x^2-4x)\sin y=0 & \end{cases}
which gives
$  \begin{cases}
4-2x=0 & \\
\\
x^2-4x=0 & \end{cases} \textrm{or} 
 \begin{cases}
4-2x=0 & \\
\\
\sin y=0 & \end{cases}
\textrm{or}
 \begin{cases}
\cos y=0 & \\
\\
x^2-4x=0 & \end{cases}
\textrm{or}
 \begin{cases}
\cos y=0 & \\
\\
\sin y=0 & \end{cases} $
let's treat each case individually


*

*$  \begin{cases}
4-2x=0 & \\
\\
x^2-4x=0 & \end{cases} \implies \begin{cases}
x=2 & \\
\\
x=0 \textrm{ or } x=4 & \end{cases}  $ thus The system does not have solution

*$ \begin{cases}
4-2x=0 & \\
\\
\sin y=0 & \end{cases} \implies  \begin{cases}
x=2 & \\
\\
\ y=k\pi,\ k \in \mathbb{Z} & \end{cases} \implies (2,k\pi )  $

*$\begin{cases}
\cos y=0 & \\
\\
x^2-4x=0 & \end{cases}\implies \begin{cases}
 y=\dfrac{\pi}{2}+k\pi, \ k \in \mathbb{Z} & \\
\\
x=0 \textrm{ or } x=4 & \end{cases}\implies (0,\dfrac{\pi}{2}+k\pi) \textrm{ or } (4,\dfrac{\pi}{2}+k\pi)$

*$\begin{cases}
\cos y=0 & \\
\\
\sin y=0 & \end{cases} \implies$ thus The system does not have solution


The function has three critical points $$(2,k\pi ), (0,\dfrac{\pi}{2}+k\pi) \textrm{ and }(4,\dfrac{\pi}{2}+k\pi)$$


*

*Am i right ?


Hint: The second equation is $x(x-4)\sin y=0$ which gives $x=0$ or $x=4$ or $y=k\pi$, $k \in \Bbb{Z}$.
Consider all three cases separately by plugging them in to the first equation.  
