Electrical Engineering  ·  Level 6
Engineering Mathematics IV
Chapter 1: Apply Fourier Series
📚 4 Topics
What you will be able to do

By the end of this chapter, you will be able to:

  • perform calculations involving different types of numbers correctly using the right mathematical concepts
  • carry out arithmetic operations on integers accurately and confidently
  • solve mathematical problems correctly by applying the relevant concepts
  • determine normals and tangents using coordinate geometry with accuracy

Mastering these skills will help you confidently handle complex engineering calculations and solve real-world problems with precision.

Fourier series play a critical role in electrical engineering by enabling the decomposition of complex periodic signals into simpler sinusoidal components. This technique is essential for analyzing electrical circuits, signal processing, and communications systems widely used in Kenya’s energy and telecommunications sectors. Understanding how to determine the Fourier series of functions, including non-periodic ones, equips engineers to design efficient filters, analyze harmonic content, and optimize system performance.

1.1 Definition of Fourier series for a function

Fourier series represent a periodic function as a sum of sine and cosine terms, each multiplied by coefficients that capture the function’s frequency components. This mathematical tool is particularly useful in electrical engineering for analyzing alternating current (AC) waveforms and signal harmonics in power systems and communication signals.

1.1.1 Fourier series representation of a periodic function with period \(2\pi\)

A function \(f(x)\) with period \(2\pi\) can be expressed as a Fourier series:

$$ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} ( a_n \cos nx + b_n \sin nx ) $$

where the coefficients are given by

$$ a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \, dx $$

$$ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos nx \, dx $$

$$ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin nx \, dx $$

Worked Examples

Example 1: Find the Fourier series of the function \(f(x) = x\) defined on \([- \pi, \pi]\) with period \(2\pi\).

Given: \(f(x) = x\), period \(2\pi\)

Calculate \(a_0\):

$$ a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} x \, dx $$

$$ = \frac{1}{\pi} [ \frac{x^2}{2} ]_{-\pi}^{\pi} = \frac{1}{\pi} ( \frac{\pi^2}{2} - \frac{\pi^2}{2} ) = 0 $$

Calculate \(a_n\):

$$ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x \cos nx \, dx $$

Since \(x \cos nx\) is an odd function over symmetric limits,

$$ a_n = 0 $$

Calculate \(b_n\):

$$ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x \sin nx \, dx $$

Integration by parts where:

  • \(u = x \Rightarrow du = dx\)
  • \(dv = \sin nx \, dx \Rightarrow v = -\frac{\cos nx}{n}\)

So,

$$ b_n = \frac{1}{\pi} [ -\frac{x \cos nx}{n} \Big|_{-\pi}^{\pi} + \frac{1}{n} \int_{-\pi}^{\pi} \cos nx \, dx ] $$

Evaluate boundary term:

$$ -\frac{x \cos nx}{n} \Big|_{-\pi}^{\pi} = -\frac{\pi \cos n\pi}{n} + \frac{\pi \cos(-n\pi)}{n} = 0 $$

Since \(\cos n\pi = \cos(-n\pi)\).

Evaluate integral term:

$$ \int_{-\pi}^{\pi} \cos nx \, dx = 0 $$

$$ b_n = \frac{1}{\pi} \times 0 = 0 $$

But this contradicts the known result; re-examining, the integral of \(x \sin nx\) is even, so calculate directly:

$$ b_n = \frac{2}{\pi} \int_{0}^{\pi} x \sin nx \, dx $$

Integration by parts:

$$ u = x, \quad dv = \sin nx \, dx $$

$$ du = dx, \quad v = -\frac{\cos nx}{n} $$

So,

$$ b_n = \frac{2}{\pi} [ -\frac{x \cos nx}{n} \Big|_0^{\pi} + \frac{1}{n} \int_0^{\pi} \cos nx \, dx ] $$

Evaluate boundary term:

$$ -\frac{\pi \cos n\pi}{n} + 0 = -\frac{\pi (-1)^n}{n} $$

Integral term:

$$ \int_0^{\pi} \cos nx \, dx = \frac{\sin n\pi}{n} = 0 $$

So,

$$ b_n = \frac{2}{\pi} ( -\frac{\pi (-1)^n}{n} ) = \frac{2 (-1)^{n+1}}{n} $$

Answer:

$$ f(x) = \sum_{n=1}^\infty \frac{2(-1)^{n+1}}{n} \sin nx $$

Example 2: Find the Fourier series of \(f(x) = x^2\) over \([- \pi, \pi]\).

Given: \(f(x) = x^2\), period \(2\pi\)

Calculate \(a_0\):

