0
  1. Do you know of a text on numerical analysis that teaches how to estimate integrals like $\int_{1}^{10} x^{x} \, dx$ with precise information regarding the relative error?

  2. Do you know if programmers of scientific calculators resorted once to Taylor's theorem while working on implementations of functions like $\sin x$ or $\cos x$? If so, is there a paper o book backing this up?

Thanks in advance for your replies.

Jamai-Con
  • 577

1 Answers1

1

Regarding the first question, consider discretization points $x_0=1,x_1,\dots,x_N=10$. By computing the first and the second derivative \begin{align} (x^x)'&=x^x\left(\log x+1\right)\\ (x^x)''&=x^x\left(\log x+1\right)\left(\log x+1+\frac{1}{x}\right) \end{align} you immediately get that the function is increasing and convex on $[1,9]$. From this the trapezoidal method is upper bound to the unknown integral: \begin{align} I_{\text{UB}}(N)=\sum_{i=1}^N\frac{x_{i-1}^{x_{i-1}}+x_i^{x_i}}{2}(x_i-x_{i-1})=\underbrace{\frac{x_N-x_0}{N}}_{\frac{9}{N}}\sum_{i=1}^N\frac{x_{i-1}^{x_{i-1}}+x_i^{x_i}}{2} \end{align} By considering the Taylor approximation of the first order on each subinterval made in the left point $x_{i-1}$, we get the lower bound: \begin{align} I_{\text{LB}}(N)=&\sum_{i=1}^Nx_{i-1}^{x_{i-1}}\left[1+\frac{x_i-x_{i-1}}{2}\left(\log x_{i-1}+1\right)\right](x_i-x_{i-1})=\nonumber\\ &\underbrace{\frac{x_N-x_0}{N}}_{\frac{9}{N}}\sum_{i=1}^Nx_{i-1}^{x_{i-1}}\left[1+\frac{x_i-x_{i-1}}{2}(\log x_{i-1}+1)\right] \end{align} The error is given by \begin{align} \text{e}(N)=I_{\text{UB}}(N)-I_{\text{LB}}(N)~\to_{N\to \infty}~0 \end{align} where $I_{LB}<\text{err}<I_{UB}$. Numerically: \begin{align} N= 10^5, &~I_{\text{LB}} = 3057488867.500303, ~I_{\text{UB}} = 3057488934.374307, ~\text{err} = 66.87400\\ N= 10^6, &~I_{\text{LB}} = 3057488911.636012, ~I_{\text{UB}} = 3057488912.304783, ~\text{err} = 0.66877\\ N=10^7, &~I_{\text{LB}} = 3057488912.077400, ~I_{\text{UB}} = 3057488912.084087, ~\text{err} = 0.00668 \end{align}