# Laplace's equation on a rectangle with mixed boundary conditions

1. Sep 15, 2008

### nathan12343

1. The problem statement, all variables and given/known data
Solve Laplace's equation inside the rectangle $0 \le x \le L$, $0 \le y \le H$ with the following boundary conditions

$$u(0,y) = g(y)\text{, } u(L,y) = 0\text{, } u_y(x,0) = 0\text{, and } u(x,H) = 0$$

2. Relevant equations

3. The attempt at a solution

I know that with Dirichlet boundary conditions one can simply superpose 4 solutions to 4 other problems corresponding to one side held fixed and the others held at 0. Can the same technique be generalzed for mixed boundary conditions, like I have above? I don't think so, because when I do that the solution I get for
$$u(0,y) = g(y)\text{, } u(L,y) = 0\text{, } u(x,0) = 0\text{, and } u(x,H) = 0$$
does not satisfy $u_y(x,0) = 0[/tex]. Does anyone have a hint for how I might find solutions which simultaneously satisfy the boundary condition at [itex]u(0,y)\text{ and for }u_y(x,0)$?

2. Sep 16, 2008

### gabbagabbahey

Why not find the general 2D solution to Laplace's equation, using separation of variables (i.e. $$u(x,y) \equiv X(x)Y(y)$$)and then substitute your boundary conditions to find the particular solution?

3. Sep 16, 2008

### HallsofIvy

Staff Emeritus
Let v(x,y)= u(x,y)- xg(y)/L

Then $\nabla^2 v= \nabla^2 u- xg"(y)/L= -xg"(y)/L$ since $\nabla^2 u= 0$.

The boundary conditions on v are v(0,y)= 0, v(L, y)= g(y)- g(y)= 0, vy(x, 0)= -xg'(0)/L, v(x,H)= -xg(H)/L.

Because the boundary conditions on x are both 0, you can write v as a Fourier sine series:
$$v(x,y)= \sum_{n=1}^\infty A_n(y)sin(n\pi x/L)$$

You will need to write -xg"(y)/L as a Fourier sine series in x so you can treat g"(y) as a constant.