 #### 联系方式

• QQ：99515681
• 邮箱：99515681@qq.com
• 工作时间：8:00-23:00
• 微信：codehelp #### 您当前位置：首页 >> Matlab程序Matlab程序

###### 日期：2020-09-14 08:23

Problem 1
Consider the polynomial interpolation for the following data points
x 0 2 3 4
y 7 11 28 63
(a). Write down the linear system in matrix form for solving the coecients
ai (i = 0, ・・・ , n)
of the polynomial pn(x).
(b). Use the Lagrange interpolation process to obtain a polynomial to approximate these data
points.
Problem 2
The polynomial p(x) = x4
x3 + x2
x + 1 has the values shown.
x -2 -1 0 1 2 3
p(x) 31 5 1 1 11 61
Find a polynomial q(x) that takes these values (you don’t need expand it):
x -2 -1 0 1 2 3
q(x) 31 5 1 1 11 30
(Hint: This can be done with little work. Try the Lagrange form.)
Problem 3
Let P3(x) be the interpolating polynomial for the data (0, 0), (0.5, y), (1, 3) and (2, 2). Find y if
the coecient
of x3 in P3(x) is 6.
Matlab Problem 1
Ccompute the numerical derivative of f(x) = xex on [0, 1] by using the formula below.
Write a matlab code to test the convergence order numerically (Please hand in your code).
Matlab Problem 2
Consider the polynomial interpolation on the interval [1,
1] with two types of f(x):
f1(x) = cos(x), f2(x) = 1
1 + x2 .
Write a matlab script for computing the error of polynomial interpolations of fi(x), and fill
Errn for di?erent polynomial interpolations in the following table. The error of polynomial
interpolation is defined as
En = kpn(x)
f(x)k
where x is a vector representing the uniform grid points on [1,
1].
Hint: Using the element-wise division ./ and the element-wise power .^.
What to hand in? Your script file to get the results
1
c