# Given the electric flux find the total charge in a tiny sphere

1. Nov 16, 2009

### kacete

1. The problem statement, all variables and given/known data
Given the Electric flux density of $$\vec{D}=\frac{100xy}{z^{2}+1}\vec{u_{x}}+\frac{50x^{2}}{z^{2}+1}\vec{u_{y}}+\frac{100x^{2}yz}{(z^{2}+1)^{2}}\vec{u_{x}} C/m^{2}$$ find the total charge inside a tiny sphere with a radius of $$r=1\mu m$$ centered in $$c(5,8,1)$$.

2. Relevant equations
According to Gauss' Law
$$\oint\vec{D}.d\vec{s}=Q_{involved charge}$$
Solution
$$Q=2,26.10^{-14}C$$

3. The attempt at a solution
In the previous exercises, the Electric flux expression was in spheric coordinates, which was easy to integrate using Gauss' Law. In this one I don't know where to begin, cause I tried converting it to spheric coordinates but it turned out to become a huge equation and there must be an easier way to solve it.

Last edited: Nov 16, 2009
2. Nov 16, 2009

### gabbagabbahey

You might try using the divergence theorem here

3. Nov 16, 2009

### kacete

I got the following result:

$$\vec{\nabla}.\vec{D}=\frac{100y}{z^{2}+1}-\frac{400x^{2}y^{2}z}{(z^{2}+1)^{3}}$$

Then I replaced with the coordinates and got:

$$\vec{\nabla}.\vec{D}=-79600$$

Calculated the sphere volume:

$$V=\frac{4\pi r^{3}}{3}$$

And multiplied both:

$$Q=-3.334.10^{-13}$$

It's close, but still not the right solution, what did I do wrong?

4. Nov 16, 2009

### gabbagabbahey

You seem to be missing a term here.

You replaced with what coordinates, and why?

5. Nov 18, 2009

### kacete

No, since it does not contain an y variable, the derivate in order of y is 0.

I replaced the variables with the coordinates for the center of the sphere to find the value in that region.

6. Nov 18, 2009

### gabbagabbahey

You are still missing a term:

$$\frac{\partial}{\partial z}\left(\frac{100x^2 y z}{(z^2+1)^2}\right)\neq -\frac{400x^{2}y^{2}z}{(z^{2}+1)^{3}}$$

But that only gives you the value of the divergence at the center...the divergence theorem tells you to integrate the divergence over the entire volume of the sphere....which means you need to know its value everywhere in the sphere, not just at the center.

7. Nov 21, 2009

### kacete

$$\frac{\partial}{\partial z}\left( - \frac{100x^2 y z}{(z^2+1)^2}\right)=\frac{100(3z^{2}-1)x^{2}y}{(z^{2}+1)^{3}}$$
You're right, I corrected it. (plus i had a typo in my problem, the last one - in direction of z - is negative).

I thought that too. But I don't know how to integrate to the whole sphere using cartesian coordinates.

Last edited: Nov 21, 2009
8. Nov 21, 2009

### gabbagabbahey

Then switch to spherical coordinates, centered at $c$...

$$(x-5)=r\sin\theta\cos\phi$$
$$(y-8)=r\sin\theta\sin\phi$$
$$(z-1)=r\cos\theta$$

...

9. Nov 22, 2009

### kacete

Of course, but I have to switch the divergence calculated before to spherical coordinates too, right?

10. Nov 22, 2009

### gabbagabbahey

Yes, of course....

11. Nov 25, 2009

### kacete

Is there no easier way of solving this rather than integrating the following?

$$\int^{10^{-6}}_{0} \int^{ \pi }_{0} \int^{2 \pi }_{0} \left( \frac{100(rsin \theta sin \phi +8)}{(rcos \ntheta +1)^{2} +1} - \frac{100(3(rcos \theta +1)^{2}-1)(rsin \theta cos \phi +5)^{2}(r sin \theta sin \phi )^{2}}{((rcos \theta +1)^{2}+1)^{3}}\right) r^{2} sin \theta d \phi d \theta dr$$

I'm having a hard time doing so. Even in my TI-89.

12. Nov 27, 2009

### gabbagabbahey

First, it looks like you have some typos/minor errors in that expression that you'll want to correct.

Second, I don't think you really need an exact solution here.... assuming the "1" in your $z^2+1$ terms is $1\text{m}^2$, then $r^2\cos\theta\leq 10^{-12}\text{m}^2$ is going to be very small in comparison and can be neglected...similar arguments can be used for $r\sin\theta\sin\phi+8$ and similar terms, giving you a much easier (approximate) expression to integrate.

13. Nov 28, 2009

### kacete

Thank you, I will try that!