Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The aim of this lab is to write a function to compute the coefficients for a Hermite polynomial interpolating function using divided differences and then
The aim of this lab is to write a function to compute the coefficients for a Hermite polynomial interpolating function using divided differences and then to use the coefficients to compute the Hermite interpolating polynomial. The algorithm for the divided difference formulas for the Hermite polynomial coefficients is: INPUT X=(x0,,xn),Y=(f(x0),,f(xn)),YP=(f(x0),,f(xn)) OUTPUT Qi,j, the appropriate divided differences, where the Hermite interpolating polynomial is H2n+1(x)=Q0,0+i=12n+1Qi,ij=0i1(zzj) and z2i=xi,z2i+1=xi for i=0,,n STEP 1. For i=0,1,n z2i=xiz2i+1=xiQ2i0=f(xi)Q2i+1,0=f(xi)Q2i+1=f(xi) If i=0 then Q2,1=z21z2j1Q2i,0Q2i10 End If End STEP 2. For i=2,3,,2n+1 For j=2,3,,i Qi,j=zizijQi,1Qi1,1 End End STEP 3. OUTPUT Qi,j STOP (1). Write a matlab routine called main.m that calls a function that you write to compute the generalized divided differences given above. (2). Use a Hermite polynomial to interpolate the function f(x)=e0.1x2 given below in tabular form, at the point x=1.25. Use H5(1.25) with nodes x0,x1,x2 and H3(1.25), with nodes x0,x1. (3). What is your estimate of the errors? Justify your answer. Find error bounds for these approximations
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started