Hermite Integration problem 1

772 Views Asked by At

Hey I am trying to calculate this problem of Hermite polynomial by hand, but I think it's way easier to do on Maple, so can anybody help me write the Maple code:

Let $f(x) = 3xe^x - e^2x$.

a) Approximate $f(1.03)$ by the Hermite interpolating polynomial of degree at most three using $x_0 = 1$ and $x_1 = 1.05$. Compare the actual error to the error bound.

b) Repeat (a) with the Hermite interpolating polynomial of degree at most five, using $x_0 = 1.05$ and $x2 = 1.07$.

1

There are 1 best solutions below

0
On BEST ANSWER

I think you can do the first one as follows:

[> with(orthopoly):
  for i to 3 do H[i] = H(i, 3*x*exp(x)-exp(2)*x) end do;

                      H[1] = 6 x exp(x) - 2 exp(2) x

                                                      2
                 H[2] = -2 + 4 (3 x exp(x) - exp(2) x) 

                                 3                            
 H[3] = 8 (3 x exp(x) - exp(2) x)  - 36 x exp(x) + 12 exp(2) x