# Use a power series to approximate the definite integral to 6 decimal places, help

Use a power series to approximate the definite integral to 6 decimal places

$$\int_0^{0.3} \frac{x^2}{1+x^4} dx$$

-
What have you tried? Where are you getting stuck? –  Matthew Conroy Apr 16 '12 at 1:30
This is an exercise on a math book and I don't see any other elements around here that can give more context. –  Kleon Kita Apr 16 '12 at 1:37
Can you find the power series for $\frac{x^2}{1+x^4}$? Would you know what to do if you already had the power series? Have you solved other problems like this before? Answers to all of those questions help provide context (as would the nature of the book, and whether this is part of a course, review on your part, or something else). –  Arturo Magidin Apr 16 '12 at 1:56
no that what i cant find.i cant find the power series. –  Kleon Kita Apr 16 '12 at 2:21

There is actually a fairly quick way to compute the power series. Remember the geometric sum: $$\sum_{n=0}^\infty r^n = \frac{1}{1-r}$$ if $|r| < 1$. This may not seem, at first, to be what we want, but do the following: $$\frac{x^2}{1+x^4} = x^2\frac{1}{1 - (-x^4)} = x^2 \sum_{n=0}^\infty (-x^4)^n = \sum_{n=0}^\infty (-1)^n x^{4n+2}$$ Integrate the series termwise. You'll get: $$\int_0^{0.3} \frac{x^2}{1+x^4}\, dx = \left. \sum_{n=0}^\infty (-1)^n \frac{x^{4n+3}}{4n+3}\right|_{0}^{0.3} = \sum_{n=0}^\infty (-1)^n \frac{(0.3)^{4n+3}}{4n+3}$$

Now, suppose $$S = \sum_{n=0}^\infty (-1)^n b_n$$ is an absolutely convergent sum, and then it is a fact that if we let $$S_N = \sum_{n=0}^N (-1)^n b_n$$ then the error $$|E_N| = |S - S_N| \leq b_{N+1}$$

So to finish the problem, just look for the smallest value of $N$ so that $\frac{(0.3)^{4N+3}}{4N+3} \leq 10^{-7}$. This would guarantee that the $N$th partial sum would be accurate to within 6 decimal places.

For the sake of completeness, you likely only need to add up the first 2 terms, but to be safe (and since the 3rd term is not terribly difficult to compute), you may want to go ahead and sum up the first 3 terms to be certain.

-
We need a power series representation of $$f(x)={x^2\over1+x^4}$$ that is valid on the interval $[0,.3]$. In fact we will find one that's valid on the interval $(-1,1)$.
We start with something familiar and similar to the function of interest: For $|x|<1$ $$\tag{1} {1\over 1-x} =1+x+x^2+\cdots.$$ Substituting $x=-u^4$ into $(1)$ gives $$\tag{2} {1\over 1+u^4}=1-u^4+u^8-u^{12}-\cdots;$$ which is valid for $|u|<1$.
Almost there. Multiplying both sides of $(2)$ by $u^2$ gives $$\tag{3} {u^2\over 1+u^4}=u^2-u^6+u^{10}-u^{14}-\cdots$$ which is valid for $|u|<1$.
Now that we have the series, we evaluate the integral by integrating the series representation term by term; this is valid since the radius of convergence of the series is 1, and since the region of integration is $[0,.3]\subset(-1,1)$: \eqalign{ \int_0^{.3} {u^2\over 1+u^4}\,du &= \int_0^{.3} u^2\,du- \int_0^{.3} u^6\,du+\int_0^{.3} u^{10}\,du- \cdots\cr &={u^3\over 3}\Bigl|_0^{.3} -{u^7\over 7}\Bigl|_0^{.3} +{u^{11}\over 11}\Bigl|_0^{.3} -\cdots\cr &= {(.3)^3\over 3} -{(.3)^7\over 7} +{(.3)^{11}\over 11} -\cdots }
But, what is the approximation? Where may we stop? Note that the series obtained after integrating is an alternating series and that$(.3)^{11}/11<1.62\cdot 10^{-7}$. By a standard result on estimating a convergent alternating series with a partial sum, the desired approximation is $$\int_0^{.3} {u^2\over 1+u^4}\,du \approx {(.3)^3\over 3} -{(.3)^7\over 7} .$$