Fourier Sine Cosine 67Ae92
1. **Problem statement:** Expand $f(x) = \cos x$ for $0 < x < \pi$ in a Fourier sine series and determine the values of $f(x)$ at $x=0$ and $x=\pi$ for convergence.
2. **Fourier sine series formula:** For a function defined on $(0, \pi)$, the Fourier sine series is
$$f(x) \sim \sum_{n=1}^\infty b_n \sin(nx)$$
where
$$b_n = \frac{2}{\pi} \int_0^\pi f(x) \sin(nx) \, dx$$
3. **Calculate coefficients $b_n$:**
$$b_n = \frac{2}{\pi} \int_0^\pi \cos x \sin(nx) \, dx$$
Use the product-to-sum identity:
$$\cos x \sin(nx) = \frac{1}{2}[\sin((n+1)x) - \sin((n-1)x)]$$
So,
$$b_n = \frac{2}{\pi} \cdot \frac{1}{2} \int_0^\pi [\sin((n+1)x) - \sin((n-1)x)] \, dx = \frac{1}{\pi} \left[ \int_0^\pi \sin((n+1)x) \, dx - \int_0^\pi \sin((n-1)x) \, dx \right]$$
4. **Evaluate integrals:**
$$\int_0^\pi \sin(kx) \, dx = \left[-\frac{\cos(kx)}{k}\right]_0^\pi = \frac{1 - \cos(k\pi)}{k}$$
Since $\cos(k\pi) = (-1)^k$,
$$\int_0^\pi \sin(kx) \, dx = \frac{1 - (-1)^k}{k}$$
5. **Apply to each term:**
$$b_n = \frac{1}{\pi} \left[ \frac{1 - (-1)^{n+1}}{n+1} - \frac{1 - (-1)^{n-1}}{n-1} \right]$$
6. **Simplify parity terms:**
Note that $(-1)^{n+1} = -(-1)^n$ and $(-1)^{n-1} = (-1)^n$.
So,
$$b_n = \frac{1}{\pi} \left[ \frac{1 + (-1)^n}{n+1} - \frac{1 - (-1)^n}{n-1} \right]$$
7. **Analyze $b_n$ for even and odd $n$:**
- For $n$ even, $(-1)^n = 1$:
$$b_n = \frac{1}{\pi} \left[ \frac{2}{n+1} - 0 \right] = \frac{2}{\pi(n+1)}$$
- For $n$ odd, $(-1)^n = -1$:
$$b_n = \frac{1}{\pi} \left[ 0 - \frac{2}{n-1} \right] = -\frac{2}{\pi(n-1)}$$
8. **Handle $n=1$ case separately:**
At $n=1$, denominator $n-1=0$ is undefined. Compute directly:
$$b_1 = \frac{2}{\pi} \int_0^\pi \cos x \sin x \, dx = \frac{2}{\pi} \cdot \frac{1}{2} \int_0^\pi \sin(2x) \, dx = \frac{1}{\pi} \left[-\frac{\cos(2x)}{2}\right]_0^\pi = \frac{1}{\pi} \cdot \frac{1 - 1}{2} = 0$$
9. **Final formula for $b_n$:**
$$b_n = \begin{cases} \frac{2}{\pi(n+1)}, & n \text{ even} \\ -\frac{2}{\pi(n-1)}, & n \text{ odd}, n \neq 1 \\ 0, & n=1 \end{cases}$$
10. **Fourier sine series expansion:**
$$f(x) = \cos x \sim \sum_{n=1}^\infty b_n \sin(nx)$$
with $b_n$ as above.
11. **Values at boundaries for convergence:**
Fourier sine series converges to the odd extension of $f(x)$ on $[-\pi, \pi]$. Since $f(x) = \cos x$ on $(0, \pi)$, the odd extension is:
$$f(0) = 0, \quad f(\pi) = 0$$
Defining $f(0) = 0$ and $f(\pi) = 0$ ensures the series converges to $f(x)$ on $[0, \pi]$.
**Final answer:**
$$f(x) = \sum_{n=1}^\infty b_n \sin(nx), \quad b_n = \begin{cases} \frac{2}{\pi(n+1)}, & n \text{ even} \\ -\frac{2}{\pi(n-1)}, & n \text{ odd}, n \neq 1 \\ 0, & n=1 \end{cases}$$
with $f(0) = 0$ and $f(\pi) = 0$ for convergence.