Estimating $\int_{0}^{\frac{2}{5}} \ln(1+x^4)dx$ using power series expansion

111 Views Asked by At

I was requested to estimate

$$\int_{0}^{\frac{2}{5}} \ln(1+x^4)\,dx$$

with an error $\epsilon$ such that $\epsilon < \frac{1}{10^6}$ and using the series expansion of $f(x)=\ln(1+x^4)$. I am unsure of my result, and the validity of my procedure, and was wondering if someone could tell me if it's correct, or correct me if it's wrong. Thanks in advance for taking the time!

$i$) Firstly, notice that

$$\frac{d}{dx}f(x) = 4x^3\frac{1}{1+x^4} = \sum_{n=0}^{\infty}(-1)^n4x^{4n+3} $$

and therefore

$$f(x) = \ln(1+x^4) = \sum_{n=0}^{\infty} \frac{(-1)^n4x^{4n+4}}{4n+4} + C$$

and it is easy to see $C =0$, since $f(0) = 0$.

$ii)$ From $i$ it follows that $$\int_{0}^{\frac{2}{5}} \ln(1+x^4)\,dx = \int_{0}^{\frac{2}{5}} \sum_{n=0}^{\infty} \frac{(-1)^n4x^{4n+4}}{4n+4}\,dx$$

Now, since $\int \sum_{n=0}^{\infty} \frac{(-1)^n4x^{4n+4}}{4n+4} = \sum_{n=0}^{\infty} \frac{(-1)^n4x^{4n+5}}{(4n+4)(4n+5)} + C$, we have

$$\int_{0}^{\frac{2}{5}} \ln(1+x^4)\,dx = \int_{0}^{\frac{2}{5}} \sum_{n=0}^{\infty} \frac{(-1)^n4x^{4n+4}}{4n+4}\,dx$$

$$= \sum_{n=0}^{\infty} \frac{(-1)^n4(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)} - \sum_{n=0}^{\infty} \frac{(-1)^n4(0)^{4n+5}}{(4n+4)(4n+5)}$$ $$= \sum_{n=0}^{\infty} \frac{(-1)^n4(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)}$$

$iii)$ Therefore, the integral we are required to approximate is equal to an alternating series with $|a_n| = b_n = \frac{4(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)}$.

We know the series converges because it is a geometric series with $|r| = \frac{2}{5}$, and therefore $b_n \rightarrow 0$ when $n \rightarrow \infty$. Secondly, $b_{n+1} \leq b_n$ because

$$\frac{4(\frac{2}{5})^{4n+9}}{(4n+8)(4n+9)} \leq \frac{4(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)} \iff \frac{(\frac{2}{5})^4}{(4n + 8)(4n + 9)} \leq \frac{1}{(4n+4)(4n+5)}$$

Since the numerators are constant terms, the inequality is bound to be true for all $n \geq i$ for some $i \in \mathbb{N}$, since $(4n+4)(4n+5) \leq (4n+8)(4n+9)$ for all $n$. Therefore, the sequence is necessarily decreasing from some point onwards.

Because the sequence is decreasing and its limit is $0$, we know $|\epsilon| = |s - s_n| \leq |b_{n+1}|$. Using a calculator, we can see that $$|b_{n+1}| \leq \frac{1}{10^6}$$ is already satisfied for $n = 1$, and therefore $|\epsilon| < \frac{1}{10^6}$ for $n \geq 1$. Then, we have that

$$\int_{0}^{\frac{2}{5}} \ln(1+x^4)\,dx \approx \sum_{n = 0}^{1} \frac{(-1)^n4(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)} = \frac{4(\frac{2}{5})^4}{4 \times 5} - \frac{4(\frac{2}{5})^9}{9 \times 8} = 0.00510...$$

Indeed, WolframAlpha's calculator yields $$\int_{0}^{\frac{2}{5}} \ln(1+x^4)\,dx \approx 0.00203$$

so the approximation does not seem too bad. However, this could be mere chance.

4

There are 4 best solutions below

2
On BEST ANSWER

