ECExplain
FormulasCompareNotesInterview
⌘K
Labs
Home
/Signals & Systems
/Fourier Series of Square Wave

Contents

Signals & Systems
Signal Classification
Continuous Time SignalsDiscrete Time SignalsPeriodic SignalsAperiodic SignalsEven and Odd SignalsEnergy SignalsPower SignalsDeterministic vs Random SignalsReal and Complex Signals
Signal Operations
Unit Step FunctionUnit Impulse FunctionRamp SignalExponential SignalsSinusoidal SignalsSignum FunctionRectangular PulseTriangular PulseSinc FunctionTime ShiftingTime ScalingTime ReversalAmplitude ScalingSignal Addition and Multiplication
LTI Systems
System ClassificationLinearity TestTime Invariance TestImpulse ResponseConvolution IntegralConvolution PropertiesConvolution SumStep ResponseCausality from Impulse ResponseBIBO StabilityCascade and Parallel SystemsFeedback SystemsInvertibility
Fourier Series
Trigonometric Fourier SeriesExponential Fourier SeriesFourier Series SymmetryFourier Series of Square WaveFourier Series of Sawtooth WaveFourier Series of Triangle WaveFourier Series PropertiesGibbs PhenomenonPower Spectrum of Periodic Signals
Fourier Transform
Fourier Transform DefinitionInverse Fourier TransformFT of Rectangular PulseFT of Impulse FunctionFT of Exponential SignalFT of Signum FunctionFT of Step FunctionFT of Cosine and SineFourier Transform PropertiesTime Scaling Property FTConvolution Theorem FTMultiplication Property FTParseval TheoremHilbert Transform
Laplace Transform
Laplace Transform DefinitionRegion of ConvergenceLT of Standard SignalsLaplace Transform PropertiesInitial Value TheoremFinal Value TheoremInverse Laplace TransformInverse LT of Repeated PolesTransfer FunctionPole Zero Plot LaplaceSystem Analysis Using Laplace
Z-Transform
Z-Transform DefinitionZ-Transform ROCZ-Transform of Standard SequencesZ-Transform PropertiesInverse Z-TransformTransfer Function H(z)Stability from Z-Transform
Sampling & Reconstruction
Sampling TheoremAliasingIdeal ReconstructionPractical ReconstructionAnti-Aliasing FilterSampling of Discrete Time Signals
Other Topics
Other Subjects
Analog ElectronicsDigital ElectronicsControl SystemsElectromagnetic TheoryDigital CommunicationAnalog CommunicationNetwork AnalysisMicroprocessorsVLSI DesignVerilog HDLPower ElectronicsEmbedded SystemsDSPElectronic Devices
Section Progress44%

4 of 9 articles

Signals & Systems
Signal Classification
Continuous Time SignalsDiscrete Time SignalsPeriodic SignalsAperiodic SignalsEven and Odd SignalsEnergy SignalsPower SignalsDeterministic vs Random SignalsReal and Complex Signals
Signal Operations
Unit Step FunctionUnit Impulse FunctionRamp SignalExponential SignalsSinusoidal SignalsSignum FunctionRectangular PulseTriangular PulseSinc FunctionTime ShiftingTime ScalingTime ReversalAmplitude ScalingSignal Addition and Multiplication
LTI Systems
System ClassificationLinearity TestTime Invariance TestImpulse ResponseConvolution IntegralConvolution PropertiesConvolution SumStep ResponseCausality from Impulse ResponseBIBO StabilityCascade and Parallel SystemsFeedback SystemsInvertibility
Fourier Series
Trigonometric Fourier SeriesExponential Fourier SeriesFourier Series SymmetryFourier Series of Square WaveFourier Series of Sawtooth WaveFourier Series of Triangle WaveFourier Series PropertiesGibbs PhenomenonPower Spectrum of Periodic Signals
Fourier Transform
Fourier Transform DefinitionInverse Fourier TransformFT of Rectangular PulseFT of Impulse FunctionFT of Exponential SignalFT of Signum FunctionFT of Step FunctionFT of Cosine and SineFourier Transform PropertiesTime Scaling Property FTConvolution Theorem FTMultiplication Property FTParseval TheoremHilbert Transform
Laplace Transform
Laplace Transform DefinitionRegion of ConvergenceLT of Standard SignalsLaplace Transform PropertiesInitial Value TheoremFinal Value TheoremInverse Laplace TransformInverse LT of Repeated PolesTransfer FunctionPole Zero Plot LaplaceSystem Analysis Using Laplace
Z-Transform
Z-Transform DefinitionZ-Transform ROCZ-Transform of Standard SequencesZ-Transform PropertiesInverse Z-TransformTransfer Function H(z)Stability from Z-Transform
Sampling & Reconstruction
Sampling TheoremAliasingIdeal ReconstructionPractical ReconstructionAnti-Aliasing FilterSampling of Discrete Time Signals
Other Topics
Other Subjects
Analog ElectronicsDigital ElectronicsControl SystemsElectromagnetic TheoryDigital CommunicationAnalog CommunicationNetwork AnalysisMicroprocessorsVLSI DesignVerilog HDLPower ElectronicsEmbedded SystemsDSPElectronic Devices
Section Progress44%

