# Use a power series to approximate the definite integral to six decimal places.

Use a power series to approximate the definite integral to six decimal places.

$\int_{0}^{0.3} \frac{x^2}{1+x^4}$

I'm not sure how to find the sum of this for solving when it has x's in the numerator, this is what I assumed however.

$\frac{1}{1-x}$ $\sum_{n=0}^\infty$ x^n

$\sum_{n=0}^\infty \frac{1}{1-x^4}$

$\sum_{n=0}^\infty {(-x^4)}^n$ ==> $\frac{x}{1+x^4}$

I'm not sure if this is right nor what the next step is to get the approximate definite integral.

• This is definitely in the right direction. Then multiply the last fraction by $x$ to make it equal to the integrand. – Simply Beautiful Art Oct 26 '16 at 20:04
• so it becomes x^2/1+x^4? isn't this back in the same direction? how do i find the intergrand – Megan Byers Oct 26 '16 at 20:14
• To be more clear, $$\frac1{1+x^4}=\sum_{n=0}^\infty(-x^4)^n$$ $$\implies\frac{x^2}{1+x^4}=x^2\sum_{n=0}^\infty(-x^4)^n$$ and expand the sum as many digits as you need. – Simply Beautiful Art Oct 26 '16 at 21:10

$$I = \int_{0}^{\frac{3}{10}}\frac{x^2}{1+x^4}\,dx = \int_{0}^{\frac{3}{10}}\frac{x^2-x^6}{1-x^8}\,dx = \sum_{n\geq 0}\left(\frac{\left(\frac{3}{10}\right)^{8n+3}}{8n+3}-\frac{\left(\frac{3}{10}\right)^{8n+7}}{8n+7}\right) \tag{1}$$ and the last series is a series with positive terms. Since $$\sum_{n\geq 2}\left(\frac{\left(\frac{3}{10}\right)^{8n+3}}{8n+3}-\frac{\left(\frac{3}{10}\right)^{8n+7}}{8n+7}\right)<\frac{1}{19}\sum_{n\geq 2}\left(\frac{3}{10}\right)^{8n+3}<10^{-11} \tag{2}$$ the first eight figures of $I$ are given by the sum appearing in the RHS of $(1)$ restricted to $n=0$ and $n=1$: $$\sum_{n=0}^{1}\left(\frac{\left(\frac{3}{10}\right)^{8n+3}}{8n+3}-\frac{\left(\frac{3}{10}\right)^{8n+7}}{8n+7}\right)=\frac{3453033133161387}{385000000000000000}=\color{green}{0.00896891}72289906\ldots\tag{3}$$
$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} {x^{2} \over 1 + x^{4}} & = x^{2} - x^{6} + x^{10} - x^{14} + \mrm{O}\pars{x^{16}} \end{align} You must truncate the series whenever the 'last term' is smaller than the Machine Precision $\ds{\texttt{mp}}$. Namely, $$x^{n} < \texttt{mp} \implies n < {\ln\pars{\texttt{mp}} \over \ln\pars{x}} = {\verts{\ln\pars{\texttt{mp}}} \over \verts{\ln\pars{x}}} < {\verts{\ln\pars{\texttt{mp}}} \over \verts{\ln\pars{0.3}}}$$ Typical $\ds{\texttt{mp}}$ are of order $\ds{10^{-16}}$ which truncates the series up to $\ds{x^{14}}$: $$\left\{\begin{array}{rcl} \ds{\int_{0}^{0.3}{x^{2} \over 1 + x^{4}}\,\dd x} & \ds{=} & \ds{0.00896891723506713\ldots} \\[1mm] \ds{\int_{0}^{0.3}\pars{x^{2} - x^{6} + x^{10} - x^{14}}\,\dd x} & \ds{=} & \ds{0.0089689172\color{#f00}{289906155844}\ldots} \end{array}\right.$$
That's the best you can do when $\ds{\texttt{mp} \sim 10^{-16}}$.