Finding electric flux given volume charge density Question:
Let $\rho_v = 8z(1 - z)$ C/m$^3$ for $0 < z < 1$ m, $8z(1 + z)$ C/m$^3$ for $-1<z<0$, and $0$ for $|z| > 1$.
(a) Find $\vec{D}$ everywhere.
(b) Sketch $\vec{D}_z$ vs. $z$, $-2<z<2$.
Attempt at Solution:
I know that $\vec{D} = \int\limits_{volume}\frac{\rho_vdv}{4\pi{}r^2}\hat{a}_r$. My problem here is setting up the limits of integration for the (what I assume will be a) triple integral. The problem makes no mention of what type of volume has this charge distribution, so it is really confusing me. Is it maybe a plane in the $x-y$ region? Even if so, what would the limits of integration be? My guess for the $0<z<1$ region is $\int_0^1\int_0^y\int_0^x\frac{8z(1-z)}{4\pi{x^2 + y^2 +z^2}}\hat{a}_rdxdydz$, but I'm really not sure how I would find $\hat{a}_r$, and I am not confident in my limits of integration. Once I figure out this region, I think I should be easily able to apply this method to $-1<z<0$, but I'm not too sure about $|z|>1$.  
For Part (b), how do I find $\vec{D}_z$ once I've found $\vec{D}$?
 A: The charge density is a "slab" of infinite extent in $x$ and $y$.  We first  note from the symmetry of the charge density, that the electric flux will have only a $z$ component and only depend on $z$.  We can use Coulomb's Law to show this directly.  To that end, we write
$$\vec D(\vec r)=\frac{1}{4\pi}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\rho_{\ell}(z')\frac{\hat x(x-x')+\hat y(y-y')+\hat z(z-z')}{\left((x-x')^2+(y-y')^2+(z-z')^2\right)^{3/2}}\,dx'\,dy'\,dz' \tag 1$$
Enforcing the substitution of variables, $x-x'\to x'$ and $y-y'\to y'$, $(1)$ can be written 
$$\begin{align}
\vec D(\vec r)&=\frac{1}{4\pi}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\rho_{\ell}(z')\frac{\hat xx'+\hat yy'+\hat z(z-z')}{\left(x'^2+y'^2+(z-z')^2\right)^{3/2}}\,dx'\,dy'\,dz' \tag 2\\\\
&=\frac{1}{4\pi}\int_{0}^{2\pi}\int_{0}^{\infty}\int_{-\infty}^{\infty}\rho_{\ell}(z')\frac{\hat x\rho' \cos \phi'+\hat y\rho' \sin \phi'+\hat z(z-z')}{\left(\rho'^2+(z-z')^2\right)^{3/2}}\,\rho' d\rho'\,d\phi'\,dz' \tag 3\\\\
&=\frac{1}{4\pi}\int_{0}^{2\pi}\int_{0}^{\infty}\int_{-\infty}^{\infty}\rho_{\ell}(z')\frac{\hat z(z-z')}{\left(\rho'^2+(z-z')^2\right)^{3/2}}\,\rho' d\rho'\,d\phi'\,dz' \tag 4\\\\
&=\frac12 \,\hat z\int_{0}^{\infty}\int_{-\infty}^{\infty}\rho_{\ell}(z')\frac{z-z'}{\left(\rho'^2+(z-z')^2\right)^{3/2}}\,\rho' d\rho'\,dz' \tag 5 \\\\
&=\frac12 \,\hat z\int_{-\infty}^{\infty}\frac{\rho_{\ell}(z')(z-z')}{|z-z'|}\,dz' \tag 6 \\\\
&=\frac12 \,\hat z\int_{-1}^{1}\frac{8z'(1-|z'|)(z-z')}{|z-z'|}\,dz' \tag 7\\\\
\end{align}$$
In going from $(2)$ to $(3)$ we transformed the integration over $x$ and $y$ to integration in polar coordinates.  
In arriving at $(4)$, we exploited the fact that $\sin \phi'$ and $\cos \phi'$ integrate to zero.
In going from $(4)$ to $(5)$, we noted that the integrand was independent of $\phi'$ and carried out the trivial integration over $\phi'$.  We also factored out the unit vector $\hat z$.
In going from $(5)$ to $(6)$, we integrated over $\rho'$.
In arriving at $(7)$, we used the specific form of the charge density.
Can you finish from here?  Be careful with the absolute values in the integral of $(7)$.  One needs to consider the following cases: (i) $z<-1$, (ii) $-1<z<0$, (iii) $0<z<1$, and (iv) $1<z$.
