# Heat equation in one dimension with constant heat supply

1. Sep 10, 2014

### V0ODO0CH1LD

1. The problem statement, all variables and given/known data

A bar of length $L$ has an initial temperature of $0^{\circ}C$ and while one end ($x=0$) is kept at $0^{\circ}C$ the other end ($x=L$) is heated with a constant rate per unit area $H$. Find the distribution of temperature on the bar after a time $t$.

2. Relevant equations

Heat equation in one dimension:
$$\alpha^2u_{xx}=u_t$$
Initial conditions:
$$u(0,t)=0$$
$$u(L,t)=\frac{k}{H}t$$
$$u(x,0)=0$$

3. The attempt at a solution

If $u(x,t)$ can be written as $u(x,t)=X(x)T(t)$ we can separate variables so that the heat equation becomes $\alpha^2X''(x)T(t)=T'(t)X(t)$ which can be written as
$$\alpha^2\frac{X''(x)}{X(x)}=\frac{T'(t)}{T(t)}$$
and since each side only depends on one variable the two ratios above are constant (because if, for example, I differentiate $T'/T$ with respect to $x$ I get $0$ so $X''(x)/X(x)$ is constant). So I get
$$\alpha^2\frac{X''(x)}{X(x)}=\gamma\Rightarrow{}X(x)=c_1cos\left(\frac{\sqrt{\gamma}}{\alpha}x\right)+c_2sin\left(\frac{\sqrt{\gamma}}{\alpha}x\right)$$
and
$$\frac{T'(t)}{T(t)}=\gamma\Rightarrow{}T(t)=ce^{\gamma{}t}$$
Now from the boundary conditions
$$u(0,t)=X(0)T(t)=ce^{\gamma{t}}\left[c_1cos\left(\frac{\sqrt{\gamma}}{\alpha}0\right)+c_2sin\left(\frac{\sqrt{\gamma}}{\alpha}0\right)\right]=0\Rightarrow{}c_1=0$$
and now here's where I got into trouble
$$u(L,t)=X(L)T(t)=ce^{\gamma{t}}\left[c_1\cos\left(\frac{\sqrt{\gamma}}{\alpha}L\right)+c_2\sin\left(\frac{\sqrt{\gamma}}{\alpha}L\right)\right]=\frac{k}{H}t$$

But what am I supposed to do with
$$c_2\sin{\left(\frac{\sqrt{\gamma}}{\alpha}L\right)}=\frac {k}{Hce^{\gamma{t}}}t$$
to keep going to find $u$?

Last edited: Sep 10, 2014
2. Sep 10, 2014

### pasmith

To use separation of variables here, you need constant boundary conditions and a non-zero initial condition, which is not what you have. But you can obtain a problem with constant (indeed zero) boundary conditions and a non-zero initial condition.

Consider $$f(x,t) = \frac{ktx}{HL} + g(x).$$ This satisfies $f(0,t) = 0$ and $f(L,t) = \frac{kt}{H}$ provided $g(0) = g(L) = 0$. If $f$ is to satisfy $f_t = \alpha^2 f_{xx}$ then we need $$\frac{kx}{HL} = \alpha^2 g''.$$ That's a second-order ODE for $g$ and we have two boundary conditions which $g$ must satisfy, so that's OK.

It won't be the case that $f(x,0) = g(x) = 0$, but we can always set $u(x,t) = f(x,t) + v(x,t)$ where $v$ satisfies $$v_t = \alpha^2 v_{xx}$$ subject to $v(0,t) = v(L,t) = 0$ and $v(x,0) = -g(x)$.