Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random  

Orthogonality of Sines and Cosines

(Topic)

FS03: Orthogonality of Sines and Cosines

FS02 introduced the function inner product

        ∫ b
⟨f,g⟩ =    f (x)g(x)dx,
         a
(1)

and defined two functions to be orthogonal when that inner product is zero.

Fourier series become practical because different integer harmonics of sine and cosine are orthogonal over a complete fundamental period.

The purpose of this lecture is to derive that statement from elementary trigonometry and integration. Nothing will be taken on faith.

The central results on [−π,π] are

∫ π                       {
    cos(nx )cos(mx )dx =    0,  n ⁄= m,
 − π                        π,  n = m  ≥ 1,
(2)

                         {
∫  π                       0,  n ⁄=  m,
    sin(nx )sin (mx )dx =
  −π                       π,  n =  m ≥  1,
(3)

and

∫  π
    sin(nx )cos(mx )dx =  0
  −π
(4)

for positive integers m and n.

We will derive each formula separately. We will then extend the result to the interval [−L,L] and explain exactly why this orthogonality allows a Fourier coefficient to be isolated by multiplication and integration.

PIC

Figure 1. Orthogonality is an integral cancellation statement. Positive and negative contributions to the product of two different harmonic functions cancel over a complete period, even though the product is not zero point by point.

1 Formal definitions owned by FS03

Trigonometric orthogonality

Two trigonometric functions are orthogonal on an interval when their function inner product on that interval vanishes. For example,

cos(nx)  and    cos(mx  )
(5)

are orthogonal on [−π,π] for distinct positive integers m and n because

∫ π

 − π cos(nx) cos(mx )dx = 0.
(6)

Harmonic orthogonality

Harmonic orthogonality is the special orthogonality among distinct integer harmonics of a common fundamental frequency when the inner product is taken over a complete fundamental period.

If the fundamental angular frequency is ω0, the functions

cos(nω0t),    sin(nω0t )
(7)

for integer n form the harmonic family. Distinct members are orthogonal over any complete interval of length

      2π-
T0 =  ω .
       0
(8)

Full-period cancellation

A periodic sine or cosine with a nonzero integer number of cycles over an integration interval has zero integral over that complete set of cycles. We will call this full-period cancellation.

On [−π,π], for any nonzero integer k,

∫ π
    cos(kx )dx =  0
 −π
(9)

and

∫
   π
    sin(kx) dx = 0.
  −π
(10)

Kronecker delta

The Kronecker delta is the discrete symbol

      {
        1,  m  = n,
δmn =   0,  m  ⁄= n.
(11)

It lets us write an entire orthogonality table compactly. For example,

∫  π
    cos(nx )cos(mx )dx  = πδ
  −π                        mn
(12)

for positive integers m,n.

Trigonometric basis norm

The trigonometric basis norm is the function norm of one basis function under the chosen inner product. On [−π,π],

∥cos(nx )∥2 = π,    ∥ sin(nx)∥2 = π
(13)

for n ≥ 1.

The constant function has a different norm:

∥1 ∥2 = 2π.
(14)

Normalized trigonometric basis

Dividing every nonzero basis function by its norm gives a normalized trigonometric basis. On [−π,π],

  1        cos(nx )      sin (nx )
√----,     --√----,     --√-----
  2π           π            π
(15)

are normalized basis functions. Together they form an orthonormal trigonometric family.

2 Why integer harmonics are the natural periodic family

FS01 established that a periodic function with fundamental period 2π naturally uses integer harmonics

1,    cos x,sin x,     cos2x, sin 2x,     cos3x,sin3x, ...
(16)

The function cos(nx) completes exactly n cycles while x runs through any interval of length 2π. The same is true of sin(nx).

This integer-cycle property is the geometric source of the cancellation that follows.

PIC

Figure 2. The first three cosine harmonics on one common 2π interval. Each completes an integer number of cycles and returns to its starting phase at the end of the interval.

3 The elementary cancellation lemma

Before multiplying two harmonics together, we need one simple integral result.

Let k be a nonzero integer. Consider

        ∫ π
Ic(k) =     cos(kx )dx.
         − π
(17)

Integrate directly:

Ic(k) = [sin(kx )]
 --------
    k−ππ (18)
= sin-(k-π)-
   k −sin(−-kπ)
    k. (19)

For integer k,

sin(kπ) = 0
(20)

and

sin (− kπ ) = 0.
(21)

Therefore

Ic(k) = 0.
(22)

Now consider

        ∫
           π
Is(k) =     sin(kx) dx.
          −π
(23)

One direct method is integration:

Is(k) = [         ]
   cos(kx)-
 −    k−ππ (24)
= −cos(k-π)
   k + cos(−-kπ)-
    k. (25)

Because cosine is even,

cos(− kπ ) = cos(kπ),
(26)

so the two terms cancel:

Is(k) = 0.
(27)

There is also a symmetry argument. The function sin(kx) is odd, so its integral over the symmetric interval [−π,π] vanishes automatically.

These two equations are the cancellation engine used throughout the rest of the lecture.

4 Deriving the product-to-sum identities

Orthogonality integrals contain products such as

cos(nx )cos(mx ).
(28)

Products are inconvenient to integrate directly. The product-to-sum identities turn them into sums of single sinusoids, which can then use the cancellation lemma.

We derive the identities rather than quote them.

4.1 Cosine times cosine

Start from the angle-addition formulas

cos(A − B ) = cosA cos B + sinA sin B
(29)

and

cos(A  + B ) = cosA cosB  − sin A sinB.
(30)

Add them:

cos(A − B) + cos(A + B) = 2 cos A cos B. (31)

Divide by 2:

cos A cosB  = 1-[cos(A  − B ) + cos(A + B)].
              2
(32)

4.2 Sine times sine

Subtract the two cosine addition formulas:

cos(A − B) − cos(A + B) = 2 sin A sin B. (33)

Therefore

             1
sin A sin B =  --[cos(A −  B) − cos(A + B )].
             2
(34)

4.3 Sine times cosine

Use

sin (A + B ) = sin A cosB  + cosA sinB
(35)

and

sin(A −  B ) = sin A cosB − cosA sinB.
(36)

Add them:

sin(A + B) + sin(A − B) = 2 sin A cos B. (37)

Hence

sin A cosB  = 1-[sin(A +  B ) + sin(A − B )].
             2
(38)

PIC

Figure 3. Product-to-sum converts a product of two harmonics into a sum containing a difference-frequency term and a sum-frequency term. For distinct integer harmonics, both resulting frequencies are nonzero integers and integrate to zero over a complete 2π interval.

5 Cosine-cosine orthogonality when m≠n

Consider

      ∫ π
Icc =     cos(nx) cos(mx  )dx,
       −π
(39)

where m and n are distinct positive integers.

Use Equation (32) with

A =  nx,     B = mx.
(40)

Then

cos(nx) cos(mx ) = 1-[cos((n − m )x) + cos((n + m )x )].
                   2
(41)

Insert this into the integral:

Icc = 1-
2 ∫ −ππ cos((n − m)x) dx (42)
+ 1
--
2 ∫ −ππ cos((n + m)x) dx. (43)

Because n≠m,

n − m  ⁄= 0.
(44)

Because both are positive,

n + m  ⁄= 0.
(45)

Both n − m and n + m are nonzero integers. Therefore Equation (22) applies to both integrals:

∫  π
    cos((n − m )x)dx  = 0
 − π
(46)

and

∫ π
    cos((n + m )x)dx =  0.
 −π
(47)

Hence

Icc = 0.
(48)

Thus distinct cosine harmonics are orthogonal.

6 Cosine-cosine self-inner product when m = n

The previous derivation cannot simply substitute m = n and say both terms vanish. One of the product-to-sum frequencies becomes zero. That case must be handled separately.

Set m = n:

      ∫
 (n)     π    2
Icc  =     cos (nx) dx.
       − π
(49)

From Equation (32), with A = B = nx,

cos 2(nx) = 1
--
2[cos(0) + cos(2nx )] (50)
= 1-
2[1 + cos(2nx)] . (51)

Therefore

Icc(n) = 1-
2 ∫ −ππ1 dx + 1-
2 ∫ −ππ cos(2nx) dx. (52)

The second integral vanishes by full-period cancellation. The first is just the interval length:

∫ π
    1dx =  2π.
 −π
(53)

Hence

Icc(n) = 1-
2(2π) (54)
= π. (55)

Thus

∫ π
    cos2(nx) dx = π,     n ≥ 1.
 − π
(56)

This is not orthogonality to itself. It is the squared norm of the basis function.

Combining the two cases gives Equation (2).

PIC

Figure 4. Distinct cosine harmonics produce a product whose positive and negative areas cancel over the full interval. When the same harmonic is multiplied by itself, the product is cos2(nx) and its integral is the positive norm-squared value π.

7 Sine-sine orthogonality when m≠n

Now consider

     ∫ π
I  =     sin(nx) sin(mx ) dx.
ss    − π
(57)

Use Equation (34):

                   1
sin(nx) sin(mx  ) = 2 [cos((n − m )x) − cos((n + m )x )].
(58)

Thus

Iss = 1
--
2 ∫ −ππ cos((n − m)x) dx (59)
−1-
2 ∫ −ππ cos((n + m)x) dx. (60)

If m≠n, both frequencies are nonzero integers. Each integral vanishes. Therefore

Iss = 0.
(61)

Distinct sine harmonics are orthogonal.

8 Sine-sine self-inner product when m = n

Set m = n:

      ∫ π
I(nss) =     sin2(nx) dx.
       − π
(62)

From Equation (34), with A = B = nx,

sin 2(nx) = 1-
2[cos0 − cos(2nx )] (63)
= 1-
2 [1 − cos(2nx )] . (64)

Then

Iss(n) = 1-
2 ∫ −ππ1 dx −1-
2 ∫ −ππ cos(2nx) dx (65)
= 1
--
2(2π) − 0 (66)
= π. (67)

Thus

∫  π
    sin2(nx) dx = π,     n ≥ 1.
 − π
(68)

Combining the cases gives Equation (3).

PIC

Figure 5. The square of a sine harmonic is nonnegative. Its oscillating cos(2nx) part averages to zero, leaving half the interval length and therefore a norm squared of π on [−π,π].

9 Sine-cosine orthogonality

Now consider

      ∫ π
Isc =     sin (nx)cos(mx  )dx.
       −π
(69)

There are two complementary ways to prove that this integral is zero.

9.1 Method 1: parity

The function

sin(nx)
(70)

is odd:

sin(− nx ) = − sin (nx ).
(71)

The function

cos(mx  )
(72)

is even:

cos(− mx ) = cos(mx ).
(73)

The product of an odd function and an even function is odd. Therefore

sin (nx)cos(mx )
(74)

is odd. The integral of an odd function over a symmetric interval vanishes:

Isc = 0.
(75)

This proof works even when m = n.

9.2 Method 2: product-to-sum

Use Equation (38):

sin(nx )cos(mx ) = 1-[sin((n + m )x) + sin((n − m )x)].
                   2
(76)

Integrate:

Isc = 1-
2 ∫ −ππ sin((n + m)x) dx (77)
+ 1
--
2 ∫ −ππ sin((n − m)x) dx. (78)

If n≠m, both sine terms have integer frequencies and both integrals vanish.

If n = m, then the second sine is

sin 0 = 0
(79)

point by point, while the first integral still vanishes.

Thus in every case

∫
  π
    sin(nx) cos(mx  )dx = 0.
 − π
(80)

PIC

Figure 6. A sine is odd and a cosine is even, so their product is odd. On the symmetric interval [−π,π], the left and right contributions cancel exactly.

10 The constant function is also part of the Fourier basis

A real Fourier series contains a constant component in addition to sine and cosine harmonics. Therefore we must also check how the constant function interacts with the harmonics.

For n ≥ 1,

              ∫  π
⟨1,cos(nx )⟩ =     cos(nx )dx = 0.
                −π
(81)

Likewise,

              ∫  π
⟨1,sin(nx )⟩ =     sin(nx )dx = 0.
                −π
(82)

Thus the constant function is orthogonal to every nonzero sine and cosine harmonic on the complete interval.

Its norm is

∥1∥2 = ⟨1, 1⟩ (83)
= ∫ −ππ1 dx (84)
= 2π. (85)

Therefore

      √ ---
∥1∥ =   2π.
(86)

This different norm explains why the constant Fourier coefficient will carry a different normalization factor from the sine and cosine coefficients.

11 The complete orthogonality table on [−π,π]

For positive integers m,n,

∫ π

 − π cos(nx )cos(mx )dx = πδmn,
(87)

∫  π
    sin(nx )sin (mx  )dx = π δmn,
  −π
(88)

and

∫
  π
    sin(nx) cos(mx  )dx = 0.
 − π
(89)

Also,

∫  π                    ∫ π
    cos(nx )dx =  0,        sin(nx) dx = 0.
  −π                     − π
(90)

Finally,

∫
  π
    1dx =  2π.
 −π
(91)

These equations are the algebraic core of real Fourier series.

12 Norms and the normalized trigonometric family

From Equations (56) and (68),

             √ --
∥ cos(nx)∥ =   π
(92)

and

∥ sin (nx )∥ = √ π.
(93)

The constant function has

      √ ---
∥1∥ =   2π.
(94)

Therefore define

        --1--
ϕ0(x) = √ 2π ,
(95)

  (c)      cos√(nx)-
ϕ n (x ) =     π  ,     n ≥ 1,
(96)

and

  (s)      sin (nx)
ϕ n (x) = --√----,     n ≥ 1.
              π
(97)

Each has unit norm. Different members are orthogonal. Thus the family is orthonormal.

PIC

Figure 7. Normalization rescales each basis function so its norm is one. The constant function needs a different scale from the nonzero sine and cosine harmonics because its squared norm is 2π rather than π.

13 Worked Example 1: verify one cosine-cosine pair directly

Evaluate

∫ π
    cos(2x )cos(5x) dx.
 −π
(98)

Use product-to-sum:

cos(2x) cos(5x) = 1
--
2[cos(− 3x ) + cos(7x )] (99)
= 1-
2[cos(3x) + cos(7x )] , (100)

because cosine is even.

Then

∫ −ππ cos(2x) cos(5x) dx = 1-
2 ∫ −ππ cos(3x) dx (101)
+ 1-
2 ∫ −ππ cos(7x) dx (102)
= 0 + 0 (103)
= 0. (104)

The two harmonics are orthogonal.

14 Worked Example 2: same cosine harmonic

Evaluate

∫ π
    cos2(4x)dx.
 −π
(105)

Use

   2       1
cos (4x) = 2[1 + cos(8x)].
(106)

Then

∫ −ππ cos 2(4x) dx = 1
--
2(2π) + 1
--
2(0) (107)
= π. (108)

This is the norm squared of cos(4x).

15 Worked Example 3: sine-cosine orthogonality by parity

Evaluate

∫ π
    sin(3x )cos(8x)dx.
 −π
(109)

The sine factor is odd and the cosine factor is even. Their product is odd. Therefore

∫ π
    sin(3x )cos(8x)dx =  0.
 −π
(110)

No product-to-sum identity is needed.

16 Worked Example 4: orthogonality depends on the interval

Consider

sinx   and   sin 2x.
(111)

On [−π,π] they are orthogonal:

∫
  π
    sin xsin 2xdx =  0.
 −π
(112)

Now integrate on [0,π∕2]:

    ∫ π∕2
I =       sin xsin2x dx.
     0
(113)

Use product-to-sum:

sin xsin 2x = 1-[cos x − cos3x].
             2
(114)

Then

I = 1-
2[               ]
 sinx −  1sin3x
         30π∕2 (115)
= 1
--
2[    1     ]
 1 − --(− 1)
     3 (116)
= 1
--
2(  )
  4
  --
  3 (117)
= 2-
3. (118)

Thus the same two functions are not orthogonal on this shorter interval.

This is why the integration interval is part of the inner product definition.

17 Generalization from [−π,π] to [−L,L]

Fourier series are often written on an interval of total length 2L rather than 2π. The corresponding harmonic functions are

    (n-πx )
cos    L
(119)

and

   ( nπx-)
sin    L    .
(120)

We can derive their orthogonality by changing variables.

Let

    πx
y = ---.
     L
(121)

Then

x = L-y
    π
(122)

and

      L
dx =  π-dy.
(123)

When

x = − L,
(124)

we have

y = − π.
(125)

When

x =  L,
(126)

we have

y = π.
(127)

Consider the cosine-cosine inner product:

I = ∫ −LL cos (     )
  nπx-
   L cos (      )
  m-πx-
    Ldx (128)
= L
--
π∫ −ππ cos(ny) cos(my) dy. (129)

Use Equation (87):

I = L
--
π(πδmn) (130)
= Lδmn. (131)

Therefore

∫ L    (     )    (      )
    cos  nπx-  cos  m-πx- dx =  Lδ   .
 −L       L          L            mn
(132)

Similarly,

∫
  L    ( nπx-)    ( mπx-)
    sin   L    sin    L    dx =  Lδmn,
 − L
(133)

and

∫ L    (     )    (     )
    sin   nπx-  cos  m-πx- dx =  0.
 −L       L          L
(134)

The constant function has

∫  L
     1dx =  2L.
  −L
(135)

Therefore on [−L,L] the normalized basis becomes

√-1--,
  2L
(136)

       (     )
-1--     nπx-
√ L cos   L    ,
(137)

and

 1     ( nπx )
√---sin  ----  .
  L       L
(138)

18 Generalization to a time interval of one period

Suppose a periodic signal has period T0 and fundamental angular frequency

ω  =  2π.
  0   T0
(139)

Its harmonics are

cos(nω0t)
(140)

and

sin (n ω0t).
(141)

Over any complete interval of length T0,

∫ t0+T0                          T0
       cos(nω0t)cos(m ω0t)dt =  --δmn
 t0                              2
(142)

for positive m,n.

Likewise,

∫
  t0+T0                         T0-
       sin(n ω0t)sin (m ω0t)dt =  2 δmn,
 t0
(143)

and

∫
  t0+T0
       sin(nω0t)cos(m ω0t) dt = 0.
 t0
(144)

The starting time t0 does not matter as long as the integration covers one complete fundamental period.

19 Why distinct integer harmonics are special

The product-to-sum derivation shows exactly what is required.

For different cosine harmonics,

cos(nx)cos(mx  )
(145)

produces frequencies

|n − m |    and     n + m.
(146)

When m and n are integers, both are integers. If m≠n, neither is zero. Each resulting sinusoid therefore completes an integer number of cycles on the chosen full-period interval and integrates to zero.

This explains the connection

integer harmonics −→  full- period cancellation − → orthogonality.
(147)

If arbitrary noncommensurate frequencies are chosen, this cancellation is not guaranteed over the same finite interval.

20 The geometric meaning of the Kronecker delta

FS02 showed that orthogonal vectors have zero cross inner product and nonzero self inner product. The same pattern occurs here.

For normalized cosine functions,

         cos(nx)
ϕn (x ) = --√----,
             π
(148)

we have

⟨ϕm, ϕn⟩ = δmn.
(149)

Thus the Kronecker delta is the infinite-dimensional analogue of the familiar Cartesian relation

em ⋅ en = δmn.
(150)

The Fourier sine and cosine functions behave like perpendicular coordinate directions in function space.

21 How orthogonality isolates one harmonic

We now reach the key bridge to FS04 and FS05.

Suppose, for the moment, that a function can be represented by a finite trigonometric sum

             N
            ∑
f(x) = A0 +     [An cos(nx) + Bn sin (nx)].
            n=1
(151)

Suppose we want to isolate the coefficient Am. Multiply both sides by cos(mx):

f(x) cos(mx) = A0 cos(mx) (152)
+ ∑ n=1NA n cos(nx) cos(mx) (153)
+ ∑ n=1NB n sin(nx) cos(mx). (154)

Now integrate over [−π,π]:

∫ −ππf(x) cos(mx) dx = A 0 ∫ −ππ cos(mx) dx (155)
+ ∑ n=1NA n ∫ −ππ cos(nx) cos(mx) dx (156)
+ ∑ n=1NB n ∫ −ππ sin(nx) cos(mx) dx. (157)

Now apply orthogonality.

The constant term vanishes:

∫ π
    cos(mx )dx =  0.
 −π
(158)

Every sine-cosine term vanishes:

∫
  π
    sin(nx) cos(mx  )dx = 0.
 − π
(159)

Every cosine-cosine term with n≠m vanishes. Only one term remains:

   ∫  π   2
Am     cos (mx )dx.
     −π
(160)

But

∫  π
    cos2(mx ) dx = π.
  −π
(161)

Therefore

∫ π
    f(x)cos(mx  )dx = πA   .
 −π                      m
(162)

So

         ∫
       1   π
Am  =  --    f(x)cos(mx  )dx.
       π  −π
(163)

FS04 will develop this argument carefully as the derivation of the Fourier cosine coefficients. The purpose here is only to expose the mechanism:

  • multiply by the desired basis function,
  • integrate,
  • orthogonality removes every unwanted basis direction,
  • divide by the surviving basis norm squared.

PIC

Figure 8. Orthogonality turns coefficient extraction into a filtering operation. Multiplication by one basis function followed by integration removes all orthogonal harmonics and leaves only the matching component multiplied by its norm squared.

22 A direct connection to FS02 projection

FS02 derived the projection coefficient

     ⟨f,ϕ⟩
c =  -----.
     ⟨ϕ, ϕ⟩
(164)

Choose

ϕ(x) = cos(mx ).
(165)

Then

⟨ϕ, ϕ⟩ = π.
(166)

Therefore

       ∫
     1-  π
c =  π     f(x)cos(mx ) dx.
        −π
(167)

The Fourier cosine coefficient is therefore not a new type of mathematical object. It is an ordinary function-space projection coefficient onto an orthogonal trigonometric basis.

The same will hold for sine coefficients.

23 Common mistakes

  1. Assuming two functions are orthogonal because their graphs look different. Orthogonality is an integral condition.
  2. Forgetting that the interval is part of the inner product. Functions can be orthogonal on one interval and nonorthogonal on another.
  3. Using the m≠n product-to-sum argument when m = n. The difference frequency becomes zero and produces the nonzero norm-squared term.
  4. Assuming a function is orthogonal to itself. A nonzero function has positive self inner product.
  5. Forgetting that the constant basis function has norm squared 2π, not π.
  6. Writing
    ∫

   cos(nx )cos(mx ) dx = 0
    (168)

    without specifying the limits. Orthogonality is not an indefinite-integral statement.

  7. Forgetting that sine-cosine orthogonality on a symmetric interval follows immediately from parity.
  8. Using noninteger frequencies and expecting the same cancellation on [−π,π] without checking the interval.
  9. Confusing orthogonal with orthonormal. The unscaled sine and cosine functions are orthogonal but have norm √ --
  π, not 1.
  10. Treating the Kronecker delta as a function of x. It is a discrete symbol depending on the indices m and n.

24 Self-check questions

  1. Why does cos((n − m)x) cause a special case when n = m?
  2. Why does the integral of cos(kx) vanish on [−π,π] for nonzero integer k?
  3. Why can sine-cosine orthogonality be proved without product-to-sum identities?
  4. What is the norm of cos(7x) on [−π,π]?
  5. What is the norm of the constant function 1 on [−π,π]?
  6. What scaling makes sin(5x) normalized?
  7. What does δmn mean when m = 3 and n = 5?
  8. What does δmn mean when m = n = 4?
  9. Why are sin x and sin 2x not necessarily orthogonal on an arbitrary subinterval?
  10. In one sentence, explain why multiplying a Fourier sum by cos(mx) and integrating isolates the matching cosine coefficient.

25 Practice exercises

  1. Derive Equation (32) from the cosine angle-addition identities.
  2. Derive Equation (34) from the same identities.
  3. Derive Equation (38) from the sine angle-addition identities.
  4. Evaluate
    ∫ π

 −π cos(3x )cos(8x) dx.
    (169)

  5. Evaluate
    ∫ π
    sin (4x )sin(9x)dx.
 −π
    (170)

  6. Evaluate
    ∫ π
    sin(6x)cos(6x )dx
 − π
    (171)

    using both parity and product-to-sum.

  7. Evaluate
    ∫  π
    cos2(11x )dx.
  −π
    (172)

  8. Evaluate
    ∫  π   2
    sin (12x) dx.
  −π
    (173)

  9. Find the norms of 1, cos(5x), and sin(5x) on [−π,π].
  10. Normalize the three functions in the preceding problem.
  11. Show that
    ∫ L    (     )    (     )
    cos  2πx-  cos  5πx-  dx =  0.
 −L       L          L
    (174)

  12. Show that
    ∫ L     (     )
       2  3πx-
 −L sin     L    dx = L.
    (175)

  13. Determine whether cos x and cos 2x are orthogonal on [0,π∕2].
  14. Determine whether sin x and cos 2x are orthogonal on [−π∕2,π∕2].
  15. For
    f(x) = 2 + 3cos x − 5sin 2x + 7cos 4x,
    (176)

    compute

    ∫ π
    f(x) cos4x dx
 −π
    (177)

    using orthogonality rather than expanding every integral independently.

  16. For the same f(x), compute
    ∫ π
    f(x)sin 2xdx.
 −π
    (178)

26 What FS03 has established

We now know that the real trigonometric family

1,     cos(nx ),    sin(nx ),     n = 1,2, 3,...
(179)

is orthogonal on [−π,π].

The nonzero harmonics have squared norm

π,
(180)

while the constant has squared norm

2π.
(181)

The general interval [−L,L] gives squared harmonic norm

L
(182)

and constant norm squared

2L.
(183)

Most importantly, orthogonality gives a mechanism for extracting one component from a trigonometric sum.

That mechanism is exactly what the next lectures formalize:

  • FS04 derives the Fourier cosine coefficients,
  • FS05 derives the sine coefficients and the constant coefficient.

References

References

[1]   PhysicsLibrary, FS01: Periodic Functions, Harmonics, and Why Fourier Series Exist.

[2]   PhysicsLibrary, FS02: Inner Products of Functions.

[3]   E. Kreyszig, Advanced Engineering Mathematics, Wiley.

[4]   G. B. Arfken, H. J. Weber, and F. E. Harris, Mathematical Methods for Physicists, Academic Press.

[5]   M. L. Boas, Mathematical Methods in the Physical Sciences, Wiley.


"Orthogonality of Sines and Cosines" is owned by bloftin.
(view preamble)
View style:
Other names:  FS03
Also defines:  trigonometric orthogonality, harmonic orthogonality, Kronecker delta, trigonometric basis norm, normalized trigonometric basis, full-period cancellation
Keywords:  Fourier series, orthogonality, sine, cosine, harmonics, product-to-sum identities, Kronecker delta, trigonometric basis, function inner product, projection

Attachments:
Sine-Cosine Orthogonality and Harmonic-Integral Exercises (Example) by bloftin

Cross-references: sentence, parity, graphs, type, projection coefficient, operation, relation, vectors, unit, algebraic, works, square, frequencies, identities, phase, periodic function, FS01, norm, function norm, periodic, angular frequency, fundamental frequency, period, Fourier coefficient, formula, fundamental period, harmonics, Fourier series, inner product, functions, function inner product, FS02
There are 6 references to this object.

This is version 1 of Orthogonality of Sines and Cosines, born on 2026-10-22.
Object id is 1521, canonical name is OrthogonalityOfSinesAndCosines.
Accessed 4 times total.

Classification:
Physics Classification: 02.30.Nw (Fourier analysis)
 02.30.Lt (Sequences, series, and summability)
 02.10.Ud (Linear algebra)

Pending Errata and Addenda

None.

Discussion

No messages.

Interact