I am a student studying Engineering Mathematics, and the professor gave me below heat equation. $$\frac{\partial u}{\partial t}=\frac{\partial^2u}{\partial x^2}$$ where the initial condition is $$u(x,0)=100$$ and the boundary condition is $$\frac{\partial u(0,t)}{\partial x}=0, \ u(1,t)=0$$ The professor taught me only the separation of variables method, so I tried it. Assume that $u(x,t)=F(x)G(t)$. Substituting it, $$F(x)\frac{dG(t)}{dt} \ = \ G(t)\frac{d^2F(x)}{dx^2}$$ That is, for some constant $k$, $$ \frac 1{G(t)}\frac{dG(t)}{dt} \ = \ \frac 1 {F(x)}\frac{d^2F(x)}{dx^2} \ = \ k$$ Let's check $\frac1{F(x)}\frac{d^2F(x)}{dx^2}=k$ first. The characteristic equation of this ODE is $\lambda^2=k$. if $k>0$, then $$F(x) \ = \ Ae^{\sqrt kx}+Be^{-\sqrt kx}$$ By the boundary condition, $$u(1,t) \ = \ (Ae^{\sqrt k}+Be^{-\sqrt k})G(t) \ = \ 0 \\ \frac{\partial u(0,t)}{\partial x} \ = \ (A\sqrt k-B\sqrt k)G(t) \ = \ 0$$ Because $G(t)\neq 0$, It should be that $Ae^{\sqrt k}+Be^{-\sqrt k}=A\sqrt k-B\sqrt k=0$, but this equality holds if and only if $A=B=0$.
Next, assume that $k=0$. Then $$F(x)=C+Dx$$ And by the boundary condition, $$u(1,t) \ = \ (C+D)G(t) \ = \ 0 \\ \frac{\partial u(0,t)}{\partial x} \ = \ DG(t) \ = 0$$ It follows that $C=D=0$, which is useless.
Finally, assume that $k<0$. Then we can write $k=-P^2$, and $$F(x)=E\cos Px+F\sin Px$$ By the boundary condition, $$u(1,t) \ = \ (E\cos P+F\sin P)G(t) \ = \ 0 \\ \frac{\partial u(0,t)}{\partial x} \ = \ FPG(t) \ = 0$$ Then $F=0$, and we conclude that $E\cos P=0$. If $E=0$ then it's trivial solution which is $u(x,t)=0$, so it must be that $\cos P=0$. Therefore, $$P \ = \ \frac{(2n-1)\pi}2, \ n=1,2,3,...$$ Next, Let's check $\frac 1{G(t)}\frac{dG(t)}{dt} \ = \ k$. The characteristic equation of this ODE is $\lambda=k=-P^2$, so $$G(t) \ = \ G_ne^{-P^2t} \ = \ G_ne^{-\frac{(2n-1)^2\pi^2}{4}t}$$ Therefore we can express $u(x,t)$ as follows. $$u(x,t) = \sum_{n=1}^\infty(E_n\cos\frac{(2n-1)\pi x}{2})G_ne^{-\frac{(2n-1)^2\pi^2}{4}t}$$ Or, $$u(x,t) = \sum_{n=1}^\infty H_n(\cos\frac{(2n-1)\pi x}{2})e^{-\frac{(2n-1)^2\pi^2}{4}t}$$ where $H_n=E_nG_n$.
By the initial condition, $$u(x,0) \ = \ \sum_{n=1}^\infty H_n\cos\frac{(2n-1)\pi x}{2} \ = \ 100$$ Then $H_n$ can be calculated using the Fourier series of $f(x)=100$. But $f(x)=100$ is a constant function, so its Fourier cosine coefficients are all zero, that is, $H_n=0$. This result is weird. Did I make some mistakes? Or it can't be solved by the separation of variables method?
... a constant function, so its Fourier cosine coefficients are all zero.
Are you so sure about this? $\endgroup$