Hello
@Fernando Valadares,
Welcome to PF!
Fernando Valadares said:
Homework Statement
The electric flux density in free space produced by an oscillating electric charge placed at the origin is given by
\vec{D}=\hat{r}\frac{10^{-9}}{4\pi r^2}cos(wt-\beta r), \ \ where \ \beta=w \sqrt{\mu_0 \epsilon_0}
Find the time-average charge that produces this electric flux density
Homework Equations
div\vec{D}=\rho \ (1) \\ \int_S \vec{D}.\vec{ds}=Q_{int} \ (2)
The Attempt at a Solution
This is the exercise 1.9 from Balanis' Advanced Engineering Electromagnetics. As the charge is oscillating, we can see a propagation delay in the cosine argument. Applying the divergent in D in spherical coordinates, we get the value
div\vec{D}=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2 cos(wt-\beta r)\frac{10^{-9}}{4\pi r^2}) = \beta sin(wt-\beta r)\frac{10^{-9}}{4\pi r^2}
I think you missed a minus sign in there. 
Other than that, it looks good to me so far.
[Edit: Ooops. That minus sign was my mistake, not yours.

Sorry about that. Your answer looks good as it is.

]
And that is the value of the charge density. As expected, it goes to infinity when r→0, but it isn't zero when r≠0. In the other hand, equation (2) gives the value of internal charge Qint=10-9cos(wt-βr), as expected from a oscillating punctual charge.
That also looks good to me.
Why equation (1) gives a wrong value?
Besides the absence of the minus sign in your first answer, they both look correct to me.
Perhaps you are confusing
charge density with the
charge itself.
In order to determine the charge from the charge density, you must integrate the charge density over the volume. You cannot simply multiply times the volume of the Guassian surface in this case because the charge density is not uniform (it is dependent upon
r).
You really need to do the integration when doing this approach.
Q_{int} = \iiint_V \rho \ dV
where dV is the volume element and, depending on the variables you use for your spherical coordinate system, will be of the form:
dV = r^2 \sin \theta \ dr \ d \theta \ d \phi
(I don't have Balanis'
Advanced Engineering Electromagnetics, so I don't know what conventions the book uses. I'm just saying the volume element will look something like above, although it might use different variables or have variables swapped around. You should use what your book uses.)
So first, fix that negative sign in charge density, \rho.
Second, [well, first actually] evaluate that volume integral of the charge density and it should match your second answer. Good luck!
