Do we put negative sign while calculating inward flux by Gauss Divergence theorem?

Suppose we have a vector field $$\vec A=ax\hat i + by\hat j+cz\hat k$$ and we want to calculate its inward flux $$\int \vec A\cdot\vec {dS}$$ over the spherical surface $$x^2+y^2+z^2=1$$(with area vector directed radially inwards) by using Gauss Divergence theorem.

We do this by calculating divergence of $$\vec A$$ which is $$a+b+c$$. Now as volume element $$dτ$$ doesn't have direction, how will someone tell while doing $$\int (\vec\nabla\cdot\vec A)d\tau$$ that we are calculating flux through outer surface or inner surface. I mean the "effect" of area vector being outward or inward in the original calculation seems to be missing. Why is this happening?

Do I have to put negative by myself to take into consideration the inward flux?

The Gauß-Integral-Theorem $$\int_V d\tau (\vec{\nabla}\cdot\vec{A})=\int_{\partial V} (d\vec{S} \cdot \vec{A}),$$ hast the requirement that the Volume $$V$$ in the formula is enclosed by the surface $$\partial V$$, such that the direction of a small area $$d\vec{S}$$ is going outwards of the volume. If you want to define your $$d\vec{S}$$ going inwards, then the volume in the formula would be the complement (going from the surface to infinity) of the one you are using. For this infinite volume Gauß's Theorem does not hold (at least mathematically, as you need a compact volume). Also the direction of the area-vector of a closed surface is generally defined as going out of the volume which implicates everything above.
Thus $$\int_{\partial V} (d\vec{S} \cdot \vec{A})=\int_V d\tau (\vec{\nabla}\cdot\vec{A})=(a+b+c)\int_V d\tau=+(a+b+c)\frac{4}{3}\pi.$$
An example where you can see that the vector of a surface has to be pointing outwards of its enclosed volume is (for $$\vec{r}=(x,y,z)^T$$): $$\int_{\partial V} (d\vec{S} \cdot \vec{r})=\int_V dV (\vec{\nabla}\cdot\vec{r})=3\int_V dV=3V>0.$$ With $$d\vec{S}\parallel\vec{r}$$ follows: $$\hat{dS}\cdot\hat r>0\Rightarrow\hat{dS}=\hat r$$
• Wait... Can't we put -ve sign in$\vec{dS}$; take it out to make area vector as required(outwards) and then convert to volume integral and solve conventionally and finally put negative.??? – Lalit Hooda Jan 19 at 10:57
• No, because the direction of $d\vec{S}$ is defined as being outwards of its enclosed volume as far as I know. But if you do then you are calculating the integral over a different thing, namely the surface $\partial V$ with its vector pointing inwards. So there is no contradiction in having a different result! – Roger Jan 19 at 13:06