# Find an integral problem

How to estimate the following integral: $$\int_{0}^{1} \frac{1-\cos x}{x}dx$$

This is a continuation of this question: How to estimate the following integral: $\int_0^1 \frac{1-\cos x}{x}\,dx$

I understood the computation of the integral. however when I try to find the estimate for the integral that is accurate to within $10^{-5}$, I got $$1/4-1/96+1/4320-1/322560+1/36288000$$ approximate to $0.2398117422$. So my question would be

1st. is there other way to do the integral? not in terms of summation.

2nd. is $0.239811722$ accurate to within $10^{-5}$? if so, how?? isn't $10^{-5}$ 0.00001? $0.239811722$ isn't as same as $0.00001$.

Correct me if I'm wrong please and tell me step by step.

Thank you for your time and effort

Sincerely

-
Welcome to MSE! Are you trying to use numerical methods or something else? It helps readability to format questions using MathJax (see FAQ). Regards – Amzoti Apr 23 '13 at 1:08
yesterday i was working on this same problem. see the link math.stackexchange.com/questions/368988/… – parker Apr 23 '13 at 1:10
You can use other numerical methods. – Mhenni Benghorbal Apr 23 '13 at 1:16
There is no way of computing the exact value of that integral since you can't represent that integral with finitely many elementary functions – mathguy Apr 23 '13 at 1:19
Can you tell me step by step using other numerical methods?? and @mathguy then do i just plug 1 and 0 into the equation and then find a number that is accurate to within 10^-5?? – parker Apr 23 '13 at 1:21

There are many techniques, starting from the Trapezoidal Rule or Simpson's Rule, and perhaps using Richardson Extrapolation to improve "bang for the buck," that is, use a smallish number of function evaluations. Then there is the very powerful Gaussian Quadrature.

There are error estimates associated with all these procedures. They involve estimating certain higher order derivatives, and tend to be on the pessimistic side. We mentioned all these various names so that you can search for them in your text or online.

But a natural thing to do here, which is the path you took, is to use power series. Since the power series expansion of $\cos x$ is $1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\cdots$, the power series expansion of $\frac{1-\cos x}{x}$ is $$\frac{x}{2!}-\frac{x^3}{4!}+\frac{x^5}{6!}-\frac{x^7}{8!} +\frac{x^9}{10!}-\cdots.$$ Integrate term by term from $0$ to $1$. We get $$\frac{1}{2\cdot 2!}-\frac{1}{4\cdot 4!}+\frac{1}{6\cdot 6!}-\frac{1}{8\cdot 8!} +\frac{1}{10\cdot 10!}-\frac{1}{12\cdot 12!}+\cdots.$$ The above series is an alternating series. The error made by truncating at a particular point has absolute value less than the absolute value of the first "neglected" term.

To decide where it is safe to stop, just evaluate the terms, which you will need to anyway, and stop just before the absolute value dips below $10^{-5}$.

This means that you can stop adding up after the $\frac{1}{8\cdot 8!}$ term, since $10\cdot 10!$ is substantially bigger than $10^5$.

-
you meant bigger than 10^-5? – parker Apr 23 '13 at 1:34
Well, the denominator is $8\cdot 8!$, and I wrote $8\cdot 8!$ bigger than $10^5$ instead of the equivalent $\frac{1}{8\cdot 8!}\lt 10^{-5}$. – André Nicolas Apr 23 '13 at 1:36
So i should have 1/2*2! -1/4*4! + 1/6*6! correct? bc that is accurate to within 10^-5?? that compuation gives me 0.2398148148 – parker Apr 23 '13 at 2:21
or am i wrong?? – parker Apr 23 '13 at 2:28
I calculated $8\cdot 8!$ incorrectly. It is not big enough. We need to include the $\frac{1}{8\cdot 8!}$ term. – André Nicolas Apr 23 '13 at 2:31