# Find the charge using its density

## Homework Statement

A ball whose its center on the origin, with radius of 0.2m, and contains a charge density $\frac{2}{\sqrt{x^{2}+y^{2}}}c/m^{3}$

## Homework Equations

$D=\frac{\psi}{S}=\frac{\psi}{4\pi r^{2}}$

Where $\psi=Q$.

## The Attempt at a Solution

The density is $c/m^{3}$, which is volume not surface.
Anyway, I've used the previous equation $\frac{2}{\sqrt{x^{2}+y^{2}}}=\frac{Q}{4×\pi ×0.2^{2}} \rightarrow Q=\frac{2×4×\pi×0.2^{2}}{\sqrt{x^{2}+y^{2}}}$

Is that right?

Simon Bridge
Homework Helper
You have to integrate the density over the sphere volume.

You mean $\int\limits_0^{2\pi} \int\limits_0^ \pi \int\limits_0^{0.2} \frac{2}{\sqrt{x^{2}+y^{2}}} r^{2} sin\theta dr d\theta d\phi$?

CAF123
Gold Member
The density is $c/m^{3}$, which is volume not surface.
Anyway, I've used the previous equation $\frac{2}{\sqrt{x^{2}+y^{2}}}=\frac{Q}{4×\pi ×0.2^{2}} \rightarrow Q=\frac{2×4×\pi×0.2^{2}}{\sqrt{x^{2}+y^{2}}}$
That formula would give you a charge per unit area and is only applicable when the density is uniform.

You mean $\int\limits_0^{2\pi} \int\limits_0^ \pi \int\limits_0^{0.2} \frac{2}{\sqrt{x^{2}+y^{2}}} r^{2} sin\theta dr d\theta d\phi$?
Yes, ##Q = \int \rho\,\text{d}V## in general and only when ##\rho## is not dependent on V (i.e is uniform throughout the volume) does this simplify to ##Q = \rho \int \, \text{d}V = \rho V##. But you should express your integrand in spherical polar coordinates.

ehild
Homework Helper
You mean $\int\limits_0^{2\pi} \int\limits_0^ \pi \int\limits_0^{0.2} \frac{2}{\sqrt{x^{2}+y^{2}}} r^{2} sin\theta dr d\theta d\phi$?

yes, but express x2+y2 also in terms of spherical coordinates.

ehild

Simon Bridge
Homework Helper
That's what I had in mind - yep.
The symmetry of the density function suggests cylindrical-polar may be better.
Maybe look at the shell method?

in general, the volume element ##\text{d}V## at position ##\vec r## has charge ##\text{d}q=\rho(\vec r)\text{d}V##

The total charge ##Q## in a volume ##V## is the sum of all those ##\text{d}q## elements: ##Q=\int_V\text{d}q##

Always start with a sketch - try to understand the density function: where is it a maximum, where a minimum, how does it change, etc?