Where does my attempt to use integration by parts on the coefficients of a Fourier series fail?

96 Views Asked by At

I was thinking about Fourier series and I realized that the coefficients are always given in terms of a definite integral. Out of curiosity I tried to use integration by parts to find a different formula, but I'm not able to. I'm curious as to why my approach doesn't work.

I start with

$$ \int f(x)\cos(nx) dx = F(x)\cos(nx) + n\int f(x)\sin(nx)dx $$ $$ \int f(x)\sin(nx) dx = F(x)\sin(nx) - n\int f(x)\cos(nx)dx $$

where $F(x)$ is the antiderivative of $f(x)$ and substitution leads to

$$ \int f(x)\cos(nx) dx = F(x)\cos(nx) + nF(x)\sin(nx) - n^{2}\int f(x)\cos(nx)dx $$ $$ \int f(x)\cos(nx) dx = \frac{F(x)[\cos(nx) + n\sin(nx)]}{n^{2} + 1} + c$$

and now $$ \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(nx)dx = \frac{1}{\pi(n^2 + 1)}[F(\pi)[\cos(n\pi) + n\sin(n\pi)] - F(-\pi)[\cos(-n\pi) + n\sin(-n\pi)]]$$

Using the evenness and oddness of cos and sin leads to

$$ \frac{1}{\pi(n^2 + 1)}[F(\pi)[\cos(n\pi) + n\sin(n\pi)] - F(-\pi)[\cos(n\pi) - n\sin(n\pi)]]$$

and since $$ \sin(n\pi) = 0 $$ for $n = 0, 1, 2, \cdots$

$$ \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(nx)dx = \frac{[F(\pi) - F(-\pi)]\cos(n\pi)}{\pi(n^2 + 1)} $$

I did to same procedure to arrive at

$$ \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\sin(nx)dx = \frac{[F(-\pi) - F(\pi)]n\cos(n\pi)}{\pi(n^2 + 1)} $$

But these results are nonsense. If $F(x)$ is an even function, then the coefficients end up as $0$.

1

There are 1 best solutions below

0
On BEST ANSWER

There's an error in your first line. It should be $$\int f(x)\cos(nx)\, dx = F(x)\cos(nx) + n\int F(x)\sin(nx)\,dx.$$