Heat Boundary A795D4
1. **Problem statement:**
(a) Define diabatic and adiabatic boundary conditions.
(b) Explain how these boundary conditions affect the heat equation and its solutions.
(c) Show that for a completely insulated bar with boundary conditions $u_x(0,t)=0$, $u_x(L,t)=0$, and initial condition $u(x,0)=f(x)$, the separation of variables leads to the solution
$$u(x,t) = A_0 + \sum_{n=1}^\infty A_n \cos\left(\frac{n\pi x}{L}\right) e^{-\left(\frac{cn\pi}{L}\right)^2 t}$$
(d) Find the temperature distribution for $L=\pi$, $c=1$, and $f(x) = 1 - \frac{x}{\pi}$.
2. **Definitions:**
- Diabatic boundary conditions allow heat exchange with the environment, meaning temperature or heat flux is specified at the boundary.
- Adiabatic boundary conditions mean no heat transfer through the boundary, i.e., insulated boundaries with zero heat flux: $u_x=0$ at the boundary.
3. **Effect on heat equation:**
The heat equation is
$$u_t = c^2 u_{xx}$$
where $u(x,t)$ is temperature, $c$ is thermal diffusivity.
- Diabatic conditions impose fixed temperature or flux, affecting the boundary values directly.
- Adiabatic conditions impose zero flux, leading to Neumann boundary conditions $u_x=0$.
4. **Separation of variables for insulated bar:**
Assume solution $u(x,t) = X(x)T(t)$.
Substitute into heat equation:
$$X(x) T'(t) = c^2 X''(x) T(t)$$
Divide both sides by $c^2 X(x) T(t)$:
$$\frac{T'(t)}{c^2 T(t)} = \frac{X''(x)}{X(x)} = -\lambda$$
for some separation constant $\lambda$.
5. **Spatial part:**
Solve
$$X'' + \lambda X = 0$$
with Neumann BCs:
$$X'(0) = 0, \quad X'(L) = 0$$
General solution:
$$X(x) = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x)$$
Apply BC at $x=0$:
$$X'(0) = -A \sqrt{\lambda} \sin(0) + B \sqrt{\lambda} \cos(0) = B \sqrt{\lambda} = 0 \implies B=0$$
Apply BC at $x=L$:
$$X'(L) = -A \sqrt{\lambda} \sin(\sqrt{\lambda} L) = 0$$
Nontrivial solution requires
$$\sin(\sqrt{\lambda} L) = 0 \implies \sqrt{\lambda} L = n \pi, \quad n=0,1,2,\ldots$$
Thus,
$$\lambda_n = \left(\frac{n \pi}{L}\right)^2$$
6. **Temporal part:**
Solve
$$T' + c^2 \lambda T = 0 \implies T(t) = C e^{-c^2 \lambda t} = C e^{-\left(\frac{c n \pi}{L}\right)^2 t}$$
7. **General solution:**
Sum over all $n$:
$$u(x,t) = A_0 + \sum_{n=1}^\infty A_n \cos\left(\frac{n \pi x}{L}\right) e^{-\left(\frac{c n \pi}{L}\right)^2 t}$$
where $A_0$ corresponds to $n=0$ mode (constant in space).
8. **Find coefficients $A_n$ from initial condition:**
Given
$$u(x,0) = f(x) = 1 - \frac{x}{\pi}$$
Use Fourier cosine series on $[0,L]$ with $L=\pi$:
$$A_0 = \frac{1}{L} \int_0^L f(x) dx$$
$$A_n = \frac{2}{L} \int_0^L f(x) \cos\left(\frac{n \pi x}{L}\right) dx$$
Calculate $A_0$:
$$A_0 = \frac{1}{\pi} \int_0^{\pi} \left(1 - \frac{x}{\pi}\right) dx = \frac{1}{\pi} \left[ x - \frac{x^2}{2 \pi} \right]_0^{\pi} = \frac{1}{\pi} \left( \pi - \frac{\pi^2}{2 \pi} \right) = \frac{1}{\pi} \left( \pi - \frac{\pi}{2} \right) = \frac{1}{2}$$
Calculate $A_n$ for $n \geq 1$:
$$A_n = \frac{2}{\pi} \int_0^{\pi} \left(1 - \frac{x}{\pi}\right) \cos(n x) dx = \frac{2}{\pi} \left[ \int_0^{\pi} \cos(n x) dx - \frac{1}{\pi} \int_0^{\pi} x \cos(n x) dx \right]$$
First integral:
$$\int_0^{\pi} \cos(n x) dx = \left[ \frac{\sin(n x)}{n} \right]_0^{\pi} = 0$$
Second integral by parts:
Let $u = x$, $dv = \cos(n x) dx$;
then $du = dx$, $v = \frac{\sin(n x)}{n}$.
$$\int_0^{\pi} x \cos(n x) dx = \left. x \frac{\sin(n x)}{n} \right|_0^{\pi} - \int_0^{\pi} \frac{\sin(n x)}{n} dx = 0 - \frac{1}{n} \int_0^{\pi} \sin(n x) dx$$
Calculate:
$$\int_0^{\pi} \sin(n x) dx = \left[ -\frac{\cos(n x)}{n} \right]_0^{\pi} = -\frac{\cos(n \pi) - 1}{n} = -\frac{(-1)^n - 1}{n}$$
So,
$$\int_0^{\pi} x \cos(n x) dx = - \frac{1}{n} \left(-\frac{(-1)^n - 1}{n} \right) = \frac{(-1)^n - 1}{n^2}$$
Therefore,
$$A_n = \frac{2}{\pi} \left(0 - \frac{1}{\pi} \cdot \frac{(-1)^n - 1}{n^2} \right) = - \frac{2}{\pi^2} \frac{(-1)^n - 1}{n^2}$$
Note that $(-1)^n - 1$ is zero for even $n$ and $-2$ for odd $n$:
- For even $n$, $A_n=0$.
- For odd $n$, $A_n = - \frac{2}{\pi^2} \frac{-2}{n^2} = \frac{4}{\pi^2 n^2}$.
9. **Final temperature distribution:**
$$u(x,t) = \frac{1}{2} + \sum_{\substack{n=1 \\ n \text{ odd}}}^\infty \frac{4}{\pi^2 n^2} \cos(n x) e^{-n^2 t}$$
This series represents the temperature distribution for the insulated bar with given initial condition.