4 of 9 articles

Fourier Series of Square Wave

Odd harmonics, 1/n decay, spectral analysis.

Darshan N
Updated: 7 April 2026
7 min read

The square wave is the standard test signal for Fourier series because its sharp transitions produce a rich harmonic spectrum that shows clearly how sinusoids rebuild a discontinuous waveform. Understanding its series is foundational for pulse-width modulation, digital clock analysis, and switched-mode power supply design.

tx(t)A0T/2T3T/2Square wave with amplitude A, period T, 50% duty cycle
Figure 1: Square wave x(t) with amplitude A and period T. Duty cycle is 50%.

Core Concept

A square wave flips between two values — call them A and 0 — at regular intervals. It has half-wave symmetry, which immediately tells you that all even harmonics are absent from its Fourier series. The signal is also odd if you centre it around zero, but even in the uncentred form only odd harmonics appear.

Each harmonic contribution is a sinusoid at frequency kf0, and the amplitude falls off as 1/k. The fundamental (k=1) contributes the most. The third harmonic contributes 1/3 as much, the fifth 1/5, and so on. This slow 1/k decay is why a square wave needs many harmonics to look square — the sharp edges require very high-frequency content.

Adding more terms of the series produces a better approximation. But no matter how many terms you add, an overshoot appears near each discontinuity. That overshoot is about 9% of the jump height and never fully disappears. This is the Gibbs phenomenon, and it is a fundamental property of Fourier series near jump discontinuities.

Key Formula

For the square wave defined as x(t) = A for 0 < t < T/2 and x(t) = 0 for T/2 < t < T, with period T and fundamental frequency ω0 = 2π/T, the Fourier series is x(t) = A/2 + (2A/π) · Σ [sin(kω0t)/k] summed over odd k = 1, 3, 5, ... The term A/2 is the DC offset. The coefficients are a_0 = A/2, a_k = 0 for all k ≥ 1, and b_k = 2A/(kπ) for odd k, zero for even k.

Example
Given: x(t) = A for 0 < t < T/2, x(t) = 0 for T/2 < t < T. Period T.

Step 1: Find a_0 (DC term).
         a_0 = (1/T) ∫₀ᵀ x(t) dt
             = (1/T) [∫₀^(T/2) A dt + ∫_(T/2)^T 0 dt]
             = (1/T)(A · T/2) = A/2

Step 2: Find a_k for k ≥ 1.
         a_k = (2/T) ∫₀^(T/2) A cos(kω0t) dt
             = (2A/T) · [sin(kω0t)/(kω0)]₀^(T/2)
             = (2A/T) · sin(kπ)/(kω0)   [since ω0·T/2 = π]
             = 0  (since sin(kπ) = 0 for all integer k)

