The harmonic addition theorem states that, for real numbers ,
,
and
,
the sum
|
(1)
|
can be expressed as a single sinusoid of the form
|
(2)
|
This can be done by expanding (2) using the trigonometric addition formulas to obtain
|
(3)
|
Now equate the coefficients in the two expressions for
|
(4)
| |||
|
(5)
|
so, when ,
|
(6)
| |||
|
(7)
|
and
|
(8)
| |||
|
(9)
|
For ,
a consistent choice is
|
(10)
| |||
|
(11)
|
Here
is the principal inverse tangent, and
is the sign function. Therefore,
for
,
|
(12)
|
(Nahin 1995, p. 346). If and
, take
and
. If
, take
and any real
.
In fact, given two general sinusoidal functions with real coefficients
and phases, and a common real
frequency ,
|
(13)
| |||
|
(14)
|
their sum can be expressed as a sinusoid
with frequency
|
(15)
| |||
|
(16)
| |||
|
(17)
|
Now, define
|
(18)
| |||
|
(19)
|
Then the sum becomes
|
(20)
|
|
(21)
|
|
(22)
|
so
|
(23)
|
where
is the nonnegative square
root of the right-hand side of (21), and
satisfies both (18) and (19).
These two relations determine the phase modulo
when
, including cases where the tangent
formula is undefined. When
, the sum is identically zero
and the phase is arbitrary.
For a positive integer , this procedure generalizes to a sum
of
harmonic waves with real coefficients
and phases and a common real
frequency, giving
|
(24)
| |||
|
(25)
|
where
|
(26)
| |||
|
(27)
|
and, when ,
|
(28)
|
Choose
and determine the phase from both coefficient relations
|
(29)
| |||
|
(30)
|
If ,
the phase is arbitrary.