Is this diffusion equation with particular Neumann b.c. is solvable at all?

18 Views Asked by At

I need to solve the followin equation by separation of variables $$ \begin{equation} \begin{cases} u_t-u_{xx} = 0 & 0 < x < L, t > 0\\ u(x,0) = x & 0 < x < L\\ u_x(0,t) = u_x(L,t) = 0 & t > 0. \end{cases} \end{equation} $$ I found this solution: $$\boxed{u(x,t) = \sum_{n=0}^{\infty}\left(A_n\cos{\left(\frac{n\pi}{L}x\right)}e^{-\frac{n^2\pi^2}{L^2}t}\right)}.$$ But i can't fit initial value conditions at $x = 0.$ My calculations are like this: $$ \begin{align*} A_n &= \frac{2}{L}\int_0^L x\cos{\frac{\pi n x}{L}} dx\\ &= \frac{2}{L}\frac{L}{\pi n}\left(x\sin{\frac{\pi n x}{L}}|_0^L-\int_0^L\sin\frac{\pi nx}{L}dx\right)\\ &= \frac{2L}{\pi^2 n^2}\cos\frac{\pi nx}{L}|_0^L\\ &= \begin{cases} -\frac{4L}{\pi^2 n^2}&n\ \mbox{is odd}\\ 0 &\mbox{otherwise.} \end{cases} \end{align*} $$ EDIT: Hmm.. looks like initial conditions don't include $0.$