Let $f\in{\cal C}^{\infty}\left(\mathbb{R}\right)$ be such that $\left|f^{\left(k\right)}\left(x\right)\right|\leq M_{k}$ for every $k$. Find a way to evaluate $\int_{0}^{\infty}e^{-x}f\left(x\right)dx$ using $f\left(0\right)$ and $f\left(1\right)$, and find an expression for the error.
So I used the fact that $$ \int_{0}^{\infty}e^{-x}f\left(x\right)dx=\int_{0}^{1}e^{-x}f\left(x\right)dx+\int_{1}^{\infty}e^{-x}f\left(x\right)dx $$ And by the trapezoid rule \begin{align*} \int_{0}^{1}e^{-x}f\left(x\right)dx & =\frac{\left(e^{-0}f\left(0\right)+e^{-1}f\left(1\right)\right)}{2}-\frac{1}{12}g''\left(\xi\right)=\\ & =\frac{1}{2}\left(f\left(0\right)+\frac{f\left(1\right)}{e}\right)-\frac{1}{12}g''\left(\xi\right) \end{align*} where $g\left(x\right)=e^{-x}f\left(x\right)$. Now as for the second integral I tried to use the substitution $x=\frac{1}{t},dx=-\frac{dt}{t^{2}}$ so $$ \int_{1}^{\infty}e^{-x}f\left(x\right)dx=-\int_{1}^{0}\frac{e^{-\frac{1}{t}}f\left(\frac{1}{t}\right)}{t^{2}}dt=\int_{0}^{1}\frac{e^{-\frac{1}{t}}f\left(\frac{1}{t}\right)}{t^{2}}dt $$ But how how to continue from here? Any help?