\begin{align*} \log(1+x)&=x-{x^2\over 2}+{x^3\over 3}+...\\ \implies\log(1+x^4)&=x^4-{x^8\over 2}+{x^{12}\over 3}+...\\ \implies\int_0^{2/5}\log(1+x^4)dx&={x^5\over 5}-{x^9\over 18}+{x^{13}\over 39}+...+{x^{4n+1}\over {n(4n+1)}}+...|^{2/5}_0 \end{align*} Taking one term gives $0.002048$ the next term corrects this to $0.00203343644$ and another gives $0.00203360851$ ...

0
On

I think your problem is the estimate of the remainder term. In fact, using $$ \ln(1+x)=\sum_{k=1}^n\frac{(-1)^{k-1}}{k}x^k+R_n(x) $$ where $$ R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}x^{n+1}, n\ge1, f(x)=\ln(1+x) $$ where $c$ is between $0$ and $x$. So \begin{eqnarray} &&\int_0^{2/5}\ln(1+x^4)dx=\int_0^{2/5}\sum_{k=1}^n\frac{(-1)^{k-1}}{k}(x^4)^kdx+\int_0^{2/5}R_n(x^4)dx\\ &=&\sum_{k=1}^n\frac{(-1)^{k-1}}{k(4k+1)}\bigg(\frac25\bigg)^{4k+1}+\int_0^{2/5}R_n(x^4)dx. \end{eqnarray} Now \begin{eqnarray} \bigg|\int_0^{2/5}R_n(x^4)dx\bigg|&=&\bigg|\int_0^{2/5}\frac{f^{(n+1)}(c)}{(n+1)!}x^{4(n+1)}dx\bigg| \\ &=&\bigg|\int_0^{2/5}\frac{1}{(n+1)(1+c)^{n+1}}x^{4(n+1)}dx\bigg| \\ &\le&\int_0^{2/5}\frac{1}{n+1}x^{4(n+1)}dx\\ &=&\frac{1}{(n+1)(4n+5)}\bigg(\frac25\bigg)^{4n+5}\\ &\le&\frac1{10}\bigg(\frac25\bigg)^{4n+5}. \end{eqnarray} Letting $$ \frac1{10}\bigg(\frac25\bigg)^{4n+5}<10^{-6} $$ one has $$ n>\frac14\bigg(\frac{5\ln(10)}{\ln(\frac{5}{2})}-5\bigg)=1.89118. $$ Choose $n=2$ and then $$ \int_0^{2/5}\ln(1+x^4)dx\approx\frac{1}{5}\bigg(\frac25\bigg)^5-\frac{1}{18}\bigg(\frac25\bigg)^9=0.00203344 $$ which is close to the answer from Mathematica.

0
On

Making the problem more general, we have $$a_n=(-1)^n \frac{4\,(\frac{2}{5})^{4n+5}}{(4n+4)(4n+5)}$$ and you want to know $n$ such that $$|a_{n+1}|= \frac{4\,(\frac{2}{5})^{4n+9}}{(4n+8)(4n+9)}\leq 10^{-k}$$ that is to say $$(4n+9)^2\geq (4n+8)(4n+9)\geq {4\,\left(\frac{2}{5}\right)^{4n+9}} 10^k\tag 1$$ Let $m=4n+9$ at search for $m$ such that $$m^2 \geq 4\,\left(\frac{2}{5}\right)^{m } 10^k$$ the solution of which being given in terms of Lambert function $$m=\frac{2}{\log \left(\frac{5}{2}\right)} W\left(10^{\frac k 2 } \log \left(\frac{5}{2}\right)\right)$$

Using $k=60$ instead of $k=6$ gives, as a real, $m=141.48$ so $n=34$.

Checking $$|a_{33+1}|= 1.57\times 10^{-60} \quad > 10^{-60}$$ $$|a_{34+1}|= 3.81\times 10^{-62} \quad < 10^{-60}$$

Notice that, with $k=60$, the exact solution of $(1)$ is, as a real, $n=33.122$ while the approximation leads to $n=33.120$ that is to say $\lceil n \rceil=34$.

0
On

$x^4-x^8/2<\ln(1+x^4) < x^4, |x|<<1$. So $$ \frac{2^5}{5^5}-\frac{2^8}{9.5^9}<I=\int_{0}^{5/2} \ln(1+x^4) dx < \frac{2^5}{5^6}$$ $$\implies 0.002033 < I < 0.002048$$