# Laplace equation in 2D Cartesian with mixed boundary conditions

I'm stuck solving $\partial^2 u/ \partial x^2 +\partial^2 u/ \partial y^2=0$ with these boundary conditions:

$$u(x,0)=0, \ \ \ u(x,1)=1 \ \ for \ \ x\in [-a,a],\ a<<1$$ $$\frac{\partial u}{\partial y} \biggr\rvert_{y=0, \ y=1}=0 \ \ for \ \ |x|>a$$ $$\lim_{x\to\infty}\frac{\partial u}{\partial x} = 0, \ \ \frac{\partial u}{\partial x}\biggr\rvert_{x=0}=0 \ \ (symmetry)$$

the infinity condition can cause some problems so I am okay with changing it to $\frac{\partial u}{\partial x}\rvert_{x=L}=0$ for some large $L$.

Basically it's a rectangle of height 1 and infinite width and you apply a temperature of 1 in a small segment $x \in [-a,a]$ at the top $(y=1)$ and temperature 0 in the same segment $x \in [-a,a]$ at the bottom $(y=0)$, and no flux (insulated) everywhere else.

I have tried separation of variables but I cannot get the eigenfunctions to satisfy these boundary conditions. One of them must be exponential which fails to satisfy no-flux at the 2 end points. Laplace or Fourier transforms of the PDE also don't accept mixed conditions like I have. Does anyone have an idea?

• You're solving for $x\in [-a,a]$ and, yet, you have a condition for $|x| > a$. Please fix this. – DisintegratingByParts Mar 29 '16 at 20:34
• I am solving for $x\in[-\infty, \infty], y\in[0,1]$. I have a Dirichlet boundary condition for $x\in[-a, a]$ and Neumann boundary condition for $|x|>a$. If this is bothersome then I said I can change it to solving the PDE in the region $x\in[-L, L], y\in[0,1]$ for some $L>>1$. – Nic Mar 29 '16 at 21:19
• A question: Usually $x$ is the first coordinate and $y$ is the second coordinate: $u(x,y)$. But in your boundary conditions you have $x$ in the 2nd coordinate. Do you mean this to be $u(y, x)$? It matters in the interpretation of those conditions. – Paul Sinclair Mar 29 '16 at 23:00
• I did write it as $u(y,x)$ as a result of carelessness. I can change that in the real post to be consistent with the common $u(x,y)$ convention. I apologize for the confusion this caused. – Nic Mar 30 '16 at 0:05