- The **method of separation of variables** is used to solve PDEs by expressing the solution as a product of two functions, each depending on only one variable.
#### **Example: Solve**
\[
\frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2}
\]
1. **Assume a solution of the form:**
\[
u(x,t) = X(x)T(t)
\]
2. **Substituting in the given equation:**
\[
X(x) \frac{dT}{dt} = k T(t) \frac{d^2X}{dx^2}
\]
3. **Separating the variables:**
\[
\frac{1}{T} \frac{dT}{dt} = k \frac{1}{X} \frac{d^2X}{dx^2} = -\lambda
\]
4. **Solving for \( X(x) \) and \( T(t) \):**
\[
\frac{d^2X}{dx^2} + \lambda X = 0
\]
\[
\frac{dT}{dt} + k\lambda T = 0
\]
The solutions are:
\[
X(x) = A \cos \sqrt{\lambda} x + B \sin \sqrt{\lambda} x
\]
\[
T(t) = C e^{-k\lambda t}
\]
5. **Final solution:**
\[
u(x,t) = (A \cos \sqrt{\lambda} x + B \sin \sqrt{\lambda} x) e^{-k\lambda t}
\]