a) Compute by hand the Lagrangian cardinal functions for the points x0 = -1, x =...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a) Compute by hand the Lagrangian cardinal functions for the points x0 = -1, x = 0, x2 = 1, x3 = 2. b) Consider the function f(x) = 2x-4-x and interpolate it by a polynomial of minimal degree by hand using the results above. c) Implement a Python algorithm that performs the same task above for arbitrary func- tions and arbitrary interpolation points. The algorithm only returns the value of the interpolated function in an array of points which is given as input. What is the maximal error e(x) = f(x) - p(x)| on the intervals [1, 2] and [5, 5]? Plot f(x) and p(x) in the same plot, on the interval [-1, 2]. d) The sequence of Chebyshev nodes on the reference interval [-1, 1] is 2k +1 Zk = COS [1,1], k = 0, . . ., n 1 2 n and can be transported on a general interval [a, b] by a+b b - a xk = + Zk. 2 2 Find the Chebyshev nodes on the interval [1, 2] for n = 3. e) Interpolate f(x) numerically in the Chebyshev nodes for n = 3. What is the maximal error on the intervals [1, 2] and [5,5]? Plot f(x) and the interpolating polynomial in the same plot, on the interval [1, 2]. f) Plot the error as a function in x, for both the interpolation in a) and the interpolation in c), on the interval [-1, 2]. Plot both errors in the same plot. a) Compute by hand the Lagrangian cardinal functions for the points x0 = -1, x = 0, x2 = 1, x3 = 2. b) Consider the function f(x) = 2x-4-x and interpolate it by a polynomial of minimal degree by hand using the results above. c) Implement a Python algorithm that performs the same task above for arbitrary func- tions and arbitrary interpolation points. The algorithm only returns the value of the interpolated function in an array of points which is given as input. What is the maximal error e(x) = f(x) - p(x)| on the intervals [1, 2] and [5, 5]? Plot f(x) and p(x) in the same plot, on the interval [-1, 2]. d) The sequence of Chebyshev nodes on the reference interval [-1, 1] is 2k +1 Zk = COS [1,1], k = 0, . . ., n 1 2 n and can be transported on a general interval [a, b] by a+b b - a xk = + Zk. 2 2 Find the Chebyshev nodes on the interval [1, 2] for n = 3. e) Interpolate f(x) numerically in the Chebyshev nodes for n = 3. What is the maximal error on the intervals [1, 2] and [5,5]? Plot f(x) and the interpolating polynomial in the same plot, on the interval [1, 2]. f) Plot the error as a function in x, for both the interpolation in a) and the interpolation in c), on the interval [-1, 2]. Plot both errors in the same plot.
Expert Answer:
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these programming questions
-
A firm can repurchase shares through a(n) ________ in which it offers to buy shares at a prespecified price during a short time periodgenerally within 20 days. A) tender offer B) open market share...
-
A 4-lane road (2 lanes in each direction with no median separation) has a circular curve with a superelevation of 5% and a central angle of 50 degrees. The CT of the curve is at station 5+880 and the...
-
Marquis Company uses a weighted-average perpetual inventorysystem. August 2, 22 units were purchased at $3 per unit. August 18, 27 units were purchased at $5 per unit. August 29, 24 units were sold....
-
Compute and graph Pr[N(t) = 1] as a function of time. Find the maximum. Why does this graph increase and then decrease? Molecules leave a cell at rate = 0.3/s. Let N(t) be the random variable...
-
How can leaders strategically employ delegation as a mechanism for distributing authority and responsibility, optimizing resource allocation, and empowering team members to achieve collective...
-
Females Rating Males on OKCupid The OKCupid dating site provides lots of very interesting data. Figure 2.61 shows a scatterplot of the age of males that females find most attractive, based on the age...
-
Calculating EAC A five-year project has an initial fixed asset investment of $240,000, an initial NWC investment of $20000, and an annual OCF of $32,000. The fixed asset is fully depreciated over the...
-
what is contract services cost of debit, asset beta, levered beta, cost of equity, and WACC ? Explain
-
An effort has a start and completion planned within one accounting period. What techniques would be recommended? and Why?
-
Explain the no-arbitrage argument used to value an option when there is a one-step binomial tree.
-
Draw series of contour diagrams to show the state of execution of the program in Fig. 8.10 for \(n=2\). import java.util.; class Ch8Sample2 { public static void main(String[] args) { } Scanner...
-
Data Set 16 includes depths (km) of the sources of earthquakes. Are these values discrete or continuous? Data Set 16: Earthquake Measurements Fifty matched pairs of magnitude/depth measurements...
-
The plan was to leave $5,000 on deposit in a savings account for 15 years at 6.5 percent interest compounded annually. It became necessary to withdraw $1,500 at the end of the fifth year. How much...
-
A laser-cutting machine is purchased today for \($23\),000. There are no maintenance costs for the next 2 years. Maintenance at the end of year 3 is expected to be \($2\),000, with the subsequent...
-
Describe familiarity with the three main strategic approaches for competing internationally
-
Swifty company is a publicly held corporation whose $1 par value stock is actively traded at $30 per share. The company issued 3400 shares of stock to acquire land recently advertised at $93000. When...
-
The two surfaces of a double convex, thin lens made of plastic each have an absolute value of radius of curvature of \(1.8 \mathrm{~mm}\). If the focal length of the lens is \(4.5 \mathrm{~mm}\),...
-
The radius of curvature of one surface of a glass lens \((n=1.45)\) is \(1.50 \mathrm{~m}\). If sunlight is focused at a point \(0.300 \mathrm{~m}\) away from the lens, what is the radius of...
-
You have a thin lens that is convex on both surfaces. The material of which the lens is made has index of refraction \(n=1.40\), and the radii of curvature are \(\left|R_{1} ight|=300 \mathrm{~mm}\)...
Study smarter with the SolutionInn App