# Electric field of given charge density

Given the charge density $$\rho(\vec{x})=\rho_0\delta(x_1)\delta(x_2),$$ where $$\delta$$ denotes the Dirac-distribution and $$\vec{x}=(x_1,x_2,x_3)$$, I am asked to calculate the electric field which is generated by this charge density, i.e. I have to evaluate the integral $$\int_{\mathbb{R}^3}d^3x'\frac{\rho_0\delta(x_1')\delta(x_2')}{|\vec{x}-\vec{x}'|^3}(\vec{x}-\vec{x}').$$

I am having trouble doing so! I know that

$$\int\delta(x-x')f(x)dx=f(x')$$ but I dont know what happens with the $$x_3$$ component in the above integral.

I dont want a solution to the integral, I just would like to know how to perform this kind of integral, especially the component without a $$\delta$$.

• Something is wrong with your charge distribution. It does not depend on $\vec{x}$. Consequently they can be pulled out of the integral, no? Is something wrong with the way this is written, or am I missing something? Apr 25, 2020 at 12:09
• @garyp I am sorry, I edited the question Apr 25, 2020 at 12:12
• I see you made an edit at the same time I posted my comment. Still, your charge distribution doesn't depend on $\vec{x}$. Apr 25, 2020 at 12:13
• @AlmostClueless is right. So $\rho(\vec{x})=\rho((x_1,x_2,x_3))=\delta(x_1)\delta(x_2))$ Apr 25, 2020 at 12:18
• Perhaps you should edit the question to make clear that $\vec{x} = (x_1, x_2, x_3)$ I know you have it in the comments, but it would help people reading this for the first time to see it up front. Apr 25, 2020 at 12:27

First of all, it helps to imagine the geometry of your problem. So to imagine the physical form of $$\rho(\vec x) = \rho_0 \delta(x_1) \delta(x_2) \quad,$$ which is just an infinite line along the $$x_3$$-axis. So maybe this helps you to calculate the electric field, since now you are able to see the symmetry of the problem and you could know that cylindrical coordinates and Gauss' law might help you out a little.
The integral $$\int_{\mathbb R^3} \text d ^3x' \frac{\rho_0 \delta(x_1') \delta(x_2')}{|\vec x - \vec x'|^3}(\vec x - \vec x')$$ is a set of $$3$$ integrals. Lookin at the first component: \begin{align} 4 \pi \epsilon_0 E_1 &= \int_{\mathbb R^3} \text d ^3x' \frac{\rho_0 \delta(x'_1) \delta(x'_2)}{((x_1 - x_1')^2 + (x_2 - x_2')^2 + (x_3 - x_3')^2)^{\frac 3 2}}(x_1 - x'_1)\\ &=\int_{\mathbb R}\text{d}x'_3 \frac{\rho_0 x_1}{(x_1^2 + x_2^2 + (x_3 - x_3')^2)^{\frac 3 2}}\\ &= 2 \rho_0 \frac{x_1}{x_1^2 + x_2^2} \end{align} The same goes for the second component: \begin{align} 4 \pi \epsilon_o E_2 = 2\rho_0 \frac{x_2}{x_1^2 + x_2^2} \end{align} The third component is $$0$$ since: $$\int_{\mathbb R}\text d x'_3 \frac{(x_3 - x'_3)}{(x_1^2 + x_2^2 + (x_3 - x_3')^2)^{\frac 3 2}} = 0$$ I leave it to you to interpret the result.
Actually, $$\int\delta(x-x')f(x')dx'=f(x)~.$$ By substituting $$f(x)=\frac{\vec{x}-\vec{x'}}{|\vec{x}-\vec{x}'|^3}$$ you will get the desired result.