For this problem, let ke = max{2,the largest even number in yourstudent number}, ko = max{3,the largest odd number in your studentnumber} So, e.g., if your student number is 5135731, then ke = 2and ko = 7. The data in Table 2 represents points (xi,yi) sampledfrom an experimentally generated triangular wave function withperiod 2Ï€.
(a) Use the least-squares technique we developed in class toestimate the coefficients a, b and c for the optimal least-squares ï¬tof the data points to the function yf(x) = acos(x) + bcos(kox) +ccos(kex)
(b) The repeating triangular wave function can be expressed as y(x)=(2x−π π 0 ≤ x ≤ π3 π−2x π π ≤ x ≤ 2π Using the inner producthf(x),g(x)i = 1 πR2π 0 f(x)g(x) dx, compare the least-squarescoefficients you have obtained with the inner productshy(x),cos(nx)i,for suitable choices of n. How do they compare? What can youconclude?
x y 0.00000 -0.96468 0.50000 -0.64637 1.00000 -0.32806 1.50000-0.00975 2.00000 0.30856 2.50000 0.62687 3.00000 0.94518 3.500000.80715 4.00000 0.48884 4.50000 0.17053 5.00000 -0.14778 5.50000-0.46609 6.00000 -0.78440