Method of separation of variables for $u(x,0)=sin^2 x$ in a square $[0,\pi]\times[\pi,0]$ I'm trying to solve this problem
$u_{xx}+u_{yy}=0, (x,y)\in[0,\pi]\times[\pi,0]$
$u(0,y)=u(\pi,y)=u(x,\pi)=0$
$u(x,0)=sin^2 (x)$
Then I do this steps:
$u(x,t)=X(x)T(t)→u(x,t)=X(x)Y(y)$ with $u_{xx})=X''Y$ and $u_{yy}=XY''$ then $X''Y+XY''=0→X''Y/(X''Y'')=(-XY'')/X''Y''→Y/Y''=-X/X''=-λ$.
There are two cases for $-λ$.
First $-X/X'' =-λ⟷X''-λX=0$
Second $Y/Y'' =-λ⟷Y''-λY=0$
We know that $X''-λX=0$ and that $X' (0)=0$, $X'(π)=0$. Then the eigen value is $λ_0=0$ and the eigen fuction is $X_0 (x)=1$. For the rest the eigen values are $λ_n=-n^2$ for $n=1,2,…$ and the eigen function is will be $X_n (x)=cos⁡(nx)$ for $n=1,2,…$
I resolve the PDE for $λ=0$
$Y_0 (y)=c_1 y+c_2$
And for $λ<0$
$Y_n (y)=a_n  cosh⁡(ny)+b_n  sinh⁡(ny)$
Because
$u(x,y)=Y_0 (y)+∑_{n=1}^∞ Y_n (y) X_n (x)=c_1 y+c_2+∑_{n=1}^∞ (a_n  cosh⁡(ny)+b_n  sinh⁡(ny) )   cos⁡(nx)$
Then
$u_y (x,y)=c_1+∑_{n=1}^∞ (a_n  cosh⁡(ny)+b_n  sinh⁡(ny) )   cos⁡(nx)$
but who is $u_y (x,0)$?
Thanks for your help
 A: Start by looking for the separation of variables solutions $X(x)Y(y)$.
$$
         X''(x)Y(y)+X(x)Y''(y)=0
$$
As is standard, divide by $X(x)Y(y)$, and separate the variables
$$
               \frac{X''}{X}= -\frac{Y''}{Y} \\
               \frac{X''}{X} = \lambda,\;\;\; \lambda = -\frac{Y''}{Y} \\
                 X(0)=0=X(\pi),\;\;\;\; Y(0)=0.
$$
The solutions for $X$ with either be trigonometric functions or hyperbolic functions, depending on $\lambda$. However, there is no non-trivial combination of hyperbolic functions that vanish at two points. So $X$ must reduce to trigonometric functions, which leads to $\lambda=-n^2$ where $n=1,2,3,\cdots$, and gives solutions
$$
               X_n(x) = A_n\sin(nx).
$$
Then $Y''=n^2Y$ and $Y(\pi)=0$, which leads to $Y_n(y)=B_n\sinh(n(\pi-y))$. Combining constants gives a general trial solution
$$
             u(x,y) = \sum_{n=1}^{\infty}A_n\sin(nx)\sinh(n(\pi-y))
$$
The constants are determined by the condition at $y=0$:
$$
          \sin^2(x) = \sum_{n=1}^{\infty}A_n\sin(nx)\sinh(n\pi).
$$
The functions $\sin(nx)$ are mutually orthogonal on $[0,\pi]$. So multiplying both sides of the above by $\sin(nx)$ and integrating over $[0,\pi]$ gives the equations for the coefficients $A_n$:
$$
         \int_{0}^{\pi}\sin^2(x)\sin(nx)dx=A_n\int_{0}^{\pi}\sin^2(nx)dx\sinh(n\pi) = A_n\frac{\pi}{2}\sinh(n\pi) \\
         A_n = \frac{2}{\pi\sinh(n\pi)}\int_{0}^{\pi}\sin^2(x)\sin(nx)dx.
$$
Therefore,
$$
         u(x,y) = \sum_{n=1}^{\infty}\left[\frac{2}{\pi\sinh(n\pi)}\int_{0}^{\pi}\sin^2(x)\sin(nx)dx\right]\sin(nx)\sinh(n(\pi-y)).
$$
