I'm trying to solve the following Laplace equation analytically: \begin{align*} \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} &= 0 \end{align*} Subject to the boundary conditions: \begin{align*} u(0, y) &= 0 \\ u(\pi, y) &= 0 \end{align*} \begin{align*} u(x, 0) &= \sin\left(\frac{x}{2}\right)\\ \end{align*} \begin{align*} u_y(x, 0) &= 0 \end{align*}
I tried to find the analytical solution as follows
Assume a Solution Form: Start by assuming that the solution can be written as \begin{align*} u(x, y) = X(x)Y(y) . \end{align*}
Substitute into Equation: \begin{align*} X''(x)Y(y) + X(x)Y''(y) = 0 \end{align*}
Separate Variables: Divide the equation by $X(x)Y(y)$ to separate the variables: \begin{align*} \frac{X''(x)}{X(x)} = -\frac{Y''(y)}{Y(y)} \end{align*} This implies that each side must be equal to a constant, which we can call $-\lambda$, because $x$ and $y$ are independent.
Form Two Ordinary Differential Equations (ODEs): We now have two separate ODEs:
\begin{align*} \;\;\;\;\;\;\;X''(x) + \lambda X(x) = 0 \\ Y''(y) - \lambda Y(y) = 0 \end{align*}
- Solving the Ode's and combining the different solutions:
\begin{align*}
u(x,y) = \frac{\pi}{8} \sum_{n=1}^{\infty} (-1)^{n+1} \frac{n}{4n^2 - 1} \sin(nx)\cosh(ny)
\end{align*}
The problem here is that the final solution diverges due to the exponential nature of the $\cosh$ function.
What have I done wrong in the solution?
Thank you!
If $u$ is defined over then entire space, then it must diverge as a consequence of Liouville's theorem, which states that the only bounded harmonic functions over all of Euclidean space are constant.