Solving the 1D heat equation Suppose I have a thin rod of length $L$. It is at steady state, with a heat source at $x=L$ keeping it at temperature $T_2$.
At time $t=0$, I bring a warm body at $x=0$, and the temperature at $x=0$ becomes $T_1$ instantly, while the rest of the rod is still at the initial temperature $T_2$ $(T_1>T_2)$. 
I want to find heat flux in the rod at any point in time $t$ and at some location $x$, after introducing the warm body. 
I started off this problem using the classical 1D heat equation:
$$u_t = ku_{xx}$$
with BC: $u(0,t) = T_1, u(L,t) = T_2$
IC: $u(x,0) = H(x)$, where $H(x)$ is a modified heaviside function with $H(0) = T_1$, and $H(x>0) = T_2$. 
Using separation of variables:
$$T'(t)X(x) = kX''(x)T(t) \\
\frac{T'}{kT} = \frac{X''}{X} = -\lambda$$
Solving the above set of equations:
$$T(t) = Ae^{-k\lambda t}\\
X(x) = B\cos(\sqrt{\lambda}x) + C\sin(\sqrt{\lambda}x)$$
Using the boundary conditions to solve for A, B, C and $\lambda$:
$$ABe^{-k\lambda t} = T_1\\
Ae^{-k\lambda t}(B\cos(\sqrt{\lambda}L) + C\sin(\sqrt{\lambda}L)) = T_2 \\
AB\cos(\sqrt{\lambda}L) + AC\sin(\sqrt{\lambda}L) = H(x)$$
I'm having some trouble making sense of this. 
For example, the first boundary condition tells me that $AB$ is a function of time, when $AB$ where real constants. Also, I have 4 variables and 3 unknowns. How do I go about solving a problem like this?
 A: Note that any separable solution with $\lambda>0$ will vanish. As such, the long-time behavior of any solution constructed from such solutions can only be $u(x,t)=0$. But this is not the steady-state solution, i.e., $u=0$ does not solve $u_{xx}=0$ subject to $u|_{x=0}=T_1$ and $u|_{x=L}=T_2$. Instead, the correct steady state solution is $U(x) = T_1-\dfrac{T_1-T_2}{L}x$.
With this in mind, let $q(x,t):=u(x,t)-U(x)$ be the transient part of the solution. Then $q_t = u_t$ and $q_{xx}=u_{xx}$, so $q$ also solves the heat equation. However, the BCs are instead
\begin{align}
q(0,t) &= u(0,t)-U(0)= 0,\\
q(L,t) &= u(L,t)-U(L) =0,\\
q(x,0) &= U(x,0)-U(x)\\ &= T_2-\left(T_1-\dfrac{T_1-T_2}{L}x\right)\\
&=-(T_1-T_2)\left(1-\frac{x}{L}\right)
\end{align}
which do have $q=0$ as the steady state solution. Therefore we can seek a solution using only $\lambda>0$. Moreover, the task is now simpler since we can require $X(0)=X(L)=0$. Hence $\sqrt{\lambda}L=\pi n$ for positive integer $n$, giving a countable basis of solutions. From here the work is routine and I won't follow it further.