Step 3: Find b_k.
         b_k = (2/T) ∫₀^(T/2) A sin(kω0t) dt
             = (2A/T) · [-cos(kω0t)/(kω0)]₀^(T/2)
             = (2A/kω0T)[1 - cos(kπ)]
             = (A/kπ)[1 - (-1)^k]

Step 4: Evaluate.
         If k is even: b_k = (A/kπ)[1-1] = 0
         If k is odd:  b_k = (A/kπ)[1+1] = 2A/(kπ)

Final Answer:
  x(t) = A/2 + (2A/π)[sin(ω0t) + sin(3ω0t)/3 + sin(5ω0t)/5 + ...]
Exam Tip: The DC value a_0 equals the average of the waveform over one period — for a 50% duty cycle square wave of amplitude A, it is simply A/2. If the problem shifts the wave to be symmetric about zero (from -A to +A), then a_0 = 0 and all a_k vanish too, leaving only odd b_k terms. Always redraw the waveform and identify the average value first.

Properties Summary

  • DC component: a_0 = A/2, equal to the average value of the waveform over one period.
  • Only odd harmonics present: b_k = 2A/(kπ) for k = 1, 3, 5, ...; even harmonics are zero due to half-wave symmetry.
  • Amplitude decay: spectral amplitudes fall as 1/k, slower than triangle (1/k²) or Gaussian.
  • No cosine terms: all a_k = 0 for k ≥ 1, because the cosine integral over the rectangular pulse yields zero.
  • Power: average power = Σ b_k²/2 + a_0², computed using Parseval theorem over all harmonics.
  • Gibbs overshoot: partial sum of N terms overshoots by ~9% near discontinuities regardless of N.

Quick Revision

  • Square wave with 50% duty cycle: DC = A/2, odd sine harmonics only.
  • Coefficient magnitude: |b_k| = 2A/(kπ) for odd k.
  • Half-wave symmetry kills all even harmonics automatically.
  • Shifting the square wave vertically to be centred on zero removes the DC term.
  • Sharp edges in time correspond to slow 1/k amplitude decay in frequency.
  • The Gibbs overshoot is always 8.9% of the jump — adding more terms does not remove it.
  • For a duty cycle d ≠ 50%, b_k = (2A/kπ) sin(kπd) and even harmonics are no longer zero.
  • Exam trap: using b_k = A/(kπ) instead of 2A/(kπ) — the factor of 2 comes from [1 - cos(kπ)] = 2 for odd k.
#Signals & Systems

Square Wave Fourier Quiz

Test your knowledge of the Fourier series of a square wave and its spectral properties.

Question 1 of 3

Q1.The trigonometric Fourier series of an odd square wave with amplitude A and period T0 contains:

Related Articles

Fourier Series of Triangle Wave

Odd harmonics only, 1/n² decay.

11 min read

Trigonometric Fourier Series

a0, an, bn coefficients, DC and harmonic terms.

4 min read

Fourier Series Properties

Linearity, time shift, frequency shift, Parseval.

8 min read

Exponential Fourier Series

Complex coefficients cn, compact notation.

4 min read

Power Spectrum of Periodic Signals

Line spectrum, power in harmonics, Parseval relation.

9 min read

Previous
Fourier Series Symmetry
Next
Fourier Series of Sawtooth Wave
ECExplain

Open engineering curriculum for ECE, EEE & EI students. Dedicated to clear physical derivations, formula sheets, and live browser circuit simulations.

[email protected]
Follow @ecexplainECExplain Labs

Core Subjects

  • Analog Electronics
  • Digital Electronics
  • Signals & Systems
  • Control Systems
  • Electromagnetic Theory

Advanced Topics

  • Digital Communication
  • Analog Communication
  • Network Analysis
  • Microprocessors
  • VLSI Design

Revision Tools

  • Formula Sheets
  • Revision Notes
  • Component Comparison
  • Interview Questions
  • Interactive Labs (150+)

© 2026 ECExplain. Built for electrical & computer engineers.

AboutPrivacyTerms