[Math] how to determine the outward pointing normal (gauss divergence theorem)

calculusmultivariable-calculussurfacesvector analysis

I have a cone defined by $x^2+y^2=(1-z)^2$ i was trying to work out the normal vector on surface $s_1$ indicated on the plotplot

On $s_1$: r=$\left<x,y,0\right>$ since $z=0$ on $x-y$ plane

$\dfrac{\partial}{\partial x}=1;$ $\dfrac{\partial}{\partial y}=1;$ $\dfrac{\partial}{\partial z}=0$

$\therefore$ n=$\dfrac{\partial}{\partial x}$×$\dfrac{\partial}{\partial y}$ =$\left<0,0,1\right>$, however my textbook "thinks" on $s_1$ this normal vector points inwards and the outward pointing normal is given by n=$\dfrac{\partial}{\partial x}$×$\dfrac{\partial}{\partial y}$ =$\left<0,0,-1\right>$. Can someone please explain why this is, how do i know where the normal vector is pointing -Thanks.

EDIT:

i also dont't understand why this is wrong for $s_2$:

$r$=$\left<x,y,1-\sqrt{x^2+y^2}\right>$ note that $x^2+y^2=(1-z^2)$ for this question:

$r_x$=$\left<1,0,\dfrac{-x}{\sqrt{x^2+y^2}}\right>$ and $r_y$=$\left<0,1,\dfrac{-y}{\sqrt{x^2+y^2}}\right>$

$r_x$×$r_y$
=$\left<\dfrac{x}{\sqrt{{x^2+y^2}}}, \dfrac{y}{\sqrt{{x^2+y^2}}},1 \right>$

$\implies n$=$\left<\dfrac{-x}{\sqrt{{x^2+y^2}}}, \dfrac{-y}{\sqrt{{x^2+y^2}}},-1 \right>$

shouldn't $-\left<\hat{i},\hat{j},\hat{k}\right>$ point away from the surface at $s_1$?

Best Answer

According to the picture (and the equation of the cone), the cone is above the XY plane (namely with positive z coordinate), so that the normal on its basis that points outward should be with a negative sign in the z coordinate. When using the divergence theorem you always need to choose the outward normal, so you first need to calculate a normal using the vector product and then multiply by -1 if needed.

Related Question