$$ a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \, dx = \frac{2}{\pi} \int_0^{\pi} x^2 \, dx = \frac{2}{\pi} [ \frac{x^3}{3} ]_0^{\pi} = \frac{2}{\pi} \times \frac{\pi^3}{3} = \frac{2 \pi^2}{3} $$

Calculate \(a_n\):

$$ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} x^2 \cos nx \, dx = \frac{2}{\pi} \int_0^{\pi} x^2 \cos nx \, dx $$

Use integration by parts twice:

First integration:

  • \(u = x^2\), \(du = 2x dx\)
  • \(dv = \cos nx dx\), \(v = \frac{\sin nx}{n}\)

$$ \int x^2 \cos nx \, dx = \frac{x^2 \sin nx}{n} - \frac{2}{n} \int x \sin nx \, dx $$

Second integration for \(\int x \sin nx \, dx\):

  • \(u = x\), \(du = dx\)
  • \(dv = \sin nx dx\), \(v = -\frac{\cos nx}{n}\)

$$ \int x \sin nx \, dx = - \frac{x \cos nx}{n} + \frac{1}{n} \int \cos nx \, dx = - \frac{x \cos nx}{n} + \frac{1}{n^2} \sin nx + C $$

Apply definite integration:

$$ a_n = \frac{2}{\pi} [ \frac{x^2 \sin nx}{n} + \frac{2x \cos nx}{n^2} - \frac{2 \sin nx}{n^3} ]_0^{\pi} $$

Evaluate terms at \(x = \pi\) and \(x=0\):

  • \(\sin n\pi = 0\)
  • \(\cos n\pi = (-1)^n\)

$$ a_n = \frac{2}{\pi} ( \frac{2 \pi (-1)^n}{n^2} - 0 ) = \frac{4 (-1)^n}{n^2} $$

Calculate \(b_n\):

Since \(x^2\) is even and \(\sin nx\) is odd,

$$ b_n = 0 $$

Answer:

$$ f(x) = \frac{\pi^2}{3} + \sum_{n=1}^\infty \frac{4 (-1)^n}{n^2} \cos nx $$

Example 3: Find the Fourier series for the square wave defined by

$$ f(x) = \begin{cases} 1, & 0 < x < \pi \\ -1, & -\pi < x < 0 \end{cases} $$

with period \(2\pi\).

Given: \(f(x)\) as above.

Calculate \(a_0\):

$$ a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \, dx = \frac{1}{\pi} ( \int_{-\pi}^0 (-1) \, dx + \int_0^{\pi} 1 \, dx ) = \frac{1}{\pi} (-\pi + \pi) = 0 $$

Calculate \(a_n\):

$$ a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos nx \, dx = \frac{1}{\pi} ( \int_{-\pi}^0 (-1) \cos nx \, dx + \int_0^{\pi} 1 \cdot \cos nx \, dx ) $$

$$ = \frac{1}{\pi} ( - \int_{-\pi}^0 \cos nx \, dx + \int_0^{\pi} \cos nx \, dx ) $$

Calculate each integral:

$$ \int_{-\pi}^0 \cos nx \, dx = [ \frac{\sin nx}{n} ]_{-\pi}^0 = \frac{\sin 0}{n} - \frac{\sin(-n\pi)}{n} = 0 - 0 = 0 $$

$$ \int_0^{\pi} \cos nx \, dx = [ \frac{\sin nx}{n} ]_0^{\pi} = \frac{\sin n\pi}{n} - 0 = 0 $$

$$ a_n = 0 $$

Calculate \(b_n\):

$$ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin nx \, dx = \frac{1}{\pi} ( \int_{-\pi}^0 -1 \sin nx \, dx + \int_0^{\pi} 1 \sin nx \, dx ) $$

$$ = \frac{1}{\pi} ( - \int_{-\pi}^0 \sin nx \, dx + \int_0^{\pi} \sin nx \, dx ) $$

Calculate each integral:

$$ \int_{-\pi}^0 \sin nx \, dx = [ -\frac{\cos nx}{n} ]_{-\pi}^0 = -\frac{\cos 0}{n} + \frac{\cos(-n\pi)}{n} = -\frac{1}{n} + \frac{(-1)^n}{n} = \frac{(-1)^n - 1}{n} $$

$$ \int_0^{\pi} \sin nx \, dx = [ -\frac{\cos nx}{n} ]_0^{\pi} = -\frac{\cos n\pi}{n} + \frac{\cos 0}{n} = -\frac{(-1)^n}{n} + \frac{1}{n} = \frac{1 - (-1)^n}{n} $$

$$ b_n = \frac{1}{\pi} ( - \frac{(-1)^n - 1}{n} + \frac{1 - (-1)^n}{n} ) = \frac{2}{\pi n} (1 - (-1)^n) $$

For even \(n\), \(b_n=0\). For odd \(n\), \(b_n = \frac{4}{\pi n}\).

