Fourier Series Solver
Fourier Series (Period 2π)
Even, Odd Functions »
Harmonic Analysis »
Heaviside »
Differential Equations »
Laplace Transforms
Fourier Series for Periodic Functions
A Fourier series is an expansion of a periodic function into a sum of sines and cosines. It allows us to represent complex periodic waveforms as a combination of simpler, harmonically related sinusoidal functions. This concept is fundamental in many fields, including signal processing, image compression, and solving partial differential equations.
Understanding Periodic Functions
A function $f(x)$ is said to be periodic with period $T$ if there exists a positive constant $T$ such that $f(x+T) = f(x)$ for all $x$ in the domain of $f$. The smallest such positive $T$ is called the fundamental period. Examples include $\sin(x)$ (period $2\pi$) and $\cos(x)$ (period $2\pi$).
Formulas for a Fourier Series and Coefficients
For a function $f(x)$ defined on an interval $-L \le x \le L$ (or any interval of length $2L$), its Fourier series is given by:
Where $L$ is half the period, i.e., $T = 2L$. The coefficients $a_0, a_n,$ and $b_n$ are called the Fourier coefficients and are calculated using the following integral formulas:
Note: Symbolic integration to find exact coefficients is complex for a web browser environment. This solver will numerically approximate the integrals to find the coefficient values, allowing for a numerical approximation of the Fourier series. For exact analytical solutions, manual calculation or specialized symbolic software is typically required.
Obtain Fourier Series for Given Functions (Numerical Approximation)
Enter function, period, and number of terms, then calculate.
Fourier Series for Non-Periodic Functions (Over a Limited Range)
While Fourier series are fundamentally used for periodic functions, they can also represent a non-periodic function over a specific, limited interval. When we do this, we are effectively treating the non-periodic function as one period of a hypothetical periodic function, which is then called its periodic extension.
The Fourier series will accurately represent the original non-periodic function *only within its defined interval*. Outside this interval, the Fourier series will repeat the pattern defined within that interval, which may not match the original non-periodic function's behavior (if it continues outside the interval).
Fourier Series over a $2\pi$ Range (i.e., $L=\pi$)
A common scenario is to expand a non-periodic function $f(x)$ defined over the interval $[-\pi, \pi]$ (or any interval of length $2\pi$). In this case, the half-period $L = \pi$, and the Fourier series formulas simplify to:
Where the coefficients are:
Note: As before, symbolic integration is not performed client-side. The integrals are numerically approximated. The plot will show the original function only in its defined range $[-\pi, \pi]$ and the periodic extension of its Fourier series outside this range to illustrate the concept of periodic extension.
Calculate Fourier Series for Non-Periodic Function over $[-\pi, \pi]$
Enter function and number of terms, then calculate. (Range assumed to be $[-\pi, \pi]$)