Differential Equations › Section I · Partial differential equations › Topic I.6

Heat equation with nonzero boundaries

Real bars rarely have both ends in ice water: one end may sit on a hot plate while the other touches room-temperature air. A simple shift by the bar's eventual steady temperature turns such problems back into the zero-boundary problems already solved.

Why the ends cause trouble

Consider \(u_t = k\,u_{xx}\) on \(0 \le x \le L\) with the ends held at fixed temperatures, \(u(0, t) = T_1\) and \(u(L, t) = T_2\), and initial profile \(u(x, 0) = f(x)\). If \(T_1\) or \(T_2\) is not zero, the boundary conditions are nonhomogeneous, and separation of variables fails: as the topic on the method showed, a condition such as \(X(0)\,T(t) = T_1\) says nothing about \(X\) alone. Superposition fails too, since doubling a solution doubles the end temperatures. The cure is to split off the part of the solution that the ends force, and to solve for what is left.

The equilibrium temperature

Leave the bar long enough and its temperature stops changing. That final, time-independent profile is the equilibrium temperature \(u_E(x)\). Setting \(u_t = 0\) in the heat equation leaves \(u_E'' = 0\), with \(u_E(0) = T_1\) and \(u_E(L) = T_2\). Integrating twice gives a straight line, and the end conditions fix it:

u_E(x) = T_1 + \frac{T_2 - T_1}{L}\,x

Physically this is steady conduction. The gradient is constant, so by Fourier's law the heat flux, \(-K(T_2 - T_1)/L\), is the same at every cross-section: every slice passes on exactly the heat it receives, which is why nothing changes.

Worked example: a steel rod in steady state

A steel rod 0.40 m long, with \(K \approx 50\) W/(m·K) and insulated sides, has one end held at 20 °C and the other at 80 °C. Find its equilibrium profile, where it reaches 50 °C, and the steady heat flux. 1. Equilibrium, with \(x\) in metres:

u_E = 20 + \frac{80 - 20}{0.40}\,x = 20 + 150x\ \text{°C}

