# Homework Help: Integral of solids with linearly decreasing charge density

1. Jan 17, 2012

### Aesteus

1. The problem statement, all variables and given/known data

Calculate the total charge embodied in a solid with charge density that decreases linearly with height from a value of λ at the bottom to 0 at the top.
Solve for a rectangular prism and a sphere.

2. Relevant equations

∫∫∫ρdxdydz
∫∫∫pr^2sinθdrdθd∅

3. The attempt at a solution

For a rectangular prism, I integrated from 0 to x,y for dx,dy and lambda to 0 for dz. I ended up with Q=x*y*ρ*some function of λ. However, something seems off about this approach, because the charge at any x and y varies with height.

I think if I can get the logic behind the prism, I'll be able to understand the sphere, but any other advice would be helpful.

Last edited: Jan 17, 2012
2. Jan 17, 2012

### Aesteus

Anyone have an idea?

3. Jan 17, 2012

### Curious3141

The charge enclosed in an element of height dx is given by $\rho(x)A(x)dx$ where $\rho(x)$ is a function that expresses the volume-charge density at a given height x from the base. A(x) denotes the area function, i.e. the cross-sectional area of a slice taken at height x from the base. x varies from 0 to h, the height of the figure.

Work out an expression for $\rho(x)$ in terms of $\lambda$, h and x first (easy, since it's a linear relationship) - this applies to both figures. Then it's just a matter of evaluating the integral in each case between the bounds of 0 and h. For the rectangular prism (which is a cuboid), A(x) is a constant. For the sphere, A(x) follows the area of a disc. (For the sphere, h = 2R, where R is the radius).

After you get the final expression, you should be able to rearrange to express it in terms of $\lambda$ and the volume V alone. When you do this, you will discover an interesting insight.

Last edited: Jan 17, 2012