# Fourier series calculator

The expansion of some function into trigonometric Fourier series on the segment has the form:

where

Our online calculator finds Fourier series expansion of a given function with step by step solution.

Fourier series calculator
[ , ]

As an example, we'll find Fourier series expansion of the function on the segment . In this case the length of segment and the coefficients , , are calculated by the formulas:

Therefore, the expansion of the function into Fourier series on the segment has the form:

We can see two plots on the figure below (red color) and , (blue color) for which we use order of expansion equal to .

It should be noted, that in the example above, the coefficients and are zero for a reason. The fact is that the function is odd. The function - on the contrary is even. The product of an even function by an odd one is an odd function, so according to the properties, definite integral of an odd function on a symmetric interval is zero.

In case of the even function, for example , the coefficients will be equal to zero, because the integrand is odd function.

Based on the above, we can draw the following conclusions:

Fourier series expansion of an odd function on a symmetric segment contains only sine terms.

Fourier series expansion of an even function on a symmetric segment contains only cosine terms.

If we need to obtain Fourier series expansion of some arbitrary function on the segment , then we have two possibilities. We can extend this function on the segment in an odd way and then only sines terms will be present in the expansion. Or we can extend it on the specified segment in an even way and then only cosines terms will be present in the expansion.

Our online calculator allows to obtain the expansion of a given function in Fourier series in general form or only by sines/cosines on any segment.