Approximate the value of the intergral

62 Views Asked by At

Suppose that $\arctan(x)=\sum_{n=0}^{\infty} \frac{(-1)^nx^{2n+1}}{2n+1}$ for all x $\in$ $[-1,1]$. Use the least number of terms to approximate the value of the integral $$\int_0^{1/2} \frac{x-\arctan(x)}{x^2} dx$$ with an error less than $10^{-5}$

I did was $$ \int_0^{1/2} \frac{x-\arctan(x)}{x^2} dx = \int_0^{1/2} \frac{1}{x} dx + \sum_{n=0}^\infty \frac{(-1)^{n+1}}{2n+1} \int_0^{1/2} {x^{2n-1}} dx $$

I feel that $\int_0^{1/2} \frac{1}{x} dx$ diverges

2

There are 2 best solutions below

0
On

HINT

You cannot quite split up like that, but here is something you can do: $$ \arctan x \approx x - \frac{x^3}{3} + \frac{x^5}{5} \pm \ldots $$ Therefore, $$ \frac{x - \arctan x}{x^2} \approx \frac{x^3/3 - x^5/5 \pm \ldots}{x^2} = x/3 - x^3/5 \pm \ldots $$

0
On

Using the infinite expansion of $\arctan (x)$, the integrand is $$\frac{x-\arctan(x)}{x^2} =\sum_{n=0}^\infty (-1)^n\frac{ x^{2 n+1}}{2 n+3}$$ $$\int\frac{x-\arctan(x)}{x^2}\,dx =\sum_{n=0}^\infty (-1)^n \frac{ x^{2 n+2}}{(2 n+2) (2 n+3)}$$ $$\int_0^{\frac 12}\frac{x-\arctan(x)}{x^2}\,dx =\sum_{n=0}^\infty (-1)^n \frac{ 2^{-2 n-2}}{(2 n+2) (2 n+3)}$$ So, making the problem more general, you want to know $p$ such that, summing $p$ terms $$\frac 1 {2^{2p+6} (p+2) (2 p+5)} \leq 10^{-k}$$ that is to say $${2^{2p+6} (p+2) (2 p+5)} \geq 10^{k}$$

Take logarithms of both sides. Assume that $p$ is large and expand as series. The lhs is $$2 p \log (2)+7\log (2)+2 \log(p)+\frac{9}{2 p}+O\left(\frac{1}{p^2}\right)$$ and an approximation would be obtained solving $$2 p \log (2)+7\log (2)+2 \log(p)=k \log(10)$$ the solution of which being $$p_k =\frac {W(t)} {\log(2)} \qquad \text{where} \qquad t=\frac{\log (2) }{8 \sqrt{2}}10^{k/2}$$ $W(t)$ being Lambert function.

For your case ($k=5$), this gives $$p_5=\frac{W\left(\frac{25}{2} \sqrt{5} \log (2)\right)}{\log (2)}\approx 3.14964 \implies \lceil p_5 \rceil =4$$ while the exact solution is $2.54519$ that is to say $p=3$.

But, let us do it for $k=15$. The appoximate solution is $$p_{15}=\frac{W\left(1250000 \sqrt{5} \log (2)\right)}{\log (2)}\approx 17.3016\implies \lceil p_{15} \rceil =18$$ while the exact solution is $17.1375$ that is to say $p=18$.