$ \begin{align*} \nabla\cdot\bar{D}=\rho & \longrightarrow &\oint\bar{D}\cdot d\bar{S}=\int_V\rho dV=Q_{enc}& \qquad dS_{\rho}=\rho d\phi dz\\ & & &\qquad dV=\rho d\rho d\phi dz \end{align*} $
$ \begin{align*} \text{Line charge:}& & \int_0^L\int_0^{2\pi}D_{\rho}(\rho d\phi dz)&=\rho_{l}(L)\\ & & (2\pi L)D_{\rho}(\rho)&=\rho_{l}(L)\\ & & \bar{D}&=\frac{\rho_{l}}{2\pi\rho}\hat{\rho}\\ \text{Cylinder:}& & & \text{$\rho < 2$:}& &\bar{D}&=0 \\ \text{$2<\rho$:}& & \int_0^L\int_0^{2\pi}D_{\rho}(\rho d\phi dz)&=\rho_{s}(2\pi)(2)(L)\\ & & (2\pi L)D_{\rho}(\rho)&=(2\pi L)2\rho_{s}\\ & & \bar{D}&=\frac{2\rho_{s}}{\rho}\hat{\rho}\\ \text{Superposition:}& &\boxed{\bar{D}= \begin{cases} \frac{\rho_{l}}{2\pi\rho}\hat{\rho}& \rho<2 \\ \left(\frac{\rho_{l}}{2\pi\rho}+\frac{2\rho_{s}}{\rho}\right)\hat{\rho}& 2<\rho \end{cases} } \end{align*} $