2. Set \(20 + 150x = 50\), so \(x = 0.20\) m, the midpoint. 3. Flux: \(\varphi = -K\,u_E'\), which is \(-50 \times 150 = -7500\) W/m². 4. Check: the flux is negative, so heat flows left, from the 80 °C end to the 20 °C end, as it must.

Shifting by the equilibrium

Write the solution as the equilibrium plus a remainder:

u(x, t) = u_E(x) + v(x, t)

Now find the problem that \(v\) solves. Because \(u_E\) does not depend on \(t\), \(v_t = u_t\). Because \(u_E'' = 0\), \(v_{xx} = u_{xx}\). So \(v_t = k\,v_{xx}\), the same heat equation. At the ends, \(v(0, t) = T_1 - u_E(0) = 0\) and \(v(L, t) = T_2 - u_E(L) = 0\): homogeneous conditions. The initial condition becomes \(v(x, 0) = f(x) - u_E(x)\). The remainder \(v\) is exactly the cold-ends problem solved in Solving the heat equation, with a new starting profile.

The full solution

Solving for \(v\) with a sine series and adding \(u_E\) back gives

u = T_1 + \frac{T_2 - T_1}{L}x + \sum_{n=1}^{\infty} b_n\sin\frac{n\pi x}{L}\, e^{-k(n\pi/L)^2 t}

where the coefficients come from the sine series of the shifted starting profile:

b_n = \frac{2}{L}\int_0^L \big[f(x) - u_E(x)\big]\sin\frac{n\pi x}{L}\,dx

The most common slip is to expand \(f\) itself. Every term of the sum decays, so \(u \to u_E\) as \(t \to \infty\), confirming that \(u_E\) really is the long-run state. The sum describes the transient, the temporary part that carries the bar from \(f\) to \(u_E\).

Worked example: a bar heated at both ends

A bar of length 1 m starts at 20 °C throughout. At \(t = 0\) its left end is set to 100 °C and its right end to 40 °C. 1. Equilibrium: \(u_E = 100 - 60x\). 2. Shifted start: \(f - u_E = 20 - (100 - 60x)\), which is \(60x - 80\). 3. Coefficients:

b_n = 2\int_0^1 (60x - 80)\sin(n\pi x)\,dx = \frac{40\big((-1)^n - 4\big)}{n\pi}

4. So \(b_1 = -\frac{200}{\pi}\), \(b_2 = -\frac{60}{\pi}\) and \(b_3 = -\frac{200}{3\pi}\). 5. Check: every \(b_n\) is negative, which fits a bar that starts colder than its equilibrium everywhere, and summing many terms at \(t = 0\) returns values close to 20 °C inside the bar.

How fast equilibrium arrives

The slowest part of the transient is the \(n = 1\) term, which shrinks by a factor of \(e\) every \(L^2/(k\pi^2)\) seconds. For the steel rod, with \(c \approx 490\) J/(kg·K) and \(\rho \approx 7850\) kg/m³, the diffusivity \(k = K/(c\rho)\) is about \(1.3 \times 10^{-5}\) m²/s. Then \(L^2/(k\pi^2) \approx 1250\) s, about 21 minutes, and the transient falls to 1% of its size after about \(\ln 100 \approx 4.6\) of these intervals, roughly an hour and a half. Halving the rod's length would cut every one of these times by a factor of four.

Other boundary combinations

The same shift works whenever a time-independent equilibrium exists. If the left end is held at \(T_1\) and the right end is insulated, the equilibrium solves \(u_E'' = 0\), \(u_E(0) = T_1\), \(u_E'(L) = 0\), so \(u_E = T_1\): the whole bar ends at the held temperature, since no heat leaves through the far end. The remainder then has \(v(0, t) = 0\) and \(v_x(L, t) = 0\). Solving \(X'' + \lambda X = 0\) with \(X(0) = 0\) gives \(X = \sin(\sqrt{\lambda}\,x)\), and \(X'(L) = 0\) needs \(\cos(\sqrt{\lambda}\,L) = 0\), so the eigenfunctions are \(\sin\frac{(2n - 1)\pi x}{2L}\).

Common mistakes to avoid

First, expanding \(f\) instead of \(f - u_E\) when computing \(b_n\); the sine series must describe the shifted start, which really is zero at the ends. Second, getting the line backwards: \(u_E\) must equal \(T_1\) at \(x = 0\) and \(T_2\) at \(x = L\), so check both ends. Third, forgetting to add \(u_E\) back to the final answer. Fourth, assuming the bar settles at the average of \(T_1\) and \(T_2\) everywhere; that is only the midpoint value. Fifth, using the cold-end eigenfunctions for an insulated end, where the cosine condition \(\cos(\sqrt{\lambda}\,L) = 0\) applies.

Key takeaways

Nonzero end temperatures make the boundary conditions nonhomogeneous, so separate off the equilibrium first. Setting \(u_t = 0\) gives the straight line \(u_E = T_1 + (T_2 - T_1)x/L\), steady conduction with a constant flux. Then \(v = u - u_E\) solves the heat equation with zero end temperatures and starting profile \(f - u_E\). The answer is \(u_E\) plus a decaying sine series whose coefficients come from \(f - u_E\). The transient dies on the time scale \(L^2/(k\pi^2)\). With one end held and the other insulated, the equilibrium is the held temperature.

Flashcards

Flashcard

Nonzero end temperatures

Nonhomogeneous boundary conditions

Separation of variables cannot be applied directly.

Test your understanding

Question 1 of 5

A bar of length 3 m has its ends held at 30 °C (x = 0) and 90 °C (x = 3). What is its equilibrium temperature at x = 1 m?

Question 2 of 5

For u(0, t) = T₁ and u(L, t) = T₂, why does v = u − u_E satisfy the heat equation?

Question 3 of 5

A bar starts at f(x) = 50 °C with ends held at 10 °C and 70 °C. What profile must the sine series for v represent at t = 0?

Question 4 of 5

A rod's left end is held at 25 °C and its right end is perfectly insulated. What is its equilibrium temperature?

Question 5 of 5

Rod A has length L and rod B, of the same material, has length 2L. How does B's equilibrium time scale L²/(kπ²) compare with A's?

← Previous topicNext topic →