Hermite interpolation for 2 data points and one only one datapoint derivative available Let $P(x)$ be a polynomial that satisfies:
$P(0) = f(0)$, $P(2) = f(2)$, $P^{'}
(2) = f^{'}(2)$
(a) Using Hermite interpolation, find $P(x)$.
(b) Compute the expression $\int^∞_0 e^{−x}P(x)dx$ using the approximation from part (a).
Proof:
Using the Hermite formula, it seems that the minimum degree we can compute using the 3 given values for 2 points is $2$. However, the formula gives a 3rd degree polynomial and not a 2nd degree polynomial. I need the other missing derivative value. How do I get around that?
Concretely,
Since the Hermite polynomial is $H_n(x)=\sum_{k=1}^n f(x_k)h_k(x) +\sum_{k=1}^n f^{'}(x_k)\hat{h}_k(x)$ where
$$h_k=[1-2L_k^{'}(x_k)(x-x_k)](L_k(x))^2$$
and
$$\hat{h}_k=[1-2L_k^{'}(x_k)(x-x_k)](L_k(x))^2$$
where
$$L_k(x)=\prod_{j=1,j\neq k}^n \frac{x-x_j}{x_k-x_j}$$
It is easy to see for instance that $L_1(x)=-\frac{x-2}{2}$ and $L^{'}_1(0)=-1/2$ thus $h_1(x)=\frac{1}{4}(1+x)(x-2)^2$ Which is already a 3rd degree polynomial. Not a 2nd degree. Which means I would need to know also $P^{'}(0)$ which I do not have.
Can I use the Hermite Interpolating Theorem to build a second degree polynomial? What am I missing here?
I read here about specialized Hermite interpolation but there are no details.
Thanks and regards,
 A: Let's denote by $p=f(0)$, $q = f(2)$, $r=f'(2)$. We have the Hermite interpolation polynomial of degree ($\le$)  $2$
$$P(x)=a x^2 + b x + c$$ satisfying
$$P(0)=c = p \\
P(2) = 4 a + b + c = q \\
P'(2) = 4 a + b = r $$
so we get
$$P(x) = \frac{p-q+2 r}{4} x^2 + (-p+q-r)x + p$$
Now we calculate
$$\int_{0}^{\infty} P(x) e^{-x} d x= \frac{p+q}{2} = \frac{P(0)+P(2)}{2}$$
The surprise is that this formula is valid for any $P$ polynomial of degree $\le 2$, but it involves only $2$ nodes ($r$ does not appear --- if we added another condition $ P(a_3)= f(a_3)$ ( Lagrange)  or $P'(0) = f(0)$ (another Hermite), still we would get the same result). The reason behind it is the equality
$$\int_{0}^{\infty} x(x-2) e^{-x} d x = 0$$
Now the approximation formula is
$$\int_{0}^{\infty}f(x) e^{-x} dx \simeq \frac{f(0)+f(2)}{2}$$
Since the formula is an equality for polynomials of degree $\le 2$ ( i.e. those functions satisfying $f^{(3)} =0$), the error will be
$$R \le C \cdot \sup_{x\in [0, \infty)} |f^{(3)}(x)| $$
You can find $C$ by calculating the error in the formula for $f(x) = x^3$.
