FS03E1: Sine-Cosine Orthogonality and Harmonic-Integral Exercises
FS03 derived the orthogonality of integer sine and cosine harmonics over a complete
fundamental period. This companion turns those derivations into repeated calculation
practice.
The central skill is not memorizing that an integral is zero. The useful skill is recognizing why it is
zero, identifying when the equal-harmonic case must be treated separately, and knowing when an
interval or frequency choice destroys the cancellation.
We use the inner product
On [−π,π], the central relations are
and
for positive integers m,n.
The problems below repeatedly rebuild these statements from elementary trigonometry and
integration.
Figure 1. The exercise sequence begins with full-period cancellation, then separates distinct- and
equal-harmonic cases, tests mixed sine-cosine products, generalizes to other intervals, and finishes
by isolating one coefficient from a finite harmonic sum.
1 Two reusable workflows
FS03E1 will use two short procedures repeatedly.
Orthogonality integral workflow
An orthogonality integral workflow is the sequence
- identify the two basis functions and the integration interval,
- decide whether parity alone settles the integral,
- otherwise convert the product with a product-to-sum identity,
- identify every resulting frequency,
- apply full-period cancellation to every nonzero integer frequency,
- treat any zero-frequency term separately,
- simplify the surviving constant contribution.
The zero-frequency check is what prevents the common mistake of applying the distinct-harmonic
formula when m = n.
Harmonic-isolation check
A harmonic-isolation check verifies that multiplying a finite harmonic sum by one chosen basis
function and integrating over a complete period removes all orthogonal terms and leaves only the
chosen component multiplied by its norm squared.
For example, if
then multiplication by cos(mx) followed by integration over [−π,π] should leave
This is the mechanism FS04 will turn into the general Fourier cosine-coefficient formula.
Figure 2. For same-family products, product-to-sum converts one product integral into sums of
single-harmonic integrals. The key diagnostic is whether a difference frequency becomes zero.
2 Problems
All problems are stated before the worked solutions.
Problem 1: full-period cancellation for a cosine
Evaluate
directly from the antiderivative.
Explain why the result is an example of full-period cancellation.
Problem 2: full-period cancellation for a sine
Evaluate
Solve it in two ways:
- by antiderivative,
- by parity.
Problem 3: distinct cosine harmonics
Evaluate
using a product-to-sum identity.
Do not jump directly to the orthogonality theorem.
Problem 4: equal cosine harmonics
Evaluate
Show explicitly why the calculation differs from Problem 3.
Then determine
Problem 5: distinct sine harmonics
Evaluate
using the sine-sine product-to-sum identity.
Problem 6: equal sine harmonics
Evaluate
and determine
Problem 7: mixed sine-cosine harmonics
Evaluate
in two ways:
- by parity,
- by product-to-sum.
Problem 8: the constant function versus harmonics
Evaluate
and
on [−π,π].
Then calculate
Problem 9: build a Kronecker-delta table
For
construct the 4 × 4 matrix
Write the answer both as an explicit matrix and using δmn.
Problem 10: normalized trigonometric basis
On [−π,π], define
and
Verify explicitly that
and
Problem 11: general interval [−L,L]
Let L = 3. Evaluate
Then evaluate
Use the results to identify the norm of
on [−3, 3].
Problem 12: time-domain harmonic orthogonality
A periodic signal has fundamental period
Its fundamental angular frequency is
Evaluate
and
Problem 13: orthogonality can fail on a shortened interval
Evaluate
Explain why this does not contradict the orthogonality of sin x and sin 2x on [−π,π].
Problem 14: noninteger frequencies need not be orthogonal
Evaluate
Explain why the result matters for the phrase integer harmonics.
Problem 15: isolate a cosine coefficient
Let
Without reading the coefficient directly from the formula, calculate
Show every term that vanishes.
Problem 16: isolate a sine coefficient
For the same function
calculate
Again show every vanished term.
3 Hints
- Use ∫
cos(kx)dx = sin(kx)∕k.
- sin(7x) is odd.
- Use cos A cos B =
[cos(A − B) + cos(A + B)].
- Use cos 2𝜃 =
(1 + cos 2𝜃).
- Use sin A sin B =
[cos(A − B) − cos(A + B)].
- Use sin 2𝜃 =
(1 − cos 2𝜃).
- An odd function integrated over a symmetric interval gives zero.
- The constant function is orthogonal to every nonzero integer sine and cosine harmonic
over the full interval.
- Every diagonal entry is a norm squared.
- Pull normalization constants outside the inner product.
- The general norm-squared of a nonconstant sine or cosine basis function on [−L,L] is
L.
- Distinct integer harmonics integrate to zero over a complete period; equal ones have
average square 1∕2.
- The interval [0,π∕2] is not a complete common orthogonality interval for these two
functions.
- Product-to-sum produces half-integer frequencies, whose endpoint sines do not all
vanish at ±π.
- Expand the integral linearly before using orthogonality.
- Only the sin(2x) sin(2x) term survives.
4 Worked solutions
Solution 1: full-period cosine cancellation
Start from
An antiderivative is
Therefore
| I1 | = −ππ | (42)
|
| =  ![[sin (5 π) − sin(− 5π)]](https://images.physicslibrary.org/cache/objects/1522/make4ht/SineCosineOrthogonalityAndHarmonicIntegralExercises47x.png) | (43)
|
| = 0. | (44) |
The interval has length 2π, while cos(5x) completes five full cycles on that interval. The positive
and negative signed areas cancel.
Solution 2: full-period sine cancellation
By direct integration,
| I2 | = ∫
−ππ sin(7x) dx | (45)
|
| = −ππ | (46)
|
| = − ![[cos(7π ) − cos(− 7π)]](https://images.physicslibrary.org/cache/objects/1522/make4ht/SineCosineOrthogonalityAndHarmonicIntegralExercises50x.png) | (47)
|
| = 0. | (48) |
There is an even quicker argument. Since
sin(7x) is odd. The integral of an odd function over [−π,π] is zero.
Solution 3: distinct cosine harmonics
Use
Set
Then
| cos(2x) cos(5x) | =  ![[cos(− 3x ) + cos(7x )]](https://images.physicslibrary.org/cache/objects/1522/make4ht/SineCosineOrthogonalityAndHarmonicIntegralExercises55x.png) | (52)
|
| =  . | (53) |
Hence
| I3 | = ∫
−ππ cos(3x) dx + ∫
−ππ cos(7x) dx | (54)
|
| = 0 + 0 | (55)
|
| = 0. | (56) |
Thus cos(2x) and cos(5x) are orthogonal on [−π,π].
Figure 3. Distinct cosine harmonics do not have zero product point by point. Their product
changes sign, and its positive and negative contributions cancel over the full interval.
Solution 4: equal cosine harmonics
Now the two frequencies are equal. Use
Then
| I4 | = ∫
−ππ cos 2(4x) dx | (58)
|
| = ∫
−ππ1 dx + ∫
−ππ cos(8x) dx. | (59) |
The second integral is zero. The first is
Therefore
The norm satisfies
so
The key difference from Problem 3 is that the difference frequency is zero. In product-to-sum
language,
Since
a constant term survives.
Figure 4. Squaring one harmonic produces a nonnegative function with positive average value.
The surviving constant term is why an equal-harmonic inner product equals the norm squared
rather than zero.
Solution 5: distinct sine harmonics
Use
Then
| sin(3x) sin(7x) | =  ![[cos(− 4x ) − cos(10x )]](https://images.physicslibrary.org/cache/objects/1522/make4ht/SineCosineOrthogonalityAndHarmonicIntegralExercises71x.png) | (67)
|
| =  . | (68) |
Therefore
| I5 | = ∫
−ππ cos(4x) dx − ∫
−ππ cos(10x) dx | (69)
|
| = 0. | (70) |
So sin(3x) and sin(7x) are orthogonal on the full interval.
Solution 6: equal sine harmonics
Use
Then
| I6 | = ∫
−ππ sin 2(6x) dx | (72)
|
| = ∫
−ππ1 dx − ∫
−ππ cos(12x) dx | (73)
|
| = π. | (74) |
Hence
Solution 7: mixed sine-cosine harmonics
First use parity.
sin(3x) is odd and cos(4x) is even. Their product is odd:
Therefore
Now verify with product-to-sum:
Thus
| sin(3x) cos(4x) | = [sin(7x) + sin(−x)] | (79)
|
| = [sin(7x) − sin x]. | (80) |
Both terms integrate to zero on [−π,π], so again
Figure 5. A sine harmonic is odd and a cosine harmonic is even. Their product is odd, so its
integral over a symmetric interval vanishes immediately.
Solution 8: constant versus harmonics
First,
| ⟨1, cos(5x)⟩ | = ∫
−ππ cos(5x) dx | (82)
|
| = 0. | (83) |
Likewise,
| ⟨1, sin(5x)⟩ | = ∫
−ππ sin(5x) dx | (84)
|
| = 0. | (85) |
The norm squared of the constant function is
| ∥1∥2 | = ⟨1, 1⟩ | (86)
|
| = ∫
−ππ1 dx | (87)
|
| = 2π. | (88) |
Therefore
This different norm is the reason the constant term later receives a different normalization from the
nonzero sine and cosine harmonics.
Solution 9: Kronecker-delta table
For
the distinct-harmonic entries vanish and each diagonal entry equals π.
Thus
Equivalently,
Figure 6. The Gram matrix of the first four cosine harmonics is diagonal. Orthogonality makes
every off-diagonal inner product zero, while each diagonal entry is the common norm squared π.
Solution 10: normalized trigonometric basis
For the equal cosine mode,
| ⟨e2(c),e
2(c)⟩ | = ∫
−ππ dx | (93)
|
| = (π) | (94)
|
| = 1. | (95) |
For two different cosine modes,
| ⟨e2(c),e
3(c)⟩ | = ∫
−ππ cos(2x) cos(3x) dx | (96)
|
| = 0. | (97) |
For a cosine and sine mode,
| ⟨e2(c),e
3(s)⟩ | = ∫
−ππ cos(2x) sin(3x) dx | (98)
|
| = 0. | (99) |
Thus the normalized functions have unit norm and remain mutually orthogonal.
Solution 11: interval [−3, 3]
The general orthogonality family on [−L,L] is
Here L = 3. The first integral contains modes n = 2 and m = 5, so they are distinct integer
harmonics:
For the equal-harmonic integral,
On [−L,L], the norm squared of every nonconstant sine or cosine harmonic is L. Therefore
Hence
To see the equal-mode result directly,
| J11 | = ∫
−331 dx + ∫
−33 cos dx | (105)
|
| = (6) + 0 | (106)
|
| = 3. | (107) |
Solution 12: time-domain orthogonality
The two cosine factors are the second and fifth harmonics of the same fundamental frequency. Over
exactly one complete fundamental period,
For the equal-mode integral, the average value of cos 2 over a complete number of cycles is
1∕2:
| J12 | = ∫
0T0
cos 2(2ω
0t) dt | (109)
|
| =  | (110)
|
| = 0.010 s. | (111) |
The units are seconds because the integrand is dimensionless and the integration variable is
time.
Solution 13: shortened interval
Use
Therefore
| I13 | = ∫
0π∕2 cos xdx − ∫
0π∕2 cos 3xdx | (113)
|
| =  0π∕2 − 0π∕2 | (114)
|
| = (1) − (−1) | (115)
|
| = +  | (116)
|
| = . | (117) |
Thus
There is no contradiction. Orthogonality is a statement about both the functions and the chosen
inner product interval. The interval [0,π∕2] does not provide the full cancellation enjoyed on
[−π,π].
Figure 7. Orthogonality is interval dependent. The product sinxsin2x has incomplete
cancellation on [0,π∕2], so the corresponding inner product is not zero there.
Solution 14: noninteger frequency
Use product-to-sum:
cos x cos  | =  ![[ ( 1 ) ( 5 )]
cos − -x + cos -x
2 2](https://images.physicslibrary.org/cache/objects/1522/make4ht/SineCosineOrthogonalityAndHarmonicIntegralExercises120x.png) | (119)
|
| =  . | (120) |
Then
| I14 | = ∫
−ππ cos dx + ∫
−ππ cos dx. | (121) |
For the first term,
 −ππ | = −ππ | (122)
|
| = 1 − (−1) | (123)
|
| = 2. | (124) |
For the second term,
 −ππ | =  −ππ | (125)
|
| = [1 − (−1)] | (126)
|
| = . | (127) |
Therefore
The usual Fourier orthogonality on [−π,π] relies on integer harmonics. Half-integer frequencies do
not necessarily complete the cancellation required by that basis.
Solution 15: isolate the cosine coefficient
We need
Insert the full function:
| ∫
−ππ cos 3xdx | (130)
|
| = ∫
−ππ cos 3xdx | (131)
|
| + ∫
−ππ cos x cos 3xdx | (132)
|
| − ∫
−ππ sin 2x cos 3xdx | (133)
|
| + ∫
−ππ cos 23xdx. | (134) |
Now apply orthogonality term by term:
and
Thus
∫
−ππf(x) cos 3xdx | = (π) | (139)
|
| = 5. | (140) |
The multiplication-and-integration operation has isolated the coefficient of cos 3x.
Figure 8. Harmonic isolation is projection in action. Multiplying by the target harmonic and
integrating over the full interval removes every orthogonal component, leaving the target
coefficient times the target basis norm squared.
Solution 16: isolate the sine coefficient
Now calculate
Expand:
| ∫
−ππ sin 2xdx | (142)
|
| = ∫
−ππ sin 2xdx | (143)
|
| + ∫
−ππ cos x sin 2xdx | (144)
|
| − ∫
−ππ sin 22xdx | (145)
|
| + ∫
−ππ cos 3x sin 2xdx. | (146) |
The first, second, and fourth integrals vanish. The surviving norm integral is
Therefore
∫
−ππf(x) sin 2xdx | = − (π) | (148)
|
| = −4. | (149) |
Again the target coefficient is recovered exactly.
5 What these exercises establish
The calculations can now be summarized structurally.
- Distinct integer cosine harmonics are orthogonal over a complete basis interval.
- Distinct integer sine harmonics are orthogonal over the same interval.
- Every sine harmonic is orthogonal to every cosine harmonic on the symmetric full
interval.
- Equal harmonics are not orthogonal to themselves; their inner product is their norm
squared.
- The constant basis function is orthogonal to every nonzero integer harmonic.
- Normalization converts the orthogonal basis into an orthonormal basis.
- Orthogonality depends on the interval and the selected frequency family.
- Integer harmonic structure is essential to the standard Fourier basis on [−π,π].
- Multiplication by one basis function followed by full-period integration isolates that
component.
6 Further practice
- Evaluate ∫
−ππ cos(6x) cos(9x) dx by product-to-sum.
- Evaluate ∫
−ππ sin(8x) sin(8x) dx and identify the norm.
- Evaluate ∫
−ππ sin(5x) cos(5x) dx in two ways.
- On [−4, 4], evaluate the inner product of cos(πx∕2) and cos(3πx∕4).
- On [−L,L], prove directly that ∥ cos(nπx∕L)∥2 = L for n ≥ 1.
- For T0 = 1 ms, evaluate ∫
0T0 sin(4ω
0t) sin(9ω0t)dt.
- Find a subinterval of [−π,π] on which cos x and cos 2x are not orthogonal and verify
numerically.
- Let g(x) = 7 − 3 cos 2x + 6 sin 4x. Use harmonic isolation to recover the coefficient of
cos 2x and the coefficient of sin 4x.
- Construct the 3 × 3 Gram matrix for {1, cos x, sin x} on [−π,π].
- Normalize the set {1, cos 2x, sin 2x} on [−π,π] and verify its Gram matrix is the identity
matrix.
7 Bridge to FS04
FS03 and FS03E1 have established the exact mechanism needed for Fourier coefficient
extraction.
Suppose a periodic function can be represented by
To find one cosine coefficient, FS04 will:
- multiply the complete series by cos(mx),
- integrate over the complete interval,
- use every orthogonality result derived in FS03,
- show that only the mth cosine term survives,
- divide by its norm squared.
That derivation will produce the Fourier cosine coefficient from first principles rather than from
memorization.
References
References
[1] PhysicsLibrary, FS03: Orthogonality of Sines and Cosines.
[2] E. Kreyszig, Advanced Engineering Mathematics, Wiley.
[3] R. V. Churchill and J. W. Brown, Fourier Series and Boundary Value Problems,
McGraw-Hill.
[4] G. B. Arfken, H. J. Weber, and F. E. Harris, Mathematical Methods for Physicists,
Academic Press.