5.6 Inhomogeneous equations

Consider a rod of length 2m, laterally insulated (heat only flows inside the rod). Initially the temperature u is

{1\over k}\mathop{sin}\nolimits \left ({πx\over 2} \right ) + 500\text{ K}.
(5.48)

The left and right ends are both attached to a thermostat, and the temperature at the left side is fixed at a temperature of 500\text{ K} and the right end at 100\text{ K}. There is also a heater attached to the rod that adds a constant heat of \mathop{sin}\nolimits \left ({πx\over 2} \right ) to the rod. The differential equation describing this is inhomogeneous

\begin{eqnarray} {∂u\over ∂t} & =& k{{∂}^{2}u\over ∂{x}^{2}} +\mathop{ sin}\nolimits \left ({πx\over 2} \right ),%& \\ u(0,t)& =& 500, %& \\ u(2,t)& =& 100, %& \\ u(x,0)& =& {1\over k}\mathop{sin}\nolimits \left ({πx\over 2} \right ) + 500.%&(5.49) \\ \end{eqnarray}

Since the inhomogeneity is time-independent we write

u(x,t) = v(x,t) + h(x),
(5.50)

where h will be determined so as to make v satisfy a homogeneous equation. Substituting this form, we find

{∂v\over ∂t} = k{{∂}^{2}v\over ∂{x}^{2}} + kh'' +\mathop{ sin}\nolimits \left ({πx\over 2} \right ).
(5.51)

To make the equation for v homogeneous we require

h''(x) = −{1\over k}\mathop{sin}\nolimits \left ({πx\over 2} \right ),
(5.52)

which has the solution

h(x) = {C}_{1}x + {C}_{2} + {4\over k{π}^{2}}\mathop{ sin}\nolimits \left ({πx\over 2} \right ).
(5.53)

At the same time we let h carry the boundary conditions, h(0) = 500, h(2) = 100, and thus

h(x) = −200x + 500 + {4\over k{π}^{2}}\mathop{ sin}\nolimits \left ({πx\over 2} \right ).
(5.54)

The function v satisfies

\begin{eqnarray} {∂v\over ∂t} & =& k{{∂}^{2}v\over ∂{x}^{2}}, %& \\ v(0,t)& =& v(π,t) = 0, %& \\ v(x,0)& =& u(x,0) − h(x) = 200x.%&(5.55) \\ \end{eqnarray}

This is a problem of a type that we have seen before. By separation of variables we find

v(x,t) ={ \mathop{∑ }}_{n=1}^{∞}{b}_{ n}\mathop{ exp}\nolimits (−{{n}^{2}{π}^{2}\over 4} kt)\mathop{sin}\nolimits {nπ\over 2} x.
(5.56)

The initial condition gives

{\mathop{∑ }}_{n=1}^{∞}{b}_{ n}\mathop{ sin}\nolimits nx = 200x.
(5.57)

from which we find

{b}_{n} = {(−1)}^{n+1}{800\over nπ} .
(5.58)

And thus

u(x,t) = −{200\over x} + 500 + {4\over { π}^{2}k}\mathop{sin}\nolimits \left ({πx\over 2} \right ) + {800\over π} {\mathop{∑ }}_{n=1}^{∞}{{(−1)}^{n}\over n + 1} \mathop{sin}\nolimits \left ({πnx\over 2} \right ){e}^{−k{(nπ∕2)}^{2}t }.
(5.59)

Note: as t →∞, u(x,t) →−{400\over π} x + 500 + {\mathop{sin}\nolimits {π\over 2} x\over k} . As can be seen in Fig. 5.2 this approach is quite rapid – we have chosen k = 1∕500 in that figure, and summed over the first 60 solutions.


Inhomgen2


Figure 5.2: Time dependence of the solution to the inhomogeneous equation (5.59)