Triple integral problem related with charge density A cylinder of radius $s$ and length $l$ carries a charge density that is proportional to the distance from the axis. The charge density is given by $p=kr$. I need to find the total charge in the cylinder.
What I did is that I took $r=(z^2+ y^2)^{1/2}$. Then 
$$ {\rm Total\ charge} = \int k (z^2+y^2)^{1/2}\ dzdydx$$ with $z$ any ranging from $0$ to $S$ and $x$ ranging from $0$ to $l$.
Is this correct . If it's correct how should I solve it ?  What would be the case  if the cylinder was hollow and what would be the Integral if instead of a cylinder we had a sphere ?
I want to solve the Integral Cartesian coordinates

Yes, you are on the right track. 
The total charge 0f the full cylinder is
$$\int_{x=0}^l\int_{\theta=0}^{2\pi}\int_{\rho=0}^s k\rho\cdot (\rho d\rho d \theta dx)=\frac{2\pi k ls^3 }{3} .$$
If the cylinder is hollow then the total charge density is simply the lateral area of the cylinder multiplied by surface density (which is constant in your case).
Would you like to try the sphere case?
P.S. As regards the sphere centred at $0$ of radius $a$ take $f(x,y,z)$ as the density and look here: Cartesian to Spherical Coordinate Conversion for Triple Integral
