# I Poisson's equation

1. Mar 3, 2016

### aaaa202

Suppose I have a constant charge density ρ0 for some region 0≤x≤a and zero charge density elsewhere. I want to calculate the electrostatic potential for this charge configuration. The general solution is of course a second order polynomial. But which boundary conditions should I impose on the potential V?

2. Mar 3, 2016

### BvU

Google potential of line charge. It is customary to set V = 0 at infinity when possible.

Or perhaps you mean a slab ? In that case V = 0 at infinity isn't possible ... and we choose V = 0 at x = 0

3. Mar 3, 2016

### aaaa202

Okay makes sense. So say Im confined to one dimension and want to find the potential from a line charge extending from -a<x<a anywhere on the x-axis. If I try to calculate the potential inside the charge distribution i.e. V(x) for -a<x<a I get that the 1/r character makes the integral diverge..
On the other hand if I use Poissons equation I get something sensible for all x.
Is this not weird or am I doing something wrong?

4. Mar 4, 2016

### vanhees71

Show your work! How did you calculate the potential/electric field? Of course, you expect non-analyticities at the place of the line charge, because that's a pretty singular (idealized) charge distribution.

5. Mar 4, 2016

### BvU

That's ambiguous (I think...). So what's the equation you are trying to solve ?

6. Mar 4, 2016

### aaaa202

Well if I am on the x-axis and want to calculate the electrostatic potential I can do it in two ways. I can integrate over the line charge with density λ to find:
But if x is inside the interval -a<x<a then the above integral has a divergence at x=x'.
Now to calculate the potential V I could also use Poissons equation in 1d:
d2V/dx2 = {λ -a < x < a, 0 elsewhere}
The above solution must be parabolic but I am not sure about the boundary condition. Either way I don't see how it could produce the same as the integration approach.
Actually in my problem I have a charge density and I find the electrostatic potential numerically by simply inverting the differential operator d2V/dx2 (which is written as an NxN matrix). In that case what boundary conditions does this procedure choose?

7. Mar 4, 2016

### vanhees71

You mean your $\vec{x}=x \vec{e}_x$. Then your integral is very simple and indeed only defined for $|x|>a$. Assume $x>a$. Then you have
$$V(x)=\frac{\lambda}{4\pi} \int_{-a}^{a} \mathrm{d} x' \frac{1}{x-x'}=\frac{\lambda}{2 \pi} \mathrm{artanh} \left(\frac{a}{x} \right).$$
[corrected from the original version]

As expected, it's defined everywhere except for $x \in [-a,a]$. That it's singular there is expected, because the charge distribution is also singular,
$$\rho(\vec{x})=\lambda \delta(y) \delta(z) \Theta(-a<x<a).$$

Last edited: Mar 4, 2016
8. Mar 4, 2016

### BvU

$$V(x)=\frac{\lambda}{4\pi} \int_{-a}^{a} \mathrm{d} x' \frac{1}{x-x'}=\frac{\lambda}{2 \pi} \mathrm{artanh} \left(\frac{x}{a} \right).$$ I'd expect something like $\log {x+ a\over x - a}$ ?

9. Mar 4, 2016

### aaaa202

Hmm okay but what about solving the Poisson equation? Would that yield the same answer?

10. Mar 4, 2016

### BvU

That's not the Poisson equation !

11. Mar 4, 2016

### aaaa202

Which one?
Isn't this Poissons equation for the system:
d2V/dx2 = {-λ/ε0 -a < x < a, 0 elsewhere}

12. Mar 4, 2016

### BvU

No. You still live in a 3D world, even when you are only interested in the potential on a 1D subspace ! So $\nabla^2V = 0$ is what you have to solve.

(outside the line charge. Inside $(0,0, -a<x<a)$ it's $\nabla^2V =$ $\rho\ \$ with vanHees #7 $\rho$ )

Last edited: Mar 4, 2016
13. Mar 4, 2016

### vanhees71

Of course, you can rewrite the artanh function in terms of a logarithm
$$V(x)=\frac{\lambda}{4 \pi} \ln \left(\frac{x+a}{x-a} \right ).$$
Concerning your further questions, it's clear that you are still in 3D space and you solve the Poisson equation, which reads
$$\Delta V=-\rho,$$
where $\rho$ is the charge density. The solution is
$$V(\vec{x})=\frac{1}{4 \pi} \int_{\mathbb{R}^3} \mathrm{d}^3 \vec{x}' \frac{\rho(\vec{x}')}{|\vec{x}-\vec{x}'|}.$$

Last edited: Mar 4, 2016
14. Mar 4, 2016

### BvU

With |x| > a this doesn't exist....
I'd settle for arctanh(a/x), though ...

And I made a mistake with the sign of $\rho$. TGIF.

15. Mar 4, 2016

### vanhees71

Argh, one should copy results right from Mathematica (it's corrected now also in my original posting), it's
$$V(x)=\frac{\lambda}{2 \pi} \mathrm{artanh} \left (\frac{a}{x} \right)=\frac{\lambda}{4 \pi} \ln \frac{x+a}{x-a}.$$

16. Mar 4, 2016

### BvU

Aren't we having fun ? My comments look a bit silly now, but never mind.

But how is aaaa doing ? All clear as to why you can't get a V on the line charge itself ($\rho$ is infinite there) ?

17. Mar 7, 2016

### aaaa202

Thanks for your answers. I think it makes more sense now. What troubles me is that I have a 1d constant charge distribution in a program, where I am working with everything numerically. And if I invert the discrete operator ∇2 to get the potential as -[∇2]-1ρ/ε0, which is well defined even inside the charge distribution. Why does it not diverge like in the analytical calculation?
So moving on:
Suppose I now have some rectangular box containing a homogenous charge distribution with density ρ0. Then the solution to Poissons equation is that I should calculate the integral:

V(r) = ρ0/4πε0 ∫dr 1/lr-r'l
Is this integral solvable or divergent?

Either way my end goal is to look at what the stable charge distribution is for a rectangular box. I.e. which distribution of charge inside the box will minimize the energy. Is it possible to solve this problem using variational calculus or something like that?

18. Mar 10, 2016

### BvU

You still haven't made clear how you want to have a finite $\rho$ ? You really need that to get an answer within the 'line charge'. Rectangular box, conducting sphere, :
(where have I seen that before ?) equal sign charges want to sit as far away form each other as they can ...

19. Mar 11, 2016

### vanhees71

Again: Point, line or surface charges are not finite. It's an expression containing Dirac-$\delta$ distributions that are singular along the points, lines, and surfaces they are located. These are idealizations of the true charge distribution, which as a coarse-grained macroscopic quantity in reality is always non-singular.