Electric Potential of an electric rod 
I am trying to find the electric potential of a rod with the following charge density function:
$$\rho (\vec r)=k\delta(x)\delta(y)\theta(a - |z|).$$

From the way that the charge density function looks like, I can understand that the rod has no radius in the xy-plane and it stretches from -a to a in the z- axes.
I am trying to find the electric potential in cylindrical coordinates $\Phi(\rho , \phi,z)$ by using the known equation for it:
$$\Phi(\vec r)= \frac {1 \cdot k}{4 \pi \epsilon_0} \cdot \int_V \frac {\rho (\vec r)}{|\vec r - \vec r'|}$$.
But the problem I am facing is that I don't know how to manage the delta function in cylindrical coordinates.That's why I thought of trying to solve the equation in cartesian and then convert in cylindrical but that doesn't work either, or maybe it's to difficult for me. So I thought of doing it the way I said above, by using cylindrical coordinates, but I am unfamiliar with how delta works in this case because $\delta (x)$ in cylindrical becomes $\delta (\rho \cos \phi)$ and I don't know how the integration works in this case. Can anyone give me tips on how to proceed past this point ?
 A: I think it's easiest to do this in Cartesian coordinates, then convert back to cylindrical at the end. The potential at position $\mathbf{r}$ is
$$V(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int_{-a}^{a}{\left[\iint_{\mathcal{R}}{\frac{k\delta(x')\delta(y')}{\sqrt{(x - x')^2 + (y-y')^2 + (z - z')^2}}\,dx'dy'}\right]\,dz'},$$
where $\mathcal{R}$ is a region in $\mathbb{R}^2$ containing the origin. (You can think of this as a disk around the $z$-axis.) The 2D Delta function, $\delta^2(x', y') = \delta(x')\delta(y')$, "picks out" the value of the function $\frac{k}{|\mathbf{r} - \mathbf{r}'|}$ when $x' = 0 = y'$. So our expression for the potential simplifies to
$$V(\mathbf{r}) = \frac{k}{4\pi\epsilon_0}\int_{-a}^{a}{\frac{1}{\sqrt{x^2 + y^2 + (z - z')^2}}\,dz'}.$$
You can evaluate this integral with a trigonometric substitution (keep in mind that $x$, $y$, and $z$ are being treated as constants here). The result is
$$\boxed{V(\rho, z) = \frac{k}{4\pi\epsilon_0}\ln\left(\frac{z + a + \sqrt{(z+a)^2 +\rho^2}}{z-a +\sqrt{(z-a)^2 + \rho^2}}\right)},$$
where $\rho^2 = x^2 + y^2$. The potential is independent of $\varphi$, as it should be. Notice also that as $\rho \rightarrow \infty$ (or $z \rightarrow \infty$), the expression inside the natural log $\rightarrow 1$, meaning that $V \rightarrow 0$.
A: Defining the charge density with a delta function in cylindrical coordinates just means that when we integrate over all space, we'd better recover the total charge.
In Cartesian coordinates:
$$\int_{-\infty}^\infty\int_{-\infty}^\infty\int_{-\infty}^\infty k\delta(x)\delta(y)\theta(a-|z|)dxdydz$$$$=2\int_{0}^a\int_{-\infty}^\infty\int_{-\infty}^\infty k\delta(x)\delta(y)dxdydz$$
$$=2ka$$
In cylindrical coordinates, we'd better satisfy:
$$2ka=\int_0^\infty\int_0^{2\pi}\int_{-\infty}^\infty \rho_{cyl}(r, \theta, z) r dz d\theta dr$$
$\rho_{cyl}$ cannot have $\theta$ dependence, since the problem is rotationally symmetric in the xy plane. We keep the $\theta(a-|z|)$ term, since our coordinates did not transform. Furthermore, we know the charge is localized to $r=0$, therefore $\rho_{cyl}$ must also have a $\delta(r)$. Therefore
$$2ka=\int_0^\infty\int_0^{2\pi}\int_{-\infty}^\infty C(r)\delta(r)\theta(z-|a|) r dz d\theta dr$$
$$=(2\pi)(2a)\int_0^\infty C(r)\delta(r) r dr$$
Thus we find that $C(r)=\frac{k}{2\pi r}$, or that $$\rho_{cyl}(r,\theta,z)=\frac{k}{2\pi r}\delta(r)\theta(z-|a|)$$
because when you integrate this expression, you get the correct result.
For less-handwaving, to perform the change of variables for the $\delta$ functions from Cartesian to cylindrical coordinates, you need to multiply by the Jacobian of the coordinate transformation ($dxdydz=rdrd\theta dz$), and recall that $$\delta(f(x))=\sum_{x_i}\frac{\delta(x-x_i)}{f'(x_i)}$$
