# What is the gradient of the function p(x,y)=sqrt(24-4x^2-y^2)?

It's $\vec{\nabla} p \left(x , y\right) = \left\langle - \frac{4 x}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}} , - \frac{y}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}}\right\rangle$

The gradient $\vec{\nabla} p \left(x , y\right)$ of the function $p \left(x , y\right)$ is defined as the vector whose $n$-th component is the partial derivative of $p$ with respect to the $n$-th variable, or:

$\vec{\nabla} p \left(x , y\right) = \left\langle \frac{\partial p}{\partial x} , \frac{\partial p}{\partial y}\right\rangle$

Computing the partial derivatives using the chain rule:

$\frac{\partial p}{\partial x} = \frac{\partial}{\partial x} \left[\sqrt{24 - 4 {x}^{2} - {y}^{2}}\right]$
$= \frac{1}{2 \sqrt{24 - 4 {x}^{2} - {y}^{2}}} \frac{\partial}{\partial x} \left[24 - 4 {x}^{2} - {y}^{2}\right]$
$= - \frac{4 x}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}}$

$\frac{\partial p}{\partial y} = \frac{\partial}{\partial y} \left[\sqrt{24 - 4 {x}^{2} - {y}^{2}}\right]$
$= \frac{1}{2 \sqrt{24 - 4 {x}^{2} - {y}^{2}}} \frac{\partial}{\partial y} \left[24 - 4 {x}^{2} - {y}^{2}\right]$
$= - \frac{y}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}}$

And so,

$\vec{\nabla} p \left(x , y\right) = \left\langle \frac{\partial p}{\partial x} , \frac{\partial p}{\partial y}\right\rangle$
$= \left\langle - \frac{4 x}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}} , - \frac{y}{\sqrt{24 - 4 {x}^{2} - {y}^{2}}}\right\rangle$