Q:

Laplace's Equation with One Inhomogeneous Boundary Condition

While solving Laplace's equation,
$$
\frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2}=0,
$$
with Dirichlet boundary conditions
$$\begin{align}
u(x,0)&=f_1(x),\\
u(x,b)&=0,\\
u(0,y)&=0,\\
u(a,y)&=0,
\end{align}$$
and assuming that the solution has the separable form $u(x,y)=X(x)Y(y)$, I ran into the case where I have to solve the ODE
$$
Y''(y)=\lambda Y(y),
$$
which has only one homogeneous boundary condition.
My book immediately concludes that its solution is
$$
Y(y)=c_1\sinh\frac{n\pi}a(y-b)\tag{1}
$$
where $\lambda=\left(\frac{n\pi}a\right)^2$ was previously computed.
I cannot understand how $(1)$ was obtained. Thanks in advance for your help!
Edit 1
If it helps to know, I computed that
$$
X_n(x)=A_n\sin\frac{n\pi}ax,
$$
where $n=1,2,\dots$.

A:

Your boundary condition is $Y(b) = 0$.   Looking for solutions of the differential equation of the form $u(y) = e^{ry}$, we find $r^2 = \lambda$, so $r = \pm \sqrt{\lambda}$.  Now
the general solution of the differential equation can  be written as $u(y) = c_1 e^{\sqrt{\lambda} y} + c_2 e^{-\sqrt{\lambda} y}$.  If the boundary condition was $Y(0) = 0$, we would immediately see that $c_1 + c_2 = 0$, so $u(y) = c_1 \left(e^{\sqrt{\lambda} y} - e^{-\sqrt{\lambda} y}\right) = 2 c_1 \sinh(\sqrt{\lambda} y)$.  But note that $v(y) = u(y-b)$ is a solution of the differential equation if $u$ is, and $v(b) = u(0)$.  So we get
$v(y) = 2 c_1 \sinh(\sqrt{\lambda} (y - b))$.  And now absorb the $2$ into the arbitrary 
constant $c_1$ to get the book's $Y(y)$.

