1. **Problem statement:** Find the eigenfunction expansion of $f(x) = x$ using the eigenfunctions $y_n(x) = \sin\left(\frac{n\pi x}{L}\right)$ from the Sturm-Liouville problem $y'' + \lambda y = 0$ with boundary conditions $y(0) = y(L) = 0$.
2. **Formula and rules:** The eigenfunction expansion is given by
$$f(x) = \sum_{n=1}^\infty c_n y_n(x) = \sum_{n=1}^\infty c_n \sin\left(\frac{n\pi x}{L}\right)$$
where the coefficients $c_n$ are found by the orthogonality of sine functions:
$$c_n = \frac{2}{L} \int_0^L f(x) \sin\left(\frac{n\pi x}{L}\right) dx$$
3. **Calculate $c_n$ for $f(x) = x$:**
$$c_n = \frac{2}{L} \int_0^L x \sin\left(\frac{n\pi x}{L}\right) dx$$
Use integration by parts:
Let $u = x$, $dv = \sin\left(\frac{n\pi x}{L}\right) dx$.
Then $du = dx$, and
$$v = -\frac{L}{n\pi} \cos\left(\frac{n\pi x}{L}\right)$$
4. **Apply integration by parts:**
$$\int_0^L x \sin\left(\frac{n\pi x}{L}\right) dx = \left. -x \frac{L}{n\pi} \cos\left(\frac{n\pi x}{L}\right) \right|_0^L + \int_0^L \frac{L}{n\pi} \cos\left(\frac{n\pi x}{L}\right) dx$$
5. **Evaluate boundary terms:**
$$-L \frac{L}{n\pi} \cos(n\pi) + 0 = -\frac{L^2}{n\pi} (-1)^n$$
6. **Evaluate the integral:**
$$\int_0^L \frac{L}{n\pi} \cos\left(\frac{n\pi x}{L}\right) dx = \frac{L}{n\pi} \left. \frac{L}{n\pi} \sin\left(\frac{n\pi x}{L}\right) \right|_0^L = 0$$
7. **Combine results:**
$$\int_0^L x \sin\left(\frac{n\pi x}{L}\right) dx = -\frac{L^2}{n\pi} (-1)^n$$
8. **Calculate $c_n$:**
$$c_n = \frac{2}{L} \times \left(-\frac{L^2}{n\pi} (-1)^n\right) = \frac{2L}{n\pi} (-1)^{n+1}$$
9. **Final eigenfunction expansion:**
$$f(x) = x = \sum_{n=1}^\infty \frac{2L}{n\pi} (-1)^{n+1} \sin\left(\frac{n\pi x}{L}\right)$$
This matches the manual solution given.
Eigenfunction Expansion Ba0C70
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.