In: Advanced Math
For this problem, let ke = max{2,the largest even number in your
student number}, ko = max{3,the largest odd number in your student
number} So, e.g., if your student number is 5135731, then ke = 2
and ko = 7. The data in Table 2 represents points (xi,yi) sampled
from an experimentally generated triangular wave function with
period 2π.
(a) Use the least-squares technique we developed in class to
estimate the coefficients a, b and c for the optimal least-squares fit
of 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 product
hf(x),g(x)i = 1 πR2π 0 f(x)g(x) dx, compare the least-squares
coefficients you have obtained with the inner productshy(x),cos(nx)i,
for suitable choices of n. How do they compare? What can you
conclude?
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.50000
0.80715 4.00000 0.48884 4.50000 0.17053 5.00000 -0.14778 5.50000
-0.46609 6.00000 -0.78440
Given that
we have to Use the Least-squares technique we developed in class to estimate the coefficients a,b and c for the optimal least -squares fit of the data points to the function
yf(x) = a cos(x) + b cos(kox) + c cos(kex)