Subjects fourier analysis

Fourier Xsinx 1Ef23E

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

Use the AI math solver

1. **Problem statement:** Expand the function $f(x) = x \sin x$ defined on the interval $-\pi < x < \pi$ into a Fourier series. 2. **Fourier series formula:** For a function defined on $(-\pi, \pi)$, the Fourier series is given by: $$f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty \left(a_n \cos nx + b_n \sin nx\right)$$ where $$a_0 = \frac{1}{\pi} \int_{-\pi}^\pi f(x) \, dx$$ $$a_n = \frac{1}{\pi} \int_{-\pi}^\pi f(x) \cos nx \, dx$$ $$b_n = \frac{1}{\pi} \int_{-\pi}^\pi f(x) \sin nx \, dx$$ 3. **Check parity:** Since $f(x) = x \sin x$, note that $x$ is odd and $\sin x$ is odd, so their product is even (odd * odd = even). Therefore, $f(x)$ is an even function. 4. **Simplify coefficients:** For even functions, all $b_n = 0$ because $b_n$ involve integration of an even function times an odd function ($\sin nx$), which is odd and integrates to zero over symmetric interval. 5. **Calculate $a_0$:** $$a_0 = \frac{1}{\pi} \int_{-\pi}^\pi x \sin x \, dx = \frac{2}{\pi} \int_0^\pi x \sin x \, dx$$ Use integration by parts: Let $u = x$, $dv = \sin x dx$, then $du = dx$, $v = -\cos x$. $$\int x \sin x \, dx = -x \cos x + \int \cos x \, dx = -x \cos x + \sin x + C$$ Evaluate from 0 to $\pi$: $$\int_0^\pi x \sin x \, dx = [-x \cos x + \sin x]_0^\pi = [-\pi \cos \pi + \sin \pi] - [0 + 0] = -\pi (-1) + 0 = \pi$$ So, $$a_0 = \frac{2}{\pi} \times \pi = 2$$ 6. **Calculate $a_n$:** $$a_n = \frac{2}{\pi} \int_0^\pi x \sin x \cos nx \, dx$$ Use product-to-sum formula: $$\sin x \cos nx = \frac{1}{2} [\sin (n+1)x + \sin (1-n)x]$$ So, $$a_n = \frac{2}{\pi} \times \frac{1}{2} \int_0^\pi x [\sin (n+1)x + \sin (1-n)x] \, dx = \frac{1}{\pi} \left( \int_0^\pi x \sin (n+1)x \, dx + \int_0^\pi x \sin (1-n)x \, dx \right)$$ 7. **Evaluate integrals:** Use integration by parts for each integral: For general $m$, $$\int_0^\pi x \sin mx \, dx = \left[-\frac{x \cos mx}{m} + \frac{\sin mx}{m^2}\right]_0^\pi = -\frac{\pi \cos m\pi}{m} + \frac{\sin m\pi}{m^2} - 0 = -\frac{\pi (-1)^m}{m} + 0 = -\frac{\pi (-1)^m}{m}$$ Apply for $m = n+1$ and $m = 1-n$: $$\int_0^\pi x \sin (n+1)x \, dx = -\frac{\pi (-1)^{n+1}}{n+1}$$ $$\int_0^\pi x \sin (1-n)x \, dx = -\frac{\pi (-1)^{1-n}}{1-n}$$ 8. **Substitute back:** $$a_n = \frac{1}{\pi} \left(-\frac{\pi (-1)^{n+1}}{n+1} - \frac{\pi (-1)^{1-n}}{1-n} \right) = -\frac{(-1)^{n+1}}{n+1} - \frac{(-1)^{1-n}}{1-n}$$ Note that $(-1)^{1-n} = (-1)(-1)^n = -(-1)^n$, so $$a_n = -\frac{(-1)^{n+1}}{n+1} + \frac{(-1)^n}{1-n}$$ Rewrite $a_n$: $$a_n = -\frac{(-1)^{n+1}}{n+1} + \frac{(-1)^n}{1-n} = \frac{(-1)^n}{n+1} + \frac{(-1)^n}{1-n} = (-1)^n \left( \frac{1}{n+1} + \frac{1}{1-n} \right)$$ 9. **Simplify the sum inside parentheses:** $$\frac{1}{n+1} + \frac{1}{1-n} = \frac{1-n + n+1}{(n+1)(1-n)} = \frac{2}{(n+1)(1-n)}$$ 10. **Final formula for $a_n$:** $$a_n = (-1)^n \frac{2}{(n+1)(1-n)}$$ 11. **Fourier series expansion:** $$f(x) = x \sin x = 1 + \sum_{n=1}^\infty (-1)^n \frac{2}{(n+1)(1-n)} \cos nx$$ where $a_0/2 = 2/2 = 1$ and $b_n = 0$. **Answer:** $$\boxed{f(x) = 1 + \sum_{n=1}^\infty (-1)^n \frac{2}{(n+1)(1-n)} \cos nx}$$