Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

Evaluate the function f(t) =

Math Jul 12, 2022

Evaluate the function
f(t) = .05 sin(10002) + .5 cos(zt) — .4sin(104)
at the 101 points given by 0:.01:1. Plot the resulting broken line interpolant.

(b) In order to study the slow scale trend of this function, we wish to find a low degree
polynomial (degree at most 6) that best approximates f in the least squares norm at the
above 101 data points. By studying the figure from part (a) find out the smallest n that
would offer a good fit in this sense. (Try to do this without further computing.)

(c) Find the best approximating polynomial v of degree n and plot it together with f. What
are your observations?

3. Let us synthesize data in the following way. We start with the cubic polynomial
55 17 7
t)=—-114+ —t-—??4+-P.

q(t) toto at +e
Thus, n = 4. This is sampled at 33 equidistant points between 0.9 and 4.1. Then we add to
these values 30% noise using the random number generator randn in MATLAB, to obtain
“the data’ which the approximations that you will construct “see.” From here on, no know!-
edge of g(t), its properties, or its values anywhere is assumed: we pretend we don’t know
where the data came from!
Your programming task is to pass through these data three approximations:

(a) An interpolating polynomial of degree 32. This can be done using the MATLAB func-
tion polyfit. You don’t need to know how such interpolation works for this exercise,
although details are given in Chapter 10.

(b) An interpolating cubic spline using the MATLAB function spline. The correspond-
ing method is described in Section 11.3, but again you don’t need to rush and study that
right now.

(c) A cubic polynomial which best fits the data in the £2 sense, obtained by our function
lsfit.

Plot the data and the obtained approximations as in Figures 6.3 and 6.4. Which of these
approximations make sense? Discuss.

Expert Solution

PFA

Need this Answer?

This solution is not in the archive yet. Hire an expert to solve it for you.

Get a Quote
Secure Payment