MAT 581 Matlab Test 1

1. (5 points) Define f (x) = sin(x) + cos(x) and
n x2k+1[0, 2 ].
2. (5 points) Write a Matlab script that plots a closed curve
(px(t), py(t)), 0 t 1
that passes through the points (0, 0), (0, 3), and (4, 0). The functions px and py should
be cubic polynomials. The plot should be based on one hundred evaluations of px and
3. (5 points) For n = 5, 10, and 15, find the Newton interpolating polynomial pn for the
function f(x) = 1/(1 + x2) on the interval [ 5, 5]. Use equally spaced nodes. In each
case, compute f(x) pn(x) for 30 equally spaced points in [ 5, 5] in order to see the
divergence of pn from f.
4. (5 points) Let h be a small number. The derivative of a function f at x0 can be
approximated by a forward divided difference
f (x0) f(x0 + h) f(x0)
and by central divided difference
f (x0) f(x0 +h) f(x0 h).
For the function f(x) = sin(x), plot the error when these approximations are used to
estimate f (1) = cos(1) for h = 10 1, 10 2, . . . , 10 16. Repeat with x0 = 1 + 106 . Use
loglog for each of the four plots and display them all in the same window using subplot.
Be sure to title each plot and label the axes appropriately. Your script should not have
any loops.

Related Posts

Quality Writing Features

Price Start $10
  • 24/7 Customer Support
  • All Subject Areas
  • Money-Back Guarantee
  • Timely Delivery
  • Originality report
  • Confidentiality guaranteed

Ordering Homework Writing Service

You can get our ideal online homework help services with four easy steps. All you have to do is inform us of your requirements. Immediately we will match with a specialist in your academic discipline. After that, we will track your order, review it to ensure it meets your requirements, and submit it to your email.


Submit Requirements

Fill in your assignment instructions on the order form


Writer match

Immediately you contact us for homework help; we will assign your assignment to an academic expert.


Quality review

We have a team of editors, who will thoroughly review your assignment, ensuring there are no errors before submission


Get Your Completed Paper

Once we have completed the assignment, we will deliver it to your account. Additionally, we will send a notification to your email.



Budget-friendly writing services



We don’t share our client’s information with a third party



We write every assignment from scratch

Amazing Homework Writing Features

Once you consult us for homework help online services, you will attest to why we are among the USA's best essay writing services.

Read on and find out some of the features that make our services superlative.

Free Homework Writing Services

Free plagiarism checker

You can confirm that the content you get is original for free using our plagiarism checker.

Free samples

We offer unlimited access to our essay homework samples.

Free title page and bibliography

Once you place an order, we format it accordingly without demanding additional charges.

Free unlimited revisions

We offer free unlimited revisions until your assignment is of your desired quality..

Free editing and proofreading

We have a team of specialized editors who review your assignment before submission.

Free customer support

You can track the progress of your homework for free.

Request for Homework Writing Service Today!

We have over 500 homework writing experts, ready and waiting to help you improve your writing skills