Subjects partial differential equations

Heat Equation 948B5D

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem Statement:** We want to solve the heat equation for a rod of length $L$ with zero temperature at both ends and an initial temperature distribution $f(x)$. The problem is: $$u_t(x,t) = k u_{xx}(x,t), \quad 0 < x < L, t > 0$$ $$u(0,t) = 0, \quad u(L,t) = 0, \quad t > 0$$ $$u(x,0) = f(x), \quad 0 < x < L$$ 2. **Method: Separation of Variables** We assume the solution can be written as a product of two functions, one depending only on $x$ and the other only on $t$: $$u(x,t) = X(x) T(t)$$ 3. **Substitute into the PDE:** Calculate derivatives: $$u_t = X(x) T'(t), \quad u_{xx} = X''(x) T(t)$$ Substitute into the heat equation: $$X(x) T'(t) = k X''(x) T(t)$$ Divide both sides by $k X(x) T(t)$ (assuming none are zero): $$\frac{T'(t)}{k T(t)} = \frac{X''(x)}{X(x)} = -\lambda$$ Here, $-\lambda$ is a separation constant. This means both sides equal the same constant. 4. **Separate into two ODEs:** For $X(x)$: $$X''(x) + \lambda X(x) = 0$$ With boundary conditions: $$X(0) = 0, \quad X(L) = 0$$ For $T(t)$: $$T'(t) + k \lambda T(t) = 0$$ 5. **Solve the spatial ODE:** The general solution for $X(x)$ when $\lambda > 0$ is: $$X(x) = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x)$$ Apply boundary conditions: - At $x=0$: $X(0) = A = 0$ so $A=0$. - At $x=L$: $X(L) = B \sin(\sqrt{\lambda} L) = 0$. For nontrivial solution ($B \neq 0$), we require: $$\sin(\sqrt{\lambda} L) = 0 \implies \sqrt{\lambda} L = n \pi, \quad n=1,2,3,...$$ Thus, $$\lambda_n = \left(\frac{n \pi}{L}\right)^2$$ and eigenfunctions: $$X_n(x) = \sin\left(\frac{n \pi}{L} x\right)$$ 6. **Solve the temporal ODE:** $$T'(t) + k \lambda_n T(t) = 0$$ This is a first order linear ODE with solution: $$T_n(t) = C_n e^{-k \lambda_n t} = C_n e^{-k \left(\frac{n \pi}{L}\right)^2 t}$$ 7. **Combine solutions:** The product solutions are: $$u_n(x,t) = C_n \sin\left(\frac{n \pi}{L} x\right) e^{-k \left(\frac{n \pi}{L}\right)^2 t}$$ By the principle of superposition, the general solution is: $$u(x,t) = \sum_{n=1}^\infty C_n \sin\left(\frac{n \pi}{L} x\right) e^{-k \left(\frac{n \pi}{L}\right)^2 t}$$ 8. **Determine coefficients $C_n$ from initial condition:** At $t=0$, we have: $$u(x,0) = f(x) = \sum_{n=1}^\infty C_n \sin\left(\frac{n \pi}{L} x\right)$$ This is the Fourier sine series expansion of $f(x)$ on $(0,L)$. The coefficients are given by: $$C_n = \frac{2}{L} \int_0^L f(x) \sin\left(\frac{n \pi}{L} x\right) dx$$ 9. **Example: If $f(x) = x$ and $L=1$** Calculate: $$C_n = 2 \int_0^1 x \sin(n \pi x) dx$$ Using integration by parts: $$C_n = \frac{2 (-1)^{n+1}}{n \pi}$$ 10. **Final solution:** $$u(x,t) = \sum_{n=1}^\infty \frac{2 (-1)^{n+1}}{n \pi} \sin(n \pi x) e^{-k (n \pi)^2 t}$$ **Summary:** - We separated variables to reduce PDE to ODEs. - Solved spatial ODE with boundary conditions to find eigenvalues and eigenfunctions. - Solved temporal ODE to get exponential decay terms. - Used Fourier series to match initial condition. - The solution describes how heat diffuses over time in the rod with fixed zero temperature ends.