Logo

An Example of (3.12)

When $s=-1$, the antiderivative of the "$h$" function can be only used for evaluating a definite integral. The precision level is decided by the number of expansion terms ($n$) used for $\sum\limits_{s=0}^{n}{h_{s}^{-c}}$ in Definition (3.1).

For example, let $n=10^4$ and

\begin{align*}
  \int_{0.5}^{1}{\frac{\exp (u)}{u}du}&=\log \left| u \right|+\sum\limits_{s=0}^{10000}{h_{s}^{-u}}{\Bigr|}_{0.5}^{1} \\
  & =\log \left| 1 \right|+\sum\limits_{s=0}^{\infty }{h_{s}^{-1}}-\log \left| 0.5 \right|-\sum\limits_{s=0}^{\infty }{h_{s}^{-0.5}} \\
  & =-\log \left| 0.5 \right|+\left( h_{0}^{-1}-h_{0}^{-0.5} \right)+\left( h_{1}^{-1}-h_{1}^{-0.5} \right)+\left( h_{2}^{-1}-h_{2}^{-0.5} \right)+\cdots +\left( h_{10000}^{-1}-h_{10000}^{-0.5} \right) \\
  & =\text{0}\text{.340439646634805}
\end{align*}

If we use the matlab function expint.m to calculate it,

\begin{align*}
  \int_{0.5}^{1}{\frac{\exp (u)}{u}du}&=\exp \operatorname{int}(0.5)-\exp \operatorname{int}(1) \\
  & =\text{0}\text{.340389660380640}
\end{align*}

The margin of the error by using (3.12) for $n=10^4$ is 4.9986e-005.

Download [full paper] [supplementary materials] [.m files] [technical note]