# Finding V for a 2D box using separation of variables.

1. Oct 9, 2010

### maherelharake

1. The problem statement, all variables and given/known data

We have a 2-dimensional box with only one side at a potential V0. The other 3 sides are grounded. The box is a square with top and bottom at y=a/2 and –a/2 and sides at x=±a/2. Find V(x,y) (it should contain cos and sinh).

2. Relevant equations

3. The attempt at a solution
I need help with this whole problem. Maybe if I get a start, I can work through it. Thanks.

2. Oct 9, 2010

### diazona

What do you know that might be relevant? Specifically, what differential equation must be satisfied by the electric potential within some space?

3. Oct 9, 2010

### maherelharake

Hmmm, well I know Laplace's equation. In the book they also convert Laplace's into two ordinary differential equations.
V(x,y)=(Aekx+Be-kx)(Csin(ky) + Dcos(ky))

4. Oct 9, 2010

### diazona

Right, you would use Laplace's equation. Are you familiar with the methods used to solve that equation? (I see you posted a component of the general solution)

If so, find the specific values of A, B, C, and D that correspond to the boundary conditions given.

5. Oct 9, 2010

### maherelharake

I'm not sure what you mean by the methods. I think the only one our book/prof discussed was separation of variables. This method leads to what I posted. I hope that is the equation I can use for this problem. Is it not?

6. Oct 9, 2010

### diazona

Yes, separation of variables was basically what I was talking about. You can use separation of variables to separate Laplace's 2D equation into two one-variable differential equations. Then you will need to use some other technique(s) to solve each of those one-variable equations, and combine the solutions of the one-variable equations to get the solution of the full 2D Laplace equation. That's what you posted. So yes, that is what you use for this problem.

More accurately, if I remember correctly, the general solution of Laplace's equation will be a sum of what you posted for different values of k.
$$V(x,y) = \sum_i[A_i e^{k_i x} + B_i e^{-k_i x}][C_i \sin(k_iy) + D_i \cos(k_iy)]$$
You will need to find which choices of the coefficients will make that solution satisfy the given boundary conditions.

7. Oct 9, 2010

### maherelharake

Ok I will try this and let you know how I do in the morning. Thanks.

8. Oct 10, 2010

### maherelharake

Ah ok I didn't make it very far. I set up all the boundary conditions, and tried to solve for them. I was reading through my book and found that when the situation is symmetric with respect to x, A=B. I currently have the equation...
V(x,y)=cosh(kx)(Csin(ky)+Dcos(ky))

I'm not sure how to get this to satisfy my boundary conditions. By the way, the conditions I got are:
V=V0 when y=a/2
V=0 when y=-a/2
V=0 when x=a/2
V=0 when x=-a/2

9. Oct 10, 2010

### diazona

It is admittedly tricky. I haven't done this sort of thing in a while so I don't remember if there is a systematic method.

Anyway, for starters, you have to remember that the solution for V is a sum of products with different values of k, as I wrote in my previous post. Finding out that $A_k = B_k$ is a good start. The next thing I'd think about is what values of k are allowed.

Consider a fixed value of x. At that fixed x, the potential will form some function in y. Your expression for that function is basically a Fourier series,
$$V(x_0, y) = \sum_i C_i' \cos(k_iy) + D_i' \sin(k_iy)$$
where
$$C_i' = 2A_i C_i$$
and similarly for Di'. Now, when you're writing a Fourier series for a function that has a domain of width a, do you know what the possible values of k are? (Hint: this is equivalent to writing the series for a function that is periodic with period a.)

10. Oct 10, 2010

### maherelharake

I'm not sure how you realized C'=2AC

As far as the question you asked, would it be k=nPi/a? They had this in the book too.

11. Oct 10, 2010

### diazona

I didn't realize it, I defined it. It's just to make the equation look more like a Fourier series. If it bothers you, we can certainly go back to writing 2AiCi.
Almost. I think you're off by a factor of 2.

12. Oct 11, 2010

### maherelharake

Oh ok I see it now. I think it's supposed to be k=2nPi/a. So is the next step using Fourier's trick?

13. Oct 11, 2010

### maherelharake

I can't seem to get all of the conditions to be satisfied. I am getting D has to be equal to 0, but I am unsure if that is correct.

14. Oct 11, 2010

### maherelharake

I have one more update. My professor changed the original question to this:

Show that after applying x boundary conditions, the general result is a sum over terms Vn(x,y) = cos(kn x) * (An cosh (kn y) + Bn sinh (kn y)).

Finally, find the result for An and Bn in terms of a and V0

He also hinted that properties of sinh and cosh are important.

15. Oct 11, 2010

### diazona

OK, well in light of the updated question, have you been able to show that the general result is a sum over terms of that form?

16. Oct 11, 2010

### maherelharake

Hmm not really. I thought we were supposed to worry about the "sum over terms" part towards the end. Maybe I have confused the order of how to find the solution.

17. Oct 12, 2010

### maherelharake

I have gotten nowhere with this problem. It's due Thursday morning for me. Any help would be appreciated, if not I understand.

18. Oct 13, 2010

### diazona

Sorry about that, I got rather busy myself. I'll see if someone else can take a look at it.

But as far as showing that the general solution is a sum over terms, you will have to apply the technique of separation of variables. After that, use the domain of the solution (i.e. the fact that it is of width a) to determine the allowed values of the separation constant. (Actually I guess you already did that earlier on this thread)

19. Oct 14, 2010