Subjects partial differential equations

Heat Equation 3215C7

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

Search Solutions

Heat Equation 3215C7


1. **Problem statement:** Solve the heat equation $$\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}$$ with boundary conditions $$u(x,0) = 3 \sin n\pi x,$$ $$u(0,t) = 0,$$ and $$u(1,t) = 0,$$ for $$0 < x < 1, t > 0$$ using separation of variables. 2. **Method:** Assume a solution of the form $$u(x,t) = X(x)T(t).$$ Substitute into the PDE: $$X(x) T'(t) = X''(x) T(t).$$ Divide both sides by $$X(x)T(t)$$ (assuming nonzero): $$\frac{T'(t)}{T(t)} = \frac{X''(x)}{X(x)} = -\lambda,$$ where $$\lambda$$ is a separation constant. 3. **Solve spatial part:** $$X'' + \lambda X = 0,$$ with boundary conditions $$X(0) = 0$$ and $$X(1) = 0.$$ This is a Sturm-Liouville problem with eigenvalues and eigenfunctions: $$\lambda_n = (n\pi)^2, \quad X_n(x) = \sin n\pi x, \quad n=1,2,3,\ldots$$ 4. **Solve temporal part:** $$T'(t) + \lambda T(t) = 0 \implies T'(t) = -\lambda T(t).$$ General solution: $$T_n(t) = C_n e^{-\lambda_n t} = C_n e^{-(n\pi)^2 t}.$$ 5. **Combine solutions:** $$u_n(x,t) = C_n e^{-(n\pi)^2 t} \sin n\pi x.$$ 6. **Apply initial condition:** $$u(x,0) = 3 \sin n\pi x = \sum_{n=1}^\infty C_n \sin n\pi x.$$ Since the initial condition matches a single sine term with coefficient 3, we have: $$C_n = 3$$ for the given $$n$$ and zero otherwise. 7. **Final solution:** $$\boxed{u(x,t) = 3 e^{-(n\pi)^2 t} \sin n\pi x}.$$