\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage[colorlinks=true, linkcolor=blue, urlcolor=blue]{hyperref}
\pagenumbering{gobble}
\begin{document}

\vspace*{-1.4in}
\flushleft \underline{Honors Homework 4 -- MATH 2502 Spring 2019}\\
\vspace{0.1in}
The following problem concerns ``Fourier polynomials" which were invented \href{https://en.wikipedia.org/wiki/Joseph_Fourier}{\underline{Joseph Fourier}} in 1807. These polynomials were used to discover the first analytical solution to the \href{https://en.wikipedia.org/wiki/Heat_equation}{\underline{heat equation}}. They form the basis of \href{https://en.wikipedia.org/wiki/Fourier_series}{\underline{Fourier series}}, which have become one of the most useful techniques in mathematics, applicable to electical engineering, acoustics, optics, signal processing, quantum mechanics, and many other fields of study. \\

Let $f$ be a (continuous) function on the interval $[-\pi,\pi]$. Define the Fourier coefficients of $f$ by the formulas
\[ a_n = \dfrac{1}{\pi} \displaystyle\int_{-\pi}^{\pi} f(x)\cos(nx)\]
and
\[b_n = \dfrac{1}{\pi} \displaystyle\int_{-\pi}^{\pi} f(x) \sin(nx).\]
For $N=1,2,3,\ldots$ we define the Fourier polynomials by 
\[ P_N(x) = \dfrac{a_0}{2} + \displaystyle\sum_{k=1}^N [a_n \cos(nx) + b_n \sin(nx)].\]

\underline{Problems}
\begin{enumerate}[1.]
\item Let $f(x)=x$. Find the Fourier coefficients $a_0$, $a_1$, $a_2$, $a_3$, $a_4$, and $a_5$. Also find $b_0$, $b_1$, $b_2$, $b_3$, $b_4$, and $b_5$. It is OK to use \href{https://bit.ly/2N6gaGf}{\underline{software}} to complete these calculations (by hand it's a lot of integrations by parts).
\item Use your answer above to write down the first four Fourier polynomials $P_1(x)$, $P_2(x)$, $P_3(x)$, $P_4(x)$, and $P_5(x)$.
\item Plot $y=x$ and also plot these polynomials on the interval $[-2\pi,2\pi]$. (hint: easy to do on \href{https://www.desmos.com/calculator}{\underline{Desmos}}). What appears to be happening?
\item Repeat steps 1-4 but using the function $f(x)=x^2$. What appears to be happening?
\end{enumerate}
\end{document}