Find $\sum_{n = 1}^\infty b_n \sin(nx) = e^x$ for $0 < x < \pi$: Discrepancy Between Solutions.

89 Views Asked by At

I'm trying to find $\sum_{n = 1}^\infty b_n \sin(nx) = e^x$ for $0 < x < \pi$.

The domain of our problem is $[0, \pi]$, but as I understand it, the domain of Fourier series is $[-\pi, \pi]$ (or $[-L, L]$ in general). As I understand it, this, combined with the fact that we have a Fourier odd series, means that we need an odd extension of $e^x$.

So I defined

$f(x) = \begin{cases} e^x & 0 < x < \pi \\ -e^{-x} & -\pi < x < 0 \\ \end{cases}$

Continuing with my understanding, we get

$$b_n = \dfrac{2}{\pi}\int^{\pi}_0 e^x \sin(nx) \ dx + \dfrac{2}{\pi} \int^{0}_{-\pi} -e^{-x} \sin(nx) \ dx$$

However, after using an online calculator, this seems to be different from the solution my instructor provided:

$$\sum_{n = 1}^\infty b_n \sin(nx) = e^x$$

$$\implies b_n = \dfrac{4n}{\pi(1 + n^2)},\ n\text{ odd.}$$

I would greatly appreciate it if people could please take the time to clarify this. Is there an error in my Fourier series calculation, or is the instructors solution erroneous?

1

There are 1 best solutions below

0
On BEST ANSWER

$\{ \sin nx \}_{n=1}^{\infty}$ is a complete orthogonal basis of functions for $L^2[0,\pi]$. So $$ e^{x} = \sum_{n=1}^{\infty}\frac{\int_{0}^{\pi} e^{x}\sin nx dx}{\int_{0}^{\pi}\sin^2 nx dx } \sin nx, \;\;\; a.e. x\in [0,\pi]. $$ And the two sides will agree everywhere except at the endpoints. The normalization constants are \begin{align} \int_{0}^{\pi}\sin^2 nx dx & = \frac{1}{2}\int_{-\pi}^{\pi}\sin^2 nx dx \\ & = \frac{1}{4}\int_{-\pi}^{\pi}\sin^2 nx + \cos^2 nx dx \\ & = \frac{1}{4}\int_{-\pi}^{\pi} dx = \frac{\pi}{2}. \end{align} And \begin{align} \int_{0}^{\pi} e^{x}\sin nx dx & = \Im \int_{0}^{\pi}e^{x}e^{inx}dx \\ & = \left.\Im \frac{1}{1+in}e^{x(1+in)}\right|_{x=0}^{\pi} \\ & = \Im\frac{1-in}{1+n^2}((-1)^ne^{\pi}-1) \\ & = \frac{n}{1+n^2}((-1)^{n+1}e^{\pi}+1) \end{align} So the orthogonal $\sin$ series that I get for $e^x$ on $[0,\pi]$ is $$ e^x = \sum_{n=1}^{\infty}\frac{2n}{\pi(1+n^2)}((-1)^{n+1}e^\pi+1)\sin nx. $$