# How do you compute the gradient of the function p(x,y)=sqrt(24-4x^2-y^2) and then evaluate it at the point (-2,1)?

Mar 22, 2015

This is conceptually very simple, so the only "difficult" part will be the calculations: if $n$ is the number of variabiles of a function (in your case thus $n = 2$, then the gradient of the function is a vector of length $n$, whose elements are the derivatives with respect to each variables, so if you have $f \left({x}_{1} , \ldots , {x}_{n}\right)$, the gradient will be the vector
$\left(\frac{\setminus \partial f}{\setminus \partial {x}_{1}} , . . , \frac{\setminus \partial f}{\setminus \partial {x}_{n}}\right)$

So, the gradient of your function $p$ will be the 2-dimensional vector
$\left(\frac{\setminus \partial p}{\setminus \partial x} , \frac{\setminus \partial p}{\setminus \partial y}\right)$.

Let's calculate the two derivatives: by the chain rule, if we need to derive an expression such $\setminus \sqrt{f \left(x , y\right)}$, the derivative will be $\frac{f ' \left(x , y\right)}{2 \setminus \sqrt{f \left(x , y\right)}}$, where of course $f ' \left(x , y\right)$ is the derivative with respect to the right variable. So, deriving with respect to $x$ (which means that we must consider $y$ as a constant) , we get $f ' \left(x , y\right) = - 8 x$.

Deriving with respect to $y$, we get instead $- 2 y$. So, the gradient vector will be

$\left(\frac{- 8 x}{2 \setminus \sqrt{24 - 4 {x}^{2} - {y}^{2}}} , \frac{- 2 y}{2 \setminus \sqrt{24 - 4 {x}^{2} - {y}^{2}}}\right)$

We can simplify both terms, obtaining

$\left(\frac{- 4 x}{\setminus \sqrt{24 - 4 {x}^{2} - {y}^{2}}} , \frac{- y}{\setminus \sqrt{24 - 4 {x}^{2} - {y}^{2}}}\right)$

To evaluate this vector, we only need to plug in the values, if $x = - 2$ and $y = 1$, we get

$\left(\frac{8}{\sqrt{7}} , - \frac{1}{\sqrt{7}}\right)$