$2^{nd}$ order PDE: Solution I am trying to solve the following equation:
$$\frac{\partial F}{\partial t} = \alpha^2 \, \frac{\partial^2 F}{\partial x^2}-h \, F$$
subject to these conditions:
$$F(x,0) = 0, \hspace{5mm} F(0,t) = F(L,t)=F_{0} \, e^{-ht}.$$
I know that I am suppose to simplify the equation with:
$$F(x,t)=\phi(x,t)e^{-ht}$$
My initial guess is to divide by $$\alpha^2$$
and have this:
$$\frac{d^2F}{dx^2}-\frac{1}{\alpha^2}\frac{dF}{dt}-\frac{h}{\alpha^2} \, F=0.$$
I am having trouble with the next steps. Should I assume a solution of the exponential form?
 A: Given:
$$\frac{\partial F}{\partial t} = \alpha^2 \, \frac{\partial^2 F}{\partial x^2}-h \, F$$
$$F(x,0) = 0, \hspace{5mm} F(0,t) = F(L,t)=F_{0} \, e^{-ht}.$$
The process to obtain a solution is the following. 
The boundary conditions suggest making the substitution $F(x,t) = \phi(x,t) \, e^{-h t}$ for which the pde becomes
$$\frac{\partial \phi}{\partial t} = \alpha^{2} \, \frac{\partial^{2} \phi}{\partial x^{2}}$$
where $\phi(x,0) = 0$, $\phi(0,t) = \phi(L,t) = F_{0}$. 
Now let $\phi(x,t) = F_{0} + \theta(x,t)$ which bring the equation and conditions into the form
$$\frac{\partial \theta}{\partial t} = \alpha^{2} \, \frac{\partial^{2} \theta}{\partial x^{2}}$$
where $\phi(x,0) = - F_{0}$, $\phi(0,t) = \phi(L,t) = 0$.
Let $\theta(x,t) = f(x) \, g(t)$ to obtain
\begin{align}
\frac{g'}{g} = - \lambda^{2} = \alpha^{2} \, \frac{f''}{f}
\end{align}
for which 
\begin{align}
& \alpha^{2} \, f'' + \lambda^{2} f = 0 \\
& g' + \lambda^{2} \, g = 0.
\end{align}
The first order equation has the solution $g(t) = e^{- \lambda^{2} \, t}$. The equation for $f$ has the form $f'' + (\lambda/\alpha)^{2} \, f=0$ with solutions $f(x) = A \, \cos(\lambda x/\alpha) + B \, \sin(\lambda x/\alpha)$.
From the conditions $\phi(0,t)=\phi(L,t) = 0$ then
\begin{align}
0 &= A  \\
0 &= A \, \cos\left(\frac{\lambda L}{\alpha}\right) + B \, \sin\left( \frac{\lambda L}{\alpha}\right)
\end{align} 
for which $B \neq 0$ and $\sin\left(\frac{\lambda L}{\alpha}\right) = 0$. From this 
$$\lambda_{n} = \frac{n \, \pi \, \alpha}{L}.$$
Combining the parts leads to the $\theta(x,t)$ solution
\begin{align}
\theta(x,t) = \sum_{n=1}^{\infty} B_{n} \, \sin\left(\frac{n \, \pi \, x}{L}\right) \, e^{- \frac{n^{2} \, \pi^{2} \, t}{L^{2}}
}\end{align}
The remaining condition is $\theta(x,0)= - F_{0}$, 
\begin{align}
- F_{0} = \sum_{n=1}^{\infty} B_{n} \, \sin\left(\frac{n \, \pi \, x}{L}\right)
\end{align}
The coefficients are obtained by Fourier series methods and are 
\begin{align}
B_{m} = - \frac{2}{L} \, \int_{0}^{L} F_{0} \, \sin\left(\frac{m \, \pi \, u}{L}\right) \, du = - \frac{2 \, F_{0} \, (1 - (-1)^{m})}{m \, \pi}.
\end{align}
With all of this the solution becomes
\begin{align}
F(x,t) = F_{0} \, e^{-h t} - \frac{2 \, F_{0}}{\pi} \, e^{-h t} \, \sum_{n=1}^{\infty} \frac{1 - (-1)^{n}}{n} \, \sin\left(\frac{n \, \pi \, x}{L}\right) \, e^{- \frac{n^{2} \, \pi^{2} \, t}{L^{2}}}.
\end{align}
or
\begin{align}
F(x,t) = F_{0} \, e^{-h t} - \frac{2 \, F_{0}}{\pi} \, e^{-h t} \, \sum_{n=0}^{\infty} \frac{1}{2n+1} \, \sin\left(\frac{(2n+1) \, \pi \, x}{L}\right) \, e^{- \frac{(2n+1)^{2} \, \pi^{2} \, t}{L^{2}}}.
\end{align}
A: (definitely too long for comment) ah he gets it by the orthogonality principle. so $$-F_0\sin\left(\frac{m\pi u}{L}\right) = \sum_{n=1}^\infty B_n\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)$$ now from the orthogonality principle the integration over $u$ which is
$$
\int_0^L -F_0\sin\left(\frac{m\pi u}{L}\right) = \int_0^L\sum_{n=1}^\infty B_n\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)du = \sum_{n=1}^\infty B_n \int_0^L\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)du
$$ 
and looking at the integral within the summation
$$
\int_0^L\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)du = \frac{L}{\pi}\int^\pi_0\sin(nx)\sin(mx)dx = I(\pi)
$$
we also have
$$
\frac{L}{\pi}\int^{-\pi}_0\sin(-nx')\sin(-mx')(-dx') = - \frac{L}{\pi}\int_0^{-\pi}\sin(nx')\sin(mx')dx' =\frac{L}{\pi}\int^0_{-\pi}\sin(nx')\sin(mx')dx'
$$
the last integral has the equivelent value as $I(\pi)$ thus we have
$$
\frac{L}{\pi}\int^\pi_{-\pi}\sin(nx)\sin(mx)dx = \frac{L}{\pi}\int^0_{-\pi}\sin(nx')\sin(mx')dx' + \frac{L}{\pi}\int^\pi_0\sin(nx)\sin(mx)dx = 2I(\pi)
$$
so we get
$$
I(\pi) = \frac{L}{2\pi}\int^\pi_{-\pi}\sin(nx)\sin(mx)dx 
$$
the reason I go this long way is to show each step to the integral i want and that is
$$
\int^\pi_{-\pi}\sin(nx)\sin(mx)dx  = \pi \delta_{nm}
$$
which is a delta function and thus only has non-zero value when $n=m$ thus we have
$$
\int_0^L -F_0\sin\left(\frac{m\pi u}{L}\right)= \sum_{n=1}^\infty B_n \int_0^L\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)du = \sum_{n=1}^{\infty}B_n\frac{L\cdot\pi\delta_{nm}}{2\pi}
$$
the only nonzero component is when $n=m$ thus the only component of the sum that is non zero is that case.
$$
\int_0^L -F_0\sin\left(\frac{m\pi u}{L}\right)= \sum_{n=1}^\infty B_n \int_0^L\sin\left(\frac{n\pi u}{L}\right)\sin\left(\frac{m\pi u}{L}\right)du = B_m\frac{L}{2}
$$
thus the coefficient is (here you could of had $n$ instead of $m$ but its obvious to choose $m$)
$$
-\frac{2}{L}\int_0^L F_0\sin\left(\frac{m\pi u}{L}\right) = B_m
$$
A: Let $F(x,t) = \phi(x,t) e^{-ht}$
Then 
$$\frac{\partial}{\partial t}\left( \phi(x,t) e^{-ht} \right) = \alpha^2 \frac{\partial^2}{\partial x^2}\left( \phi(x,t) e^{-ht} \right) - h\left( \phi(x,t) e^{-ht} \right)$$
Hence
$$\frac{\partial \phi}{\partial t}(x,t) e^{-ht} - h\phi(x,t)e^{-ht} = \alpha^2 \frac{\partial^2 \phi}{\partial x^2}(x,t) e^{-ht} - h\phi(x,t) e^{-ht} $$
So 
$$\frac{\partial \phi}{\partial t}(x,t) = \alpha^2 \frac{\partial^2 \phi}{\partial x^2}(x,t) $$
And $\phi$ is a solution of the classical heat equation (you can easily find the initial and boundary conditions of this equation)
A: The following field redefinition, similar to what the other answers have done, simplifies the problem: 
$$F = (F_0 + \phi)e^{-ht} \implies \frac{d\phi}{dt} = \alpha^2\frac{d^2\phi}{dx^2}$$
with $\phi(0,t) = \phi(L,t) = 0$ and $\phi(x,0) = -F_0$. One can now proceed with your favoritte method like separation of variables or expanding $\phi$ in a Fourier series to obtain an equation for the coefficients. 

