Solve BVP by using separation of variables I need help to solve this problem:
Let $v(x,t)$ denote temperature in a slender wire lying along the $x$ axis. Variations of the temperature over each cross section are to be neglected. At the lateral surface, the linear law of surface heat transfer between the wire and its surroundings is assumed to apply. Let the surroundings be at temperature zero, then: 
$v_t(x,t)=kv_{xx}(x,t)-bv(x,t)$
where b is positive constant. The end $x=0$, and $x=c$ of the wire are insulated and initial temperature distribution is $f(x)$. Solve BVP for $v$ by separation of variables.
Here are what I attempted, we have
$v_t(x,t)=kv_{xx}(x,t)-bv(x,t)$
$v_x(0,t) = v_x(c,t) =0$, and $v(x,0)=f(x)$
Let $v(x,t)=X(x)T(t)$ then
$X(x)T^{'}(t) = kX^{"}(x)T(t) - bX(x)T(t)$
$\frac{T^{'}(t)}{T(t)} = k\frac{X^{"}(x)}{X(x)}-b$, $X^{'}(0)= X^{'}(c)=0, T(0)=f(x)$
Now I stuck please help.
Thanks
 A: First of all, the condition $T(0) = f(x)$ you have derived is wrong. You should derive $X(x)T(0)=f(x)$, which means, that $T(0) = f(x)/X(x)$. Since $T(0)$ is constant, then $f(x)/X(x) = const$ as well. Denote $f(x)/X(x) = T_0$. Then, you derive
$$
\frac{\dot{T}}{T} = k \frac{f'}{f} - b.
$$
Since the left hand side of the equation depends only on $t$, while the right hand side depends only on $x$, therefore
$$
\frac{\dot{T}}{T} = k \frac{f'}{f} - b = const := \alpha.
$$
Since $f$ is a given function, then this results in
$$
\dot{T}(t) - \alpha T(t) = 0,
$$
with given $\alpha$. Integrating this equation and taking into account that $T(0) = T_0$, you get
$$
T(t) = T_0 \exp(\alpha t).
$$
Finally,
$$
v(x, t) = T_0 \exp(\alpha t) X(x) = f(x) \exp(\alpha t).
$$
Note that the consistency of the boundary and initial conditions implies
$$
f'(0) = f'(c) =0.
$$
A: It works out whether you solve with $b$ combined into the $t$ equation or into the $x$ equation, but it's easier to solve the $t$ equation with the $b$ in it.
$$
                   \frac{T'}{T}+b = \lambda,\;\;\; \lambda = \frac{X''}{X},\\
                X'(0)=X'(c)=0.
$$
The $X$ equation determines the permissible values of $\lambda_n$ and $X_n$ to be
$$
     X_n(x)= \cos(n\pi x/c),\;\; \lambda_n = -\frac{n^2\pi^2}{c^2},\;\; n=0,1,2,3,\cdots.
$$
$X_0$ is a constant function. The corresponding solutions $T_n$ are
$$
              T(t) = e^{-bt}e^{-n^2\pi^2t/c^2}.
$$
The Fourier solution is
$$
           v(x,t) = e^{-bt}\sum_{n=0}^{\infty}C_n e^{-n^2\pi^2t/c^2}\cos(n\pi x/c)
$$
The coefficients $C_n$ are determined by orthogonality of the $X_n$ through the initial condition
$$
          f(x) = v(x,0) = \sum_{n=0}^{\infty}C_n\cos(n\pi x/c), \\
         \int_{0}^{c}f(x)\cos(n\pi x/c)dx = C_n\int_{0}^{c}\cos^2(n\pi x/c)dx, \\
       C_n = \frac{\int_{0}^{c}f(x)\cos(n\pi x/c)dx}{\int_{0}^{c}\cos^2(n\pi x/c)dx}.
$$
