Finding the Fourier series of $2\pi$-periodical function on $[-\pi, \pi]$ when $f(x) = x + 2$ if $x < 0$ and $-3$ if $x \ge 0$.

75 Views Asked by At

I need to find the Fourier series of a $2\pi$-periodical function on $[-\pi, \pi]$ when $f(x) = x + 2$ if $x < 0$ and $-3$ if $x \ge 0$. I read the definitions and equations on the textbook but I just don't understand them. I don't even know how to begin.

1

There are 1 best solutions below

0
On

$ \begin{gathered} f( x) \ =\begin{cases} x+2\ & \ if-\pi < x< 0\\ -3 & \ if\ \ \ \ 0\leq x< \pi \end{cases} \ \\ \\ Fourier\ Series:\ \ a_{0} \ =\frac{1}{2\pi } \ \int ^{b}_{a} f( x) dx\ ,\ \ \ a_{n} =\frac{1}{\pi } \ \int ^{b}_{a} f( x) cosnxdx\ ,\ \ b_{n} =\frac{1}{\pi } \ \int ^{b}_{a} f( x) sinnxdx\\ \ a_{0} \ =\frac{1}{2\pi } \ \int ^{b}_{a} f( x) dx\ \ \ =\ \frac{1}{2\pi } \ \int ^{0}_{-\pi }( x+2) dx\ +\ \frac{1}{2\pi } \ \int ^{\pi }_{0} -3dx\ =\ \frac{1}{2\pi } \ \left(\frac{1}{2} x^{2} +2x\right)^{0}_{-\pi } \ \\ \ \ \ \ \ \ +\ \frac{1}{2\pi } \ ( -3x) \ |\ ^{\pi }_{0} \ =\ \frac{1}{2\pi }\left(\left(( 0+0) -\left(\frac{\pi ^{2}}{2} \ +2\pi \ \right)\right) \ +\ ( -3\pi -0\ )\right) \ =\ -\frac{\pi }{4} -\frac{1}{2}\\ ^{} a_{n} \ =\frac{1}{\pi } \ \int ^{b}_{a} f( x) cosnxdx\ \ \ =\ \frac{1}{\pi } \ \int ^{0}_{-\pi }( x+2) cosnxdx\ +\ \frac{1}{2\pi } \ \int ^{\pi }_{0} -3cosnxdx\\ \ \ \ \ \ \ \ =\frac{1}{\pi } \ \left(\int ^{0}_{-\pi } xcosnxdx\ +\int ^{0}_{-\pi } 2cosnxdx\ +\ \int ^{\pi }_{0} -3cosnxdx\right)\\ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ (( xsinnx\ +cosnx\ +2sinnx))^{0}_{-\pi } \ -3sinnx|\ ^{\pi }_{0})\\ \ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ ((( 0\ +1\ +0) -( 0+1+0)) \ -3( 0-0)) \ =\ 0\ \ ( for\ even\ n)\\ \ \ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ ((( 0\ +1\ +0) -( 0-1+0)) \ -( 0-0)) \ =\ \frac{2}{n\pi } \ \ ( for\ odd\ n)\\ \\ b_{n} \ =\frac{1}{\pi } \ \int ^{b}_{a} f( x) sinnxdx\ \ \ =\ \frac{1}{\pi } \ \int ^{0}_{-\pi }( x+2) sinnxdx\ +\ \frac{1}{\pi } \ \int ^{\pi }_{0} -3sinnxdx\\ \ \ \ \ \ \ =\frac{1}{\pi } \ \left(\int ^{0}_{-\pi } xsinnxdx\ +\int ^{0}_{-\pi } 2sinnxdx\ +\ \int ^{\pi }_{0} -3sinnxdx\right)\\ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ (( -xcosnx\ -sinnx\ -2cosnx))^{0}_{-\pi } \ +3cosnx) |\ ^{\pi }_{0})\\ \ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ ((( 0\ -0-2) -( \pi +0-2)) \ +3( 1-1)) \ =\ \frac{-\pi }{n\pi } \ \ =\ \frac{-1}{n} \ \ ( for\ even\ n)\\ \ \ \ \ \ \ \ \ \ =\frac{1}{n\pi } \ ((( 0\ -0\ -2) -( -\pi +0+2)) \ +3( -1-1)) \ =\ \frac{\pi -10\ }{n\pi } \ ( for\ odd\ n)\\ \\ so\ \ \ \ f( x) =\ a_{0} \ +\ \sum ^{\infty }_{n=1} a_{n} \ +\sum ^{\infty }_{n=1} b_{n}\\ \ \ \ \ \ \ \ \ f( x) =\left( -\frac{\pi }{4} -\frac{1}{2}\right) +\sum ^{\infty }_{n=1}\left(\frac{1-( -1)^{n}}{2n\pi }\right)( 2cosnx+( \pi -10) sinnx) +\sum ^{\infty }_{n=1}\left(\frac{1+( -1)^{n}}{2n}\right)( -sinnx) \end{gathered} $