Answer:

$$ f(x) = \sum_{\substack{n=1 \\ n \text{ odd}}}^\infty \frac{4}{\pi n} \sin nx $$

1.1.2 Fourier series for a function with arbitrary period \(T\)

For a function \(f(x)\) with period \(T\), the Fourier series is expressed as:

$$ f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} ( a_n \cos \frac{2 n \pi x}{T} + b_n \sin \frac{2 n \pi x}{T} ) $$

where coefficients are

$$ a_0 = \frac{2}{T} \int_{c}^{c+T} f(x) \, dx $$

$$ a_n = \frac{2}{T} \int_{c}^{c+T} f(x) \cos \frac{2 n \pi x}{T} \, dx $$

$$ b_n = \frac{2}{T} \int_{c}^{c+T} f(x) \sin \frac{2 n \pi x}{T} \, dx $$

for any real number \(c\).

Worked Examples

Example 1: Find the Fourier series of \(f(x) = x\) with period \(T=4\), defined on \([-2,2]\).

Given: \(f(x) = x\), \(T=4\), interval \([-2,2]\)

Calculate \(a_0\):

$$ a_0 = \frac{2}{4} \int_{-2}^{2} x \, dx = \frac{1}{2} [ \frac{x^2}{2} ]_{-2}^2 = \frac{1}{2} ( 2 - 2 ) = 0 $$

Calculate \(a_n\):

$$ a_n = \frac{2}{4} \int_{-2}^{2} x \cos \frac{n \pi x}{2} \, dx = \frac{1}{2} \int_{-2}^{2} x \cos \frac{n \pi x}{2} \, dx $$

Since \(x \cos \alpha x\) is an odd function over symmetric limits,

$$ a_n = 0 $$

Calculate \(b_n\):

$$ b_n = \frac{1}{2} \int_{-2}^{2} x \sin \frac{n \pi x}{2} \, dx = \frac{1}{2} \times 2 \int_0^{2} x \sin \frac{n \pi x}{2} \, dx = \int_0^{2} x \sin \frac{n \pi x}{2} \, dx $$

Use integration by parts:

  • \(u = x\), \(du = dx\)
  • \(dv = \sin \frac{n \pi x}{2} dx\), \(v = - \frac{2}{n \pi} \cos \frac{n \pi x}{2}\)

So,

$$ b_n = [ -\frac{2 x}{n \pi} \cos \frac{n \pi x}{2} ]_0^{2} + \frac{2}{n \pi} \int_0^{2} \cos \frac{n \pi x}{2} \, dx $$

Evaluate boundary term:

$$ -\frac{4}{n \pi} \cos n \pi + 0 = -\frac{4(-1)^n}{n \pi} $$

Calculate integral:

$$ \int_0^{2} \cos \frac{n \pi x}{2} \, dx = [ \frac{2}{n \pi} \sin \frac{n \pi x}{2} ]_0^{2} = \frac{2}{n \pi} ( \sin n \pi - 0 ) = 0 $$

$$ b_n = -\frac{4 (-1)^n}{n \pi} $$

Answer:

$$ f(x) = \sum_{n=1}^\infty -\frac{4 (-1)^n}{n \pi} \sin \frac{n \pi x}{2} $$

Example 2: Determine Fourier series of \(f(x) = x^2\), period \(T=6\), defined on \([-3,3]\).

Given: \(f(x) = x^2\), \(T=6\)

Calculate \(a_0\):

$$ a_0 = \frac{2}{6} \int_{-3}^{3} x^2 \, dx = \frac{1}{3} \times 2 \int_0^3 x^2 \, dx = \frac{2}{3} [ \frac{x^3}{3} ]_0^3 = \frac{2}{3} \times \frac{27}{3} = 6 $$

Calculate \(a_n\):

$$ a_n = \frac{2}{6} \int_{-3}^{3} x^2 \cos \frac{2 n \pi x}{6} \, dx = \frac{1}{3} \times 2 \int_0^3 x^2 \cos \frac{n \pi x}{3} \, dx = \frac{2}{3} \int_0^3 x^2 \cos \frac{n \pi x}{3} \, dx $$

Use integration by parts twice (similar to previous example):

Final result after evaluation is:

$$ a_n = \frac{12 (-1)^n}{n^2 \pi^2} $$

Calculate \(b_n\):

Since \(x^2\) is even and sine is odd,

$$ b_n = 0 $$

Answer:

$$ f(x) = 3 + \sum_{n=1}^\infty \frac{12 (-1)^n}{n^2 \pi^2} \cos \frac{n \pi x}{3} $$

Example 3: Fourier series for a sawtooth wave with period \(T=8\), defined on \([-4,4]\) by \(f(x) = x\).

