Laplace’s equation solution for square

partial differential equations

I wanted to solve Laplace equation $\Delta u(x,y)=0$ on the square $0≤x,y≤1$ with boundary conditions $u(x,0) = u(x,1) =0,∂_{x}u(0,y) = sin(πy), ∂_{x}u(1,y) = sin(3πy)$.

I'v written

I wanted to solve Laplace equation $\Delta u(x,y)=0$ on the square $0≤x,y≤1$ with boundary conditions $u(x,0) = u(x,1) =0,∂_{x}u(0,y) = sin(πy), ∂_{x}u(1,y) = sin(3πy)$.

I'v written

$u(x,y)= u_{0} + \theta_{2} + \theta_{4}$

For $x=1$

$\theta_{2}(1,y)=\sum(A_{n}sinh( n \pi)+B_{n}cosh(n \pi)) sin (n \pi y)$

$\theta_{4}(1,y)=?$

For $x=0$

$\theta_{2}(0,y)=?$

$\theta_{4}(0,y)=?$

How to use derivative in boundary condition to solve equation?

Best Answer

The general solution satisfying the boundary conditions $u(x,0)=u(x,1)=0$ is

$$u(x,y)=\sum_{n=1}^{\infty}[A_n\sinh(n\pi x)+B_n\cosh(n\pi x)] \sin(n\pi y),$$

so

$$\partial_x u(x,y)=\sum_{n=1}^{\infty}[n\pi A_n\cosh(n\pi x)+n\pi B_n\sinh(n\pi x)] \sin(n\pi y).$$

Applying the boundary condition $\partial_x u(0,y)=\sin(\pi y)$, the above equation yields

$$\sum_{n=1}^{\infty}n\pi A_n \sin(n\pi y)=\sin(\pi y),$$

which implies $A_1=\frac{1}{\pi}$ and $A_n=0$ for $n\neq 1$. Applying the boundary condition $\partial_x u(1,y)=\sin(3\pi y)$ we obtain

$$[\cosh(\pi)+\pi B_1\sinh(\pi)]\sin(\pi y)+\sum_{n=2}^{\infty}n\pi B_n\sinh(n\pi) \sin(n\pi y)=\sin(3\pi y),$$

which implies $B_1=-\frac{1}{\pi}\coth(\pi),\, B_3=\frac{1}{3\pi}\operatorname{csch}(3\pi) $, and $B_n=0$ for $n\notin\{1,3\}$. Inserting all these results in the expression for $u(x,y)$, we finally obtain

$$u(x,y)=\frac{1}{\pi}[\sinh(\pi x)-\coth(\pi)\cosh(\pi x)]\sin(\pi y)+\frac{1}{3\pi} \operatorname{csch}(3\pi)\cosh(3\pi x)\sin(3\pi y). $$

Related Question