
# Sums of sinusoids¶

## Sinusoids¶

Paraphrasing Wolfwram mathworld - a sinusoid is a function of some variable, say $$t$$, that is similar to the sine function but may be shifted in phase, frequency, amplitude, or any combination of the three.

(1)$f(t) = A \sin(2 \pi f t + \theta) = A \sin(\omega t + \theta)$

where:

• $$A$$ is the amplitude — the maximum value of the function;
• $$f$$ is the ordinary frequency — the number of cycles per unit of $$t$$;
• $$\omega = 2 \pi f$$ is the angular frequency — the number of radians per unit of $$t$$;
• $$\theta$$ is the phase offset (in radians).

The standard sine function $$f(t) = \sin(t)$$ is a special case of a sinusoid, with $$A = 1$$, $$f = 1 / 2 \pi$$, $$\theta = 0$$.

The standard cosine function $$f(t) = \cos(t)$$ is a special case of a sinusoid, with $$A = 1$$, $$f = 1 / 2 \pi$$, $$\theta = -pi / 2$$.

## The sum of sinusoids with the same frequency is also a sinusoid¶

Remembering The angle sum rule, we can write any sinusoid as a weighted sum of a sine and a cosine:

(2)$\begin{split}A \sin(\omega t + \theta) = \\ A \sin(\omega t) \cos(\theta) + A \cos(\omega t) \sin(\theta) = \\ A' \sin(\omega t) + A'' \cos(\omega t)\end{split}$

where:

(3)$\begin{split}A' = A \cos(\theta) \\ A'' = A \sin(\theta)\end{split}$

Equation (2) also points us to the fact that any weighted sum of a sine and cosine can be written as a single sinusoid. For any $$A', A''$$, we can solve equations (3) for $$A, \theta$$:

$\begin{split}A = \sqrt{A'^2 + A''^2} \\ \tan(\theta) = \frac{A''}{A'}\end{split}$

Thus, any sum of sinusoids, of the same frequency and therefore the same input $$\omega t$$, is also a sinusoid:

$A \sin(\omega t + \theta) + B \sin(\omega t + \phi) = (A' + B') \sin(\omega t) + (A'' + B'') \cos(\omega t)$