# [SOLVED]Heat flow in a rod

#### dwsmith

##### Well-known member
The temperatures at ends $$x = 0$$ and $$x = \ell$$ of a rod length $$\ell$$ with insulating sides held at temperatures $$T_1$$ and $$T_2$$ until steady-state conditions prevail. Then, at the instant $$t = 0$$, the temperatures of the two ends are
interchanged. Find the resultant temperature distibution as function of $$x$$ and $$t$$.

So the initial condition and boundary conditions are
\begin{align}
T(x,0) &= \frac{x}{\ell}(T_1 - T_2) + T_2\\
T_x(0,t) &= T_1\\
T_x(\ell,t) &= T_2
\end{align}
Let $$T(x,t) = \varphi(x)\psi(t)$$. Then
$\frac{\varphi''}{\varphi} = \frac{1}{\alpha^2}\frac{\dot{\psi}}{\psi} = -k^2.$
Thus, $$\varphi(x)\sim\left\{\cos(kx), \sin(kx)\right\}$$ and $$\psi(t)\sim\exp(-k^2\alpha^2t)$$.

With these B.C.s, I get an extremely complicated eigenfunction. Is my setup correct?
If so, what can do about
\begin{alignat}{2}
\varphi_x(0) &= bk && ={} T_1\\
b &= \frac{T_1}{k}\\
\varphi_x(\ell) &= -ka\sin(k\ell) + T_1\cos(k\ell) && {}= T_2
\end{alignat}
If my setup is correct, how do I continue?

Last edited:

#### dwsmith

##### Well-known member
Re: heat flow in a rod

The temperatures at ends $$x = 0$$ and $$x = \ell$$ of a rod length $$\ell$$ with insulating sides held at temperatures $$T_1$$ and $$T_2$$ until steady-state conditions prevail. Then, at the instant $$t = 0$$, the temperatures of the two ends are
interchanged. Find the resultant temperature distibution as function of $$x$$ and $$t$$.

So the initial condition and boundary conditions are
\begin{align}
T(x,0) &= \frac{x}{\ell}(T_1 - T_2) + T_2\\
T_x(0,t) &= T_1\\
T_x(\ell,t) &= T_2
\end{align}
Let $$T(x,t) = \varphi(x)\psi(t)$$. Then
$\frac{\varphi''}{\varphi} = \frac{1}{\alpha^2}\frac{\dot{\psi}}{\psi} = -k^2.$
Thus, $$\varphi(x)\sim\left\{\cos(kx), \sin(kx)\right\}$$ and $$\psi(t)\sim\exp(-k^2\alpha^2t)$$.

With these B.C.s, I get an extremely complicated eigenfunction. Is my setup correct?
If so, what can do about
\begin{alignat}{2}
\varphi_x(0) &= bk && ={} T_1\\
b &= \frac{T_1}{k}\\
\varphi_x(\ell) &= -ka\sin(k\ell) + T_1\cos(k\ell) && {}= T_2
\end{alignat}
If my setup is correct, how do I continue?
I now remember what to do for these type of problems.

I also found out that the insulated portion is supposed to be about the lateral surface; that is, the BC should be Dirichlet not Neumann.

Last edited: