Construct a cosine series on a general symmetric interval
Using −L ≤ x ≤ L rather than automatically using −π ≤ x ≤ π keeps the physical scale visible. For an even function, the cosine terms are cos(nπx/L). Coefficients calculated for one interval cannot be moved to another without changing this scale. The following quadratic example uses a dimensionless coordinate on −1 ≤ x ≤ 1 and has period 2.
Worked practice example
Find the Fourier cosine series of f(x) = x² on −1 ≤ x ≤ 1.
| Step | Working |
|---|---|
| Mean term | a₀ = 2∫ from 0 to 1 x² dx = 2/3, so a₀/2 = 1/3. |
| Coefficient integral | aₙ = 2∫ from 0 to 1 x²cos(nπx) dx. |
| Evaluate by parts twice | The integral before the outer factor 2 is 2(−1)ⁿ/(n²π²). Thus aₙ = 4(−1)ⁿ/(n²π²). |
| Series | x² = 1/3 + (4/π²)Σ from n = 1 to ∞ [(−1)ⁿcos(nπx)/n²]. |
Check your method
The first cosine coefficient is negative and the second is positive. At x = 0 the alternating terms must cancel the mean. This is the same method as the π-interval example, with the coefficient and argument rescaled consistently; writing cos(nx) here would give the wrong period.
Try it yourself
State the mean and first cosine coefficient for f(x) = 2x² + 1 on the same interval.
Show the answer and method
The mean is 2/3 + 1 = 5/3. The first cosine coefficient is twice −4/π², giving −8/π². The added constant does not change any coefficient with n ≥ 1.
This written practice example was prepared for Jemshah revision. It is additional practice, not an official examination question or a transcript of the video.