I want to confirm that I get the solution of the PDE with positive coefficient right.
I have the initial value problem:
\begin{equation} \begin{cases} u_t=\alpha u_xx \ \ \ \ \ 0<x<L, t>0\\ u_x(0,t)=u_x(L,t)=0 \\ \end{cases}\\ u(x,0)= \begin{cases} 0\ \ \ \ 0<x<L/2\\ 1\ \ \ \ L/2<x<L \end{cases} \end{equation}
Set $\alpha=1$, and using separation of variables, we get:
\begin{equation} X_{xx}\pm k^2X=0\\ T_t=\pm k^2 \end{equation}
I would like to control the case of $k^2>0$, this gives with IC, that $k=\frac{1}{L}$
\begin{equation} X(x)=A\cosh\frac{1}{L}x \end{equation}
But when I use the second IC, in order to find A I get $A=0$ on $0<x<L$ and $\frac{1}{\cosh\frac{1}{L}x}$ on $L/2<x<L$. This gives
\begin{equation} u(x,t)= \begin{cases} 0, \ \ \ \ 0<x<L \\ e^{\frac{1}{L^2}t} , \ \ \ \ L/2<x<L \end{cases} \end{equation}
But this is not a complete function of two variables. What is wrong here?