Given: \(f(x) = x\), \(T=8\)

Calculate \(a_0\):

$$ a_0 = \frac{2}{8} \int_{-4}^{4} x \, dx = \frac{1}{4} \times 0 = 0 $$

Calculate \(a_n\):

$$ a_n = \frac{2}{8} \int_{-4}^{4} x \cos \frac{n \pi x}{4} \, dx = \frac{1}{4} \times 0 = 0 $$

Calculate \(b_n\):

$$ b_n = \frac{1}{4} \times 2 \int_0^{4} x \sin \frac{n \pi x}{4} \, dx = \frac{1}{2} \int_0^{4} x \sin \frac{n \pi x}{4} \, dx $$

Integration by parts yields:

$$ b_n = -\frac{8 (-1)^n}{n \pi} $$

Answer:

$$ f(x) = \sum_{n=1}^\infty -\frac{8 (-1)^n}{n \pi} \sin \frac{n \pi x}{4} $$

Practice Questions

  1. Find the Fourier series of the function \(f(x) = |x|\) on \([- \pi, \pi]\) with period \(2\pi\). (8 marks)

  2. Determine the Fourier coefficients \(a_n\) and \(b_n\) for the function \(f(x) = x^3\) on \([- \pi, \pi]\) with period \(2\pi\). (10 marks)

  3. Calculate the Fourier series of \(f(x) = x\) with period \(T=10\) on \([-5,5]\). (7 marks)

  4. Find the Fourier series for the function defined as \(f(x) = 2\) for \(0 < x < 1\) and \(f(x) = 0\) for \(-1 < x < 0\) with period \(T=2\). (10 marks)

The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒1.2 Determination of Fourier series of non-periodic functions

Non-periodic functions can be represented by Fourier series over a finite interval by extending them periodically outside the interval. This approach is fundamental in electrical engineering for analyzing transient signals and waveforms that do not repeat, by…

🔒1.3 Determination of the Fourier series for non-periodic functions over a given range

In electrical engineering applications in Kenya, signals are often defined over a finite interval rather than being strictly periodic. For example, transient voltage signals in power systems or pulse shapes in communication systems may be non-periodic but can…

🔒1.4 Determination of the Fourier series for odd and even functions and half-range series

Fourier series simplification using symmetry properties is highly useful in electrical engineering, where signals often exhibit odd or even symmetry. In Kenya's power system analysis and signal processing, leveraging symmetry reduces computational effort and e…

Chapter Summary

This chapter introduced the concept of the Fourier series as a method for representing functions as sums of sine and cosine terms. It began by defining the Fourier series for functions with period \(2x\) and generalized this to any period \(T\), providing the framework for expressing periodic functions in series form. The chapter then extended the discussion to non-periodic functions, explaining how their Fourier series can be determined by considering them over specific intervals. Techniques for finding Fourier series of non-periodic functions within a given range were presented, emphasizing the importance of interval selection in the analysis. The chapter concluded with methods for simplifying the Fourier series calculation for odd and even functions, including the development of half-range series that utilize only sine or cosine terms. These approaches allow for more efficient computation and better understanding of function behavior based on symmetry. Overall, the chapter equipped students with the tools to analyze and express a wide variety of functions using Fourier series in engineering contexts.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

Written Assessment

  1. Find the Fourier series of the periodic function \( f(x) = x \) defined on the interval \(-\pi \leq x \leq \pi\) with period \(2\pi\). (2 marks)

  2. Determine the Fourier series for the function \( f(x) = x^2 \) over the interval \(-\pi \leq x \leq \pi\), period \(2\pi\). (3 marks)

🔒17 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with model answers

SECTION A (40 Marks) - Answer ALL Questions

  1. A signal in an electrical circuit repeats every \(2\pi\) seconds. Express the signal as a Fourier series with period \(2\pi\). Identify the coefficients for the first three harmonics. (4 marks)
  2. Determine the Fourier series for the function \(f(x) = x\) defined on the interval \(-\pi \leq x \leq \pi\) and extended periodically with period \(2\pi\). (4 marks)
🔒18 more in this section.
Test Yourself 19 questions Start quiz ▾
0%
0 / 2
🔒

17 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • perform calculations involving different types of numbers correctly using the right mathematical concepts
  • carry out arithmetic operations on integers accurately and confidently
  • solve mathematical problems correctly by applying the relevant concepts
  • determine normals and tangents using coordinate geometry with accuracy

Tick each one you can genuinely do.

Prove it — in the simulator

Sample simulation — try how the simulator works. A version built for this chapter's practical is coming.

Prepare Kenyan PilauLocked ▸

Free: practical guides, quick cards, workplace scenarios and more.

Now — are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.