dingo_d
- 199
- 0
Homework Statement
Find the potential \phi and electric field \vec{E} for homogenous charged line segment with the length 2a, that lies between a and -a along the z-axis, if the total charge on the segment is q
Homework Equations
\phi(\vec{r})=\int\frac{\rho(\vec{r}')}{|\vec{r}-\vec{r}'|}d\tau '
\vec{E}=-\nabla\phi
The Attempt at a Solution
So since I have line segment on z-axes I set:
\vec{r}'=z'\hat{z},\ z\in[-a,a] so the distance between the point where I look the potential and the charged segment is:
|\vec{r}-\vec{r}'|=\sqrt{x^2+y^2+(z-z')^2}.
I'm dealing with line segment so my charge density is:
\rho(\vec{r}')d\tau'=\lambda dz', where \lambda=\frac{q}{2a}.
So after putting that all in integral I get:
\phi(\vec{r})=\frac{q}{2a}\int_{-a}^a\frac{dz'}{\sqrt{x^2+y^2+(z-z')^2}}
and the result (by checking Bronstein and Semendyayev, even Mathematica) is:
\phi(\vec{r})=\frac{q}{2a}\ln\left(\frac{z+a+\sqrt{x^2+y^2+(z+a)^2}}{z-a+\sqrt{x^2+y^2+(z-a)^2}}\right).
Now I got the solved problems hand written from a guy who finished this course years ago and in his notes it says that the solution is:
\phi(\vec{r})=\frac{q}{2a}\ln\left(\frac{z-a+\sqrt{x^2+y^2+(z-a)^2}}{z+a+\sqrt{x^2+y^2+(z+a)^2}}\right).
And he wrote that that's the same result as from the book where he got it (didn't mention the name -.-)...
So what am I doing wrong?