# Fourier Series of Periodic Functions

Tutorials on Fourier series are presented. In the first part an example is used to show how Fourier coefficients are calculated and in a second part you may use an app to further explore Fourier series of the same function.

## Fourier Series and Coefficients

Fourier series may be used to represent periodic functions as a linear combination of sine and cosine functions. If f(t) is a periodic function of period T, then under certain conditions, its Fourier series is given by:

where n = 1 , 2 , 3 , ... and T is the period of function f(t). an and bn are called Fourier coefficients and are given by

Example 1
Find the Fourier series of the periodic function f(t) defined by

Solution to Example 1
Coefficient a0 is given by

Coefficients an is given by

And coefficients bn is given by

A computation of the above coefficients gives
$a_0 = 0$, $a_n = 0$ and $b_n = \dfrac{2}{n\pi} (1 - \cos (n \pi))$
Note that $\cos (n \pi)$ may be written as
$cos (n \pi) = (-1)^n$
and that bn = 0 whenever n is even.
The given function f(t) has the following Fourier series

## Interactive Tutorial on Fourier Series

For numerical calculations purposes we cannot include an infinite number of terms in the series above, we therefore define function $f_N(t)$ with a limited number of terms $N$ as follows $f_N(t) = \sum_{n=1}^{N} \dfrac{2}{n\pi} (1-(-1)^n) \sin(\dfrac{2 n \pi t}{T})$ The app below may be used to explore the Fourier series of f(t) solved in example 1 above including a limited number of terms $N$ in the series and see how the graph of function $f_N(t)$ defined above becomes close to the graph of function f(t) as $N$ increases.

The default values are $N = 5$ and $T = 4$ and the series have one term which is a sinusoidal function of period T. Incease $N$ and compare the graph of the function obtained (in blue) to that of $f(t)$ (in red) defined in example.

 $N$ = 5 $T$ = 4
Change $N$ and $T$ and click this button

Hover the mousse cursor on the graph or plotted point to read the coordinates.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9274699687957764, "perplexity": 276.3803043203819}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-05/segments/1579251783000.84/warc/CC-MAIN-20200128184745-20200128214745-00271.warc.gz"}