Approximation of integration

77 Views Asked by At

I want to estimate the integral $\int_0^{1/2}\ln(1+ \frac{x^2}{4})$ with error at most $10^{-4}$.

Any help will be appreciated.


I have calculated the power series of $\ln(1+ \frac{x^2}{4})$ which is

$$\sum_{n=0}^{n= \infty} \frac{(-1)^n}{(2n+2)\cdot 2^{2n+1}}x^{2n+2},$$

and radius of convergence $= 1/2$. Now calculate

$$\int_0^{1/2}\sum_{n=0}^{n= \infty} \frac{(-1)^n}{(2n+1)\cdot 2^{2n+1}}x^{2n+1}\,dx = \sum_{n=0}^{n= \infty} \frac{(-1)^n}{(2n+3)(2n+2)\cdot 2^{2n+1}}(\frac{1}{2})^{2n+3}.$$

2

There are 2 best solutions below

0
On

The integral can be computed analytically:

$x \ln \left(\frac{1}{4} \left(x^2+4\right)\right)-2 x+4 \tan ^{-1}\left(\frac{x}{2}\right)$

and with the limits becomes

$\frac{1}{2} \left(-2+\ln \left(\frac{17}{16}\right)+8 \tan ^{-1}\left(\frac{1}{4}\right)\right)$

or

$0.010227$.

8
On

The taylor series you put in the comment is wrong. You should get $$ \ln\left(1+\frac{x^2}{4}\right)= \frac{x^2}{4}-\frac{x^4}{32}+\frac{x^6}{192}-\frac{x^8}{1024}+O(x^{10}) $$

Integrating up to the 2nd power you get $$ \int_0^{1/2} \frac{x^2}{4}dx = \frac{1}{96} \simeq 0.010417 $$

Integrating up to the 4th power you get $$ \int_0^{1/2} \frac{x^2}{4}-\frac{x^4}{32} dx = \frac{ 157}{15360 } =0.01022135416 $$

Meanwhile the real result is $$ \int_0^{1/2} \ln\left(1+\frac{x^2}{4}\right) dx = \frac12 \left(-2+\ln(17/16)+8 \tan^{-1}(1/4)\right) \simeq 0.010227 $$ Since when we integrate up to the 4rth power we left out the terms with order $O(x^{2n})$ for $n> 2$, we get a result with error of order less than $10^{-4}$, indeed $$ 0.010227-0.01022135416= 0.00000564584< 0.0001= 10^{-4} $$