Background. Aside remark 2.
Trigonometric curve fitting at discrete points is equivalent to finding the Fast Fourier Transform (FFT) for a discrete data set. The cofficients of the trigonometric polynomial can be obtained using Mathematica's built in "Fourier" procedure.
However, we first we need to use that part of the period function
f[x] defined in the interval
.
![[Graphics:at.txtgr5.gif]](at.txtgr5.gif)
![[Graphics:at.txtgr23.gif]](at.txtgr23.gif)
Next, make a table of the function values at first twelve points
in the partition of
. Do not include the right endpoint
!
Then use Mathematica's Fourier procedure, and multiply the
result by ![[Graphics:at.txtgr27.gif]](at.txtgr27.gif)
The first three non-zero coefficients are the desired values {a1, a3, a5}.