Note: The formulas for the Fourier transform are often given in the form $\frac{1}{p}\displaystyle\int_{-p}^pf(x)cos\left(\frac{n\pi x}{p}\right) dx$, with the $\frac{1}{p}$ outside the integral. Computing these integrals will often involve u-substitutions, integration by parts, and other integration techniques that will produce all kinds of constants. With the way these problems are asked in WeBWorK, it would be hard to keep track of when constants should be factored out or not, so we will adopt the policy that constants are always part of the integrand. For example the formula for the cosine coefficient would be $\displaystyle\int_{-p}^p\frac{1}{p}f(x)cos\left(\frac{n\pi x}{p}\right) dx$. When performing an integration by parts, all constants are included in the u term.

Compute the Fourier series of the function $f(x) = \begin{cases} 1 , & -3 < x < 0 \cr x, & 0 \leq x < 3 \cr \end{cases}$

 $a_0$ $=$ $\displaystyle\int$ $dx +$ $\displaystyle\int$ $dx =$

 $a_n$ $=$ $\displaystyle\int$ $dx+$ $\displaystyle\int$ $dx$

$\hskip 300pt\displaystyle u =$ $dv =$

$\hskip 300pt\displaystyle du =$ $v =$

 $\hskip 23pt =$ $\Bigg\vert$ $+$ $\Bigg\vert$ $-$ $\displaystyle\int$ $dx$

 $\hskip 23pt =$ $+$ $+$ $\Bigg\vert$

$\hskip 30pt\displaystyle =$

 $b_n$ $=$ $\displaystyle\int$ $dx+$ $\displaystyle\int$ $dx$

$\hskip 300pt\displaystyle u =$ $dv =$

$\hskip 300pt\displaystyle du =$ $v =$

 $\hskip 23pt =$ $\Bigg\vert$ $+$ $\Bigg\vert$ $+$ $\displaystyle\int$ $dx$

 $\hskip 23pt =$ $+$ $+$ $\Bigg\vert$

$\hskip 30pt\displaystyle =$

Therefore on $[-3,3]$

$\displaystyle f(x) =$ $+\displaystyle\sum\limits_{n=1}^\infty\Bigg[$$\displaystyle\cos\left(\frac{n\pi x}{3}\right) +$$\displaystyle\sin\left(\frac{n\pi x}{3}\right) \Bigg]$