Question: The function $\phi(x, t)$ defined in $0<x<1$, $t>0$ obeys the PDE: $$\frac{\partial \phi}{\partial t}=\frac{\partial^2 \phi}{\partial x^2}-\phi$$ with boundary conditions: $\phi_x=0$ at $x=0$, and $\phi_x=-\phi$ at $x=1$
and initial condition: $\phi(x, 0)=\phi_0(x)$.
Derive a series solution for $\phi(x, t)$.
Attempt: We assume that the separated solution is: $$\phi(x, t)=F(t)G(x)$$ Plug into the PDE to get: $$F'(t)G(x)=F(t)G''(x)-F(t)G(x)$$ Now separate variables, putting all the $x$'s on one side: $$\frac{F'(t)}{F(t)}=\frac{G''(x)-G(x)}{G(x)}=-\lambda.$$ This gives the ODEs: $$F'(t)=-\lambda F(t), \text{ and } G''(x)-G(x)=-\lambda G(x)$$ By the boundary conditions, we have: $$F(t)G'(0)=0, \text{ and } F(t)G'(1)=-F(t)G(1)$$ These boundary condition can be trivially satisfied if $F(t)=0$ for all $t$, but then the separable solution $\phi(x, t)=F(t)G(x)$ would always be zero. So we are looking instead for non-zero solutions. This means that our boundary conditions become: $$G'(1)=-G(1), \text{ and } G'(0)=0.$$ The problem for $G$ is then, $$G''(x)+G(x)(\lambda-1)=0, \text{ with } G'(1)+G(1)=0 \text{ and } G'(0)=0.$$ Solving this ODE, we have: $$(e^{rx})''+(\lambda-1)e^{rx}=0 \Longrightarrow e^{rx}(r+\lambda -1)=0 \Longrightarrow r^2+\lambda -1=0 \Longrightarrow r_1=\sqrt{1-\lambda}, r_2=-\sqrt{1-\lambda}$$ Hence, we have $$G(x)=c_1e^{\sqrt{1-\lambda}x}+c_2e^{-\sqrt{1-\lambda}x}$$ The ODE for F: $$F'(t)-\lambda F(t)=0 \Longrightarrow F(t)=e^{\lambda t}+c_1$$ However, I'm not sure how to do further. In the lecture, the teacher told us that we need to show if $\lambda$ is positive real number, but how? and what should I do next? and how the orthogonality property can be used to derive the series coefficients in terms of integrals involving $f(x)$?
I just started learning Theory of PDEs, so it would be very helpful if you can explain this in details. Thank you!