# Calculate the flux through a surface S and my approach using Divergence theorem

Since my previous, introductory question Calculate the flux through a surface S from a field described by vectors about this example raised even more questions that I had initially - I was advised to post a new question and below I present my solution of the example, just to make sure if I did that correctly.

The given data: The $F$ and $S$ are as follows ($S$ is oriented outwards): $$\vec{F}=r^2 \cdot \vec{r}$$ $$S: x^2+y^2+z^2=R^2$$ $$\iint\limits_{S} \vec{F} \vec{ds} =\text{ ?}$$

I began with rejecting the use of vector normal to the surface: $$\vec{n}= \frac{\vec{r}}{R}$$ since I have not seen it applied in any other example exploiting Divergence theorem.

Am I right with this?

My solution: (applying advice from @ $$\vec{F}=r^2 \cdot \vec{r}= (r^2x, r^2y, r^2z)$$ $$div\vec{F}=5r^2$$ Then I determined my new set of coordinates and their range: $$V: \left\{ (r, \varphi, \theta) \quad 0 \le r \le R; 0 \le \varphi \le 2\pi; \frac{-\pi}{2} \le \theta \le \frac{\pi}{2}\right\}$$ Then, I calculated the divergence of $\vec{F}$ and substituted the result into the triple integral over the volume described by $S$:

$$\iint\limits_{S} \vec{F} \vec{ds} = \iiint\limits_{V} div\vec{F}\vec{ds}=\iiint\limits_{V} 5r^2 dxdydz = \int_{0}^{R} \left[ \int_{0}^{2\pi} \left[ \int_{ \frac{-\pi}{2} }^{ \frac{\pi}{2} } 5r^2 \cdot R^{2}cos \theta d \theta \right] d \varphi \right] dr =$$

$$=\int_{0}^{R} \left[ \int_{0}^{2\pi} 10r^2 \ R^2 d \varphi \right] dr =20 \pi R^2\int_{0}^{R} r^2 dr=\frac{20}{3} \pi R^{5}$$

1. Is it the right answer?

2. Is the normal vector not supposed to be used here?

• Your definition of F doesn't make any sense. It is a vector quantity yet you define it in terms of a scaler product of two things. – user204299 Sep 4 '15 at 12:25
• @JakeLebovic How should it look like then? – Peter Cerba Sep 4 '15 at 13:40
• As per the last thread, I believe it is just the scalar multiplied by the vector, i.e. $r^2\vec{r}$. – michaelrccurtis Sep 4 '15 at 14:57
• One final point, the volume element given your limits is $r^2\mathrm{cos}(\theta)$ rather than $R^2$. – michaelrccurtis Sep 4 '15 at 23:21

Your intepretation of $\vec{F}$ is wrong. You need to multiply the scalar by each component of the vector.

$$\vec{F} = (r^2x, r^2y, r^2z)$$

Remember that the divergence is defined for a vector field - you can't apply it to a scalar. You can think of it as taking:

$$\nabla\vec{F} = (\partial/\partial x, \partial/\partial y, \partial/\partial z) \cdot (r^2x, r^2y, r^2z)$$

In this case, each term is similar:

$$\frac{\partial}{\partial x}(r^2x) = \frac{\partial (r^2)}{\partial x}x + r^2$$

where

$$\frac{\partial (r^2)}{\partial x} = 2x$$

Putting this together, we get:

$$\nabla\vec{F} = 3r^2 + 2(x^2 + y^2 + z^2) = 5r^2$$

• So, should the $\vec{F}$ be equal to $(x^3+y^2x+z^2x)+(x^2y+y^3+z^2y)+(x^2z+y^2z+z^3)$? – Peter Cerba Sep 4 '15 at 15:49
• $\vec{F}$ is a vector. – michaelrccurtis Sep 4 '15 at 16:06
• Can you please show me what should I put under $div$ operator. I am trying and still do not know how to proceed. I can't figure out how did you get that $div \vec{F}$ is $5r^2$ – Peter Cerba Sep 4 '15 at 16:41
• Do you understand what the divergence is? – michaelrccurtis Sep 4 '15 at 17:37
• Apparently no. Can you describe in detail how did you get from $\vec{F} = (r^2x, r^2y, r^2z)$ to $5r^2$. For me it looks like te result should be $6r^2$, since the derivative of $r^2x, r^2y, r^2z$ versus $dx, dy, dz$ respectively is $3 \cdot r^2=6r^2$. Am I right? – Peter Cerba Sep 4 '15 at 18:16