Find the Fourier trigonometric series of a piece-wise function and then prove a certain sum.

32 Views Asked by At

I have the following problem. f is $2\pi$-periodic. Find it's Fourier series and then prove that $\sum_{1}^{\infty}\frac{n\sin(n)+\cos(n)-1}{n^2}=-\frac{1}{4}$ \begin{equation*} f(x)= \begin{cases} 0 & -\pi\leq x<-1 \\ -x & -1\leq x<0\\ x & 0\leq x<1 \\ 0 & 1\leq x<\pi \end{cases} \end{equation*}

Given a series in [-L,L]: $f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}(a_n cos(\frac{n\pi x}{L})+b_n sin(\frac{n\pi x}{L}))$, where

$a_n=\frac{1}{L} \int_{-L}^{L}f(t)cos(\frac{n\pi t}{L})dt$, and $b_n=\frac{1}{L} \int_{-L}^{L}f(t)sin(\frac{n\pi t}{L})dt$.

What I did: Since $f=0$ between $-\pi\leq x<-1$, and $1\leq x<\pi$,

$$a_0=\frac{1}{\pi} \int_{-\pi}^{\pi}f dt=\int_{-1}^{1}f(t)dt=\int_{-1}^{1}|t|dt=2\int_{0}^{1}tdt=1$$.I'm not sure if the first equality is correct (I'm using $L=\pi$ for the first integral and $L=1$ for the second one. Then I used that the absolute value function is even in the interval. I repeted the same argument of the $a_{n}$ coefficients:

$$a_n=\frac{1}{\pi} \int_{-\pi}^{\pi}f \cos(\frac{n\pi t}{\pi})dt=2\int_{0}^{1}t \cos(n\pi t)dt=2(\frac{t \sin(n\pi t)}{n\pi}\rvert_{1,0}-\int_{0}^{1}\sin(\frac{n\pi t}{n\pi})dt)=\frac{2}{n\pi}(\frac{cos(n\pi t)}{n\pi}\rvert_{1,0})=\frac{2}{(n\pi)^2}(\underbrace{\cos(n\pi)}_{(-1)^n}-1)$$ So I get that $a_n=0$ for even n, and $a_n=-\frac{4}{(n\pi)^2}$ for odd n. On the other hand I know that all the $b_n$ coefficients are zero since I have an odd function over an even interval. Then

$$f(x)=1+\sum_{n=1}^{\infty}\frac{2((-1)^n -1) \cos(n\pi x)}{(n\pi)^2}$$

I would appreciate any help.

EDIT:

$$a_0=\frac{1}{\pi} \int_{-\pi}^{\pi}f(t) dt=\frac{1}{\pi}\int_{-1}^{1}f(t)dt=\frac{1}{\pi}\int_{-1}^{1}|t|dt=\frac{2}{\pi}\int_{0}^{1}tdt=\frac{1}{\pi}$$ And $$a_n=\frac{1}{\pi} \int_{-\pi}^{\pi}f(t) \cos(\frac{n\pi t}{\pi})dt=\frac{2}{\pi}\int_{0}^{1}t \cos(n t)dt=\frac{2}{\pi}(\frac{t \sin(n t)}{n}\rvert_{1,0}-\int_{0}^{1}\frac{\sin(n t)}{n}dt)=\frac{2}{\pi}(\frac{\sin(n)}{n}+\frac{\cos(n t)}{n^2}\rvert_{1,0})=\frac{2}{\pi}(\frac{\sin(n)}{n}+\frac{\cos(n)}{n^2}-\frac{1}{n^2})$$

$$f(x)=\frac{1}{\pi}+\sum_{n=1}^{\infty}\frac{2}{\pi}(\frac{\sin(n)}{n}+\frac{\cos(n)}{n^2}-\frac{1}{n^2}) \cos(n\pi x)$$