Question: Write down the polynomial interpolation function y(x) interpolating the points (0,4), (3,3) and (6,-2) in terms of Lagrange polynomials. There is no need to
Write down the polynomial interpolation function y(x) interpolating the points (0,4), (3,3) and (6,-2) in terms of Lagrange polynomials. There is no need to simplify your expressions. Hence calculate an interpolated value of y(2). 2. The function f(z)= tanh(c) can be approximated by the Lagrange polynomials. (a) Consider a set of data points (x, f(x)) given by 11 values of x equally spaced in the interval [-5, 5]. Let p(x) be the Lagrange interpolation function based on this 11 points. By writing a computer program, calculate f(x) and p(x) for 100 values of x in the same interval. Hence plot both functions on the same graph. (b) Repeat the procedure by interpolating 21 equally spaced points in the same interval. Has the quality of the polynomial approximation been improved by interpolating more points on the function? Why? Submit the source code for part (a) and both graphs for parts (a) and (b). 3. Consider 5 data points, (x,y) = (0, 2), (1, 8), (1.5, 12), (2, 10) and (3, 20). Write a computer program which performs a least square fit of the data to a straight line. It should output the fitted parameters. Hence, write down the program output. Plot the data and the fitted line on the same graph. Ac Go
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