The other answers have done this so I just want to focus on a problem one encounters when applying the initial condition. No matter what approach you take you will be lead to a Fourier series and to evaluate the coefficients you need to apply the initial condition $\phi(x,0) = -F_0$. This function does not have a non-trivial Fourier-series so a naive application would not give a solution. The usual trick to get around this is by extending the domain of $\phi$ from $[0,L]$ to $[-L,L]$ and then demaning $\phi(x,t)=-\phi(-x,t)$, i.e. we demand that the solution should be odd (since the odd completion do have a nice Fourier series). For the initial condition we therefore consider
$$\phi(x,0) = -F_0\left\{\matrix{-1 & x<0 \\1 & x > 0}\right.$$
This function, the so-called square-wave, has the Fourier series
$$\phi(x,0) = -\frac{4F_0}{\pi}\sum_{n=0}^\infty\frac{1}{2n+1}\sin\left(\frac{(2n+1)\pi x}{L}\right)$$
which can be found by applying the usual method. 

Just for completeness, here is a quick runthough of the solution. We expand $\phi$ in a Fourier $\sin$-series (since we demand that $\phi$ is odd) $\phi(x,t) = \sum_{n=1}^\infty a_n(t) \sin\left(\frac{n\pi x}{L}\right)$ that satisfy the boundary conditions $\phi(0,t)=\phi(L,t) = 0$. By inserting this series into the PDE and equating the left and right hand side we get the equation for the coefficients
$$\frac{da_k}{dt} = -\frac{n^2\pi^2\alpha^2}{L^2} a_k \implies a_k(t) = a_k(0) e^{-\frac{n^2\pi^2\alpha^2}{L^2}t}$$
where $a_k(0)$ is simply the Fourier coefficients of the initial condition which here is just the square-wave given above. The full solution can therefore be written
$$F(x,t) = F_0e^{-ht}\left[1 - \frac{4}{\pi}\sum_{n=0}^\infty\frac{e^{-\frac{(2n+1)^2\pi^2 \alpha^2}{L^2}t}}{2n+1}\sin\left(\frac{(2n+1)\pi x}{L}\right)\right]$$
for all $t>0$ and $0\leq x\leq L$. Note that the formula above is not valid for $t=0$ at the two points $x=0$ and $x=L$ since we get $F(x,0)=F_0$ instead of $F(x,0)=0$.
