Lagrange interpolating polynomial of degree

Assignment Help MATLAB Programming
Reference no: EM13885

1. Let pn(x) be the Lagrange interpolating polynomial of degree at most n that satis?es pn(xi) = yi, i = 0, 1, 2, . . . , n.
Write a MATLAB function to evaluate pn at a set of points stored in the MATLAB vector z. Assuming the points x0, x1, . . . , xn are stored in the MATLAB vector x and the values y0, y1, . . . , yn are stored in the MATLAB vector y, the input to your function should be x, y and z. The output should be a vector, of the same length as z, containing the values of the polynomial at the points stored in z.

2. Use your MATLAB function to compute the Lagrange interpolating polynomial of degree at most n for the function f(x) = ln(x + 1) on the interval [0, 2], with uniformly distributed interpolation points, for n = 1 and n = 2. For each value of n, produce a plot containing the
interpolation points, the function f(x) and the polynomial pn(x) for x 2 [0, 2], when ploting f(x) and pn(x), you should use a vector z containing 500 uniformly distributed points in the interval [0, 2].

3. Consider the interpolation error for the function f of Question 2 en(x) = |f(x) - pn(x)|, n = 0, 1, . . .
Produce a plot showing that e2(x) ≤ e1(x) in the interval [0, 2].

4. Calculate an approximation to the in?nity norm of the error in the Lagrange interpolating polynomials pn(x) of the function f(x) for n = 1, 2, . . . , 10.

5. Repeat question 4 for the function g(x) = f(10x) = ln(10x + 1).

6. Let h be the function de?ned by h(x) = ln( x + 1), with > 0. Prove by induction that the nth derivative of h is given by

99_Lagrange interpolating polynomial of degree.png

7. Read the documentation of the MATLAB command semilogy, which plots data with a logarithmic scale for the y-axis. Use semilogy to plot, on the same graph, the in?nity norm of the error against n for the functions f(x) and g(x). Explain the plot using the result of Question 6.

Reference no: EM13885

Questions Cloud

Calculate the value of forces : Calculate the value of forces P and Q for each test using the method of sections technique.
Simple interest and compound interest : Simple Interest, Compound interest, discount rate, force of interest, AV, PV
Population ecology : This perspective focuses on organizational diversity and adaptation within a population of organizations.
Lagrange interpolating polynomial of degree : Lagrange interpolating polynomial of degree
Quadrupole moments in the shell model : Quadrupole moments in the shell model
Scratch pre-test : These pre-test questions are for getting your background knowledge on Scratch and computing concepts.
Irrigation system : Irrigation system
Probabilistic hough transform in big o notation : Probabilistic Hough transform in big O notation

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Develop a simulation program

Develop a simulation program

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd