There are two known classes of functions for which the Euler--Fourier formulas for the coefficients can be simplified: even and odd. We define them as follows
A function f is even if the graph of f is symmetric with respect to the y-axis. Algebraically, f is even if and only if \( f(-x) = f(x) \) for all x in the domain of f. A function f is odd if the graph of f is symmetric with respect to the origin. In other words, f is odd if the following equation holds for all x and -x in the domain of f: \( f(-x) = -f(x) . \) Geometrically, the graph of an odd function has rotational symmetry with respect to the origin, meaning that its graph remains unchanged after rotation of 180 degrees about the origin.
Properties involving addition and subtraction:
The sum of two even functions is even, and any constant multiple of an even function is even.
The sum of two odd functions is odd, and any constant multiple of an odd function is odd.
The difference between two odd functions is odd.
The difference between two even functions is even.
The sum of an even and odd function is neither even nor odd, unless one of the functions is equal to zero over the given domain.
Properties involving multiplication and division:
The product of two even functions is an even function.
The product of two odd functions is an even function.
The product of an even function and an odd function is an odd function.
The quotient of two even functions is an even function.
The quotient of two odd functions is an even function.
The quotient of an even function and an odd function is an odd function.
Properties involving composition:
The composition of two even functions is even.
The composition of two odd functions is odd.
The composition of an even function and an odd function is even.
The composition f ○ g = f(g) of any function f with an even function g is even (but not vice versa).
Other algebraic properties:
Any linear combination of even functions is even. The set of even functions form a vector space over the real numbers ℝ. Similarly, any linear combination of odd functions is odd, and the odd functions also form a vector space over the reals. In other words, every function f(x) can be written uniquely as the sum of an even function and an odd function:
is odd. For example, if \( f(x) = e^x , \) then its even part, fe, is cosh(x) and its odd part, fo, is sinh(x).
Basic calculus properties:
The derivative of an even function is odd.
The derivative of an odd function is even.
The integral of an odd function from -A to +A is zero (where A is finite, and the function has no vertical asymptotes between -A and A): \( \int_{-A}^A f_{\text{o}}(x) \,{\text d}x = 0. \)
The integral of an even function from -A to +A is twice the integral from 0 to +A (where A is finite, and the function has no vertical asymptotes between -A and A): \( \int_{-A}^A f_{\text{e}}(x) \,{\text d}x = 2 \int_0^A f_{\text{e}}(x) \,{\text d}x . \) This also holds true when A is infinite, but only if the integral converges).
Series properties:
The Maclaurin series of an even function includes only even powers.
The Maclaurin series of an odd function includes only odd powers.
The Fourier series of a periodic even function includes only cosine terms.
The Fourier series of a periodic odd function includes only sine terms.
Periodically with period \( T= 2(b-a) = 2\ell , \) with ℓ = b−𝑎, by making the extension an even function. This can be achieved upon expanding f into Fourier cosine series:
Periodically with period \( T= 2(b-a) = 2\ell \) by making the extension an odd function. This can be achieved upon expanding f into Fourier sine series:
We demonstrate all these approaches in the following examples.
Example 1:
We start with a simple function, which is of saw-tooth type: \( g(t) = t \) on the
interval (0, π ) that we first extend periodically with period π and then expand it into regular Fourier series:
Now we extend the given function
in even way on the interval \( (-\pi , \pi ) . \) This interval was chosen for simplicity to avoid application of option FourierParameters that was explained in the introductory web page.
Since the function g(t) = t is an odd function, we apply the Mathematica command FourierTrigSeries[g[t], t, 5] to find its sine Fourier series approximation with 5 terms:
FourierSinCoefficient[ expr , t, n] gives the n-th coefficient in the Fourier sine series expansion of expr. FourierCosCoefficient[ expr , t, n] gives the n-th coefficient in the Fourier cosine series expansion of expr. FourierCosSeries[expr, t , n] gives the n-order Fourier cosine series expansion of expr in t. FourierSinSeries[expr, t , n] gives the n-order Fourier sine series expansion of expr in t.
Similarly, we get sine Fourier series (Gibbs overshoot and undershoot are given explicitly):
We can also expand the given function sin(x/2) into cosine Fourier series by expanding it to negative semi-axis in even way. First, we calculate Fourier coefficients:
Since sin kπ = 0 for any integer k, all coefficients
\( a_k = 0 \) except k = 2, which we
calculate separately:
a2 = 2/L*Integrate[f[x]*Cos[x*2*Pi/L], {x, 0, L}]
1/2
Therefore, the Fourier expansion of the function cos² contains only two
nonzero terms corresponding to k = 0 and k = 2. This proves the
identity above.
However, we notice that cos² is actually a periodic function with period
π, so we can find its cosine Fourier series with 2 L = π:
Therefore, we have two Fourier representations for the same function
cos²x on the interval (−π, π) but with respect to different
sets of cosine functions. Finally, we plot cos²x along with 10-term
cosine Fourier approximation to the function f1(x).
Example 7:
We consider an integrable function that does not satisfy the Dirichlet conditions and for which we don't have sufficient conditions that guarantee pointwise convergence of the corresponding Fourier series (which is actually the Fourier sine series because the function is odd).