Found a typo? Is this solution unclear? Let us know here. Please rate my easiness! It's quick and helps everyone guide their studies.
We will start by computing the Fourier sine series. The Fourier sine series of is given by
where
for
Here, we have and . So
![{\displaystyle b_{n}=2\int _{0}^{1}x\;\sin(n\pi x)\;dx.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/9ef3b43a14c19c8f2326d8124c78abb1de846a00)
Integrate by parts using
![{\displaystyle u=x\;\;\;\;\;\;dv=\sin(n\pi x)\;dx}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/c7c325c99c62eb383e005f5eb0e16fa6ccb015e6)
![{\displaystyle du=dv\;\;\;\;v={\frac {-1}{n\pi }}\cos(n\pi x),}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/f510680569fb5bb53c4dca94436f8a58bd2e53d1)
we get that
![{\displaystyle {\begin{aligned}b_{n}&=2[{\frac {-x}{n\pi }}\cos(n\pi x)|_{0}^{1}+{\frac {1}{n\pi }}\int _{0}^{1}\cos(n\pi x)\;dx]\\&=2[{\color {blue}{\frac {-x}{n\pi }}\cos(n\pi x)|_{0}^{1}}+{\color {Brown}({\frac {1}{n\pi }})^{2}\sin(n\pi x)|_{0}^{1}}]\\&=2[{\color {blue}{\frac {-1}{n\pi }}\cos(n\pi )+0}+{\color {Brown}({\frac {1}{n\pi }})^{2}\sin(n\pi )-({\frac {1}{n\pi }})^{2}\sin(0)}].\end{aligned}}}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/a9ae0fe8ba9c51179a1d24b6b65351fd1b175b8a)
Since and , we get that
![{\displaystyle b_{n}={\frac {-2}{n\pi }}\underbrace {\cos(n\pi )} _{=(-1)^{n}}={\frac {-2}{n\pi }}(-1)^{n}={\frac {2}{n\pi }}(-1)^{n+1}\;\;}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/7fc27bd841adb4394f831c441575d1370ff24207)
for
Therefore, the Fourier sine series of is
![{\displaystyle Sf(x)=\sum _{n=1}^{\infty }b_{n}\sin({\frac {n\pi x}{L}})=\sum _{n=1}^{\infty }{\frac {2}{n\pi }}(-1)^{n+1}\sin(n\pi x).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/b57f86e6ec653417bb3e8b8ec8463768cb8c9cd0)
Next, we will find the Fourier cosine series. The Fourier cosine series of is given by
![{\displaystyle Cf(x)={\frac {a_{0}}{2}}+\sum _{n=1}^{\infty }a_{n}\cos({\frac {n\pi x}{L}})\;\;}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/78a83e6c3b35983320c24e048a50600f53a1a168)
where
for
With and ,
![{\displaystyle a_{n}=2\int _{0}^{1}x\;\cos(n\pi x)\;dx.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/df264fb66d88173e00d0c4b70565de969fa32dd3)
When we have that =1 and so we have two distinct cases for evaluating the integral; when and when . For the case where , integrate by parts using
![{\displaystyle u=x\;\;\;\;\;\;dv=\cos(n\pi x)\;dx}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/a9decda9b3e0603f31cfa6b6bf753187ae51bd50)
![{\displaystyle du=dv\;\;\;\;v={\frac {1}{n\pi }}\sin(n\pi x),}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/ad98fa1f3f592227a0007fe3d66e9a32f7338306)
we get that
Since , we get that
![{\displaystyle a_{n}=2[({\frac {1}{n\pi }})^{2}\underbrace {\cos(n\pi )} _{=(-1)^{n}}-({\frac {1}{n\pi }})^{2}\underbrace {\cos(0)} _{=1}]=2({\frac {1}{n\pi }})^{2}[(-1)^{n}-1]\;\;}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/36c02c9c903aa3add9af62cbdbd8e066e9bb2f98)
for
Now for the case where , we get
![{\displaystyle a_{0}=2\int _{0}^{1}x\;\cos(0)dx=2\int _{0}^{1}xdx=2({\frac {1}{2}}x^{2})|_{0}^{1}=1.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/c642ab61a9f9995c7aec316daab9efbcc06d1163)
Therefore, the Fourier cosine series of is
![{\displaystyle Cf(x)={\frac {a_{0}}{2}}+\sum _{n=1}^{\infty }a_{n}\cos(n\pi x)={\frac {1}{2}}+\sum _{n=1}^{\infty }2({\frac {1}{n\pi }})^{2}[(-1)^{n}-1]\cos(n\pi x).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/48c7db69965ab23bbe46c097d94d6b4b2a578b68)
|