---
title: "Spectrum of a sawtooth wave"
subject: "Signals and Systems"
chapter: 2
key: "semester_4/signals_and_systems:sawtooth-fourier-spectrum"
source: https://www.bctengineer.com/q/semester_4/signals_and_systems/sawtooth-fourier-spectrum
site: BCT Engineering
---

# Spectrum of a sawtooth wave

Signals and Systems · Chapter 2: Fourier Series

- Asked in: 2079 Jestha, 8 marks
- Video: [Signal Representation #5. How to Build a Sawtooth Wave Using Fourier Series in Frequemcy Domain.](https://www.youtube.com/watch?v=hNgzYx0OCBs) — Technologies Discussion
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/signals_and_systems/sawtooth-fourier-spectrum
- Whole chapter: https://www.bctengineer.com/md/semester_4/signals_and_systems/chapter-2

## Question

Calculate and plot magnitude and phase spectrum of the following periodic signal. [Figure: sawtooth wave of period 1: x(t) rises linearly from 0 at t = 0 to 1 at t = 1 and then drops back to 0, i.e. x(t) = t for 0 ≤ t < 1, repeating every 1 s; shown from t = −3 to t = 4]

## Short answer

Integrate x(t)=t over period T=1. DC a0=0.5; for k≠0, a_k = j/(2πk). Magnitude |a_k|=1/(2π|k|), phase 90° for k>0, –90° for k<0.

## Answer

One period: $x(t) = t$ for $0 \le t < 1$, with period $T = 1$ s, so $\omega_0 = 2\pi/T = 2\pi$ rad/s.

$$
a_k = \frac{1}{T}\int_0^T x(t)e^{-jk\omega_0 t}dt = \int_0^1 t\,e^{-j2\pi kt}dt
$$

#### DC term ($k = 0$)
$$
a_0 = \int_0^1 t\,dt = \frac{1}{2}
$$

#### Coefficients for $k \ne 0$
Integrate by parts with $u = t$, $dv = e^{-j2\pi kt}dt$, $v = \frac{e^{-j2\pi kt}}{-j2\pi k}$:

$$
\begin{aligned}
a_k &= \left[\frac{t\,e^{-j2\pi kt}}{-j2\pi k}\right]_0^1 - \int_0^1\frac{e^{-j2\pi kt}}{-j2\pi k}dt \\
&= \frac{e^{-j2\pi k}}{-j2\pi k} + \frac{1}{j2\pi k}\left[\frac{e^{-j2\pi kt}}{-j2\pi k}\right]_0^1 \\
&= \frac{1}{-j2\pi k} + \frac{1}{j2\pi k}\cdot\frac{e^{-j2\pi k} - 1}{-j2\pi k}
\end{aligned}
$$

Since $e^{-j2\pi k} = 1$, the second term is zero:

$$
a_k = \frac{-1}{j2\pi k} = \frac{j}{2\pi k}, \qquad k \ne 0
$$

#### Magnitude and phase
$$
|a_k| = \frac{1}{2\pi|k|}, \qquad \angle a_k = \begin{cases} +90^\circ\ (\pi/2), & k > 0 \\ -90^\circ\ (-\pi/2), & k < 0 \\ 0, & k = 0 \end{cases}
$$

| $k$ | 0 | $\pm1$ | $\pm2$ | $\pm3$ | $\pm4$ |
|---|---|---|---|---|---|
| $\lvert a_k\rvert$ | 0.5 | 0.159 | 0.0796 | 0.0531 | 0.0398 |
| $\angle a_k$ ($k>0$) | $0^\circ$ | $90^\circ$ | $90^\circ$ | $90^\circ$ | $90^\circ$ |
| $\angle a_k$ ($k<0$) | - | $-90^\circ$ | $-90^\circ$ | $-90^\circ$ | $-90^\circ$ |

So the Fourier series is

$$
x(t) = \frac{1}{2} + \sum_{k\ne0}\frac{j}{2\pi k}e^{j2\pi kt} = \frac{1}{2} - \sum_{k=1}^{\infty}\frac{1}{\pi k}\sin(2\pi kt)
$$

#### Spectra (lines at $\omega = 2\pi k$)
```text
 |a_k|
   0.5           |
 0.159        |  |  |
0.0796     |  |  |  |  |
0.0531  |  |  |  |  |  |  |
       -+--+--+--+--+--+--+--> k
       -3 -2 -1  0  1  2  3

 angle a_k (deg)
    90              |  |  |
       -+--+--+--o--+--+--+--> k
   -90  |  |  |
       -3 -2 -1  0  1  2  3
```

The magnitude falls as $1/k$ (because of the jump discontinuity each period), is even in $k$, and the phase is odd: $+90^\circ$ for positive $k$ and $-90^\circ$ for negative $k$.

**Check:** at $t = 0.25$, the series $\frac{1}{2} - \frac{1}{\pi}\left(1 - \frac{1}{3} + \frac{1}{5} - \dots\right) = \frac{1}{2} - \frac{1}{\pi}\cdot\frac{\pi}{4} = 0.25$, which equals $x(0.25)$.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What are T and w0 for the sawtooth?
   A. T = 1, w0 = 2pi
   B. T = 1, w0 = 1
   C. T = 2pi, w0 = 1
   D. T = 1, w0 = pi
   Answer: A. w0 = 2pi/T = 2pi rad/s. (Key point: Fundamental frequency)

2. What is a_0?
   A. 1
   B. 0
   C. 1/2
   D. 1/pi
   Answer: C. Integral of t from 0 to 1 is 1/2, the average. (Key point: DC term)

3. What is a_k for k not equal to 0?
   A. j/(2 pi k)
   B. 1/(2 pi k)
   C. -j/(2 pi k)
   D. 1/(pi k)
   Answer: A. By parts, a_k = -1/(j 2 pi k) = j/(2 pi k). (Key point: Coefficients)

4. What are |a_k| and the phase?
   A. 1/(pi|k|), phase 0
   B. 1/(2 pi|k|), +90 for k>0 and -90 for k<0
   C. 1/(2 pi|k|), phase 90 for all k
   D. 1/(2 pi k^2), phase 90
   Answer: B. a_k = j/(2 pi k) is imaginary with sign of k. (Key point: Magnitude and phase)

## Related in Signals and Systems

- [DTFT of aⁿu[n] with spectrum plot](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Adtft-geometric-plot) — Signals and Systems, chapter 3
- [FS coefficients of periodic square wave](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Asquare-wave-fourier-coefficients) — Signals and Systems, chapter 2
- [Magnitude and phase of DTFT of aⁿu[n]](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Adtft-geometric-magnitude-phase) — Signals and Systems, chapter 3
- [DTFT is periodic with period 2π](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Adtft-periodicity-2pi) — Signals and Systems, chapter 3
- [H(e^(jω)), magnitude plot and h[n] for y[n] = 0.5y[n−1] + x[n]](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Afirst-order-difference-plot) — Signals and Systems, chapter 6, asked 9×
- [Periodic signal whose Fourier series fails](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Afourier-series-existence-examples) — Signals and Systems, chapter 2

## Related in other subjects

- [Exponential Fourier series of sawtooth wave](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-exponential-form-sawtooth) — Electrical Circuit Theory, chapter 6
- [Average and RMS of sawtooth waveform](https://www.bctengineer.com/question.md?key=semester_1%2Ffundamental_of_electrical_and_electronics_engineering%3Asawtooth-average-rms-value) — Fundamental of Electrical and Electronics Engineering, chapter 2
- [Fourier series of two-sided sawtooth with V](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-sawtooth-two-sided-v) — Electrical Circuit Theory, chapter 6
- [Fourier series of odd sawtooth, ±Vo](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Afourier-sawtooth-vo-odd) — Electrical Circuit Theory, chapter 6
