Contradictory results when determine the Coefficients of $f(x)=\sum_{n=1}^{\infty}a_n\sin(nx)$

29 Views Asked by At

Suppose we have a equation \begin{equation} f(x)=\sum_{n=1}^{\infty}a_n\sin(nx) \end{equation} and we need to find $a_n$. Here $f(x)$ is a smooth odd function defined on $[-\pi,\pi]$. The answer is \begin{equation} a_n=\frac{\int_{-\pi}^{\pi}f(x)\sin(nx)\mathrm{d}x}{\int_{-\pi}^{\pi}\sin^2(nx)\mathrm{d}x} \end{equation} by using \begin{equation} \int_{-\pi}^{\pi}\sin(mx)\sin(nx)\mathrm{d}x\sim\delta_{mn},\quad m,n\in\mathbb{Z}^+. \end{equation} But if we integrate the equation $f(x)=\sum_{n=1}^{\infty}a_n\sin(nx)$ with $x$ on $[0,\pi]$, we can obtain \begin{equation} C=\sum_{n=1}^{\infty}a_nb_n, \end{equation} where $C=\int_0^\pi f(x)\mathrm{d}x$ is a constant and $b_n=\int_0^\pi \sin(nx)\mathrm{d}x$ is a series of constants. It seems like we have a number of optional $a_n$ to satisfy $C=\sum_{n=1}^{\infty}a_nb_n$ such as \begin{equation} a_n\equiv\frac{C}{2^n b_n}. \end{equation} But this result conflicts with the correct result $a_n=\frac{\int_{-\pi}^{\pi}f(x)\sin(nx)\mathrm{d}x}{\int_{-\pi}^{\pi}\sin^2(nx)\mathrm{d}x}$. What's wrong?