# Using a series to approximate an integral

• Jul 19th 2009, 11:45 PM
yellowfive
Using a series to approximate an integral
How would I use a series to approximate the following integral?
$\displaystyle \int_{0.5}^{1} \frac {cos(x)} {x^2} dx$
I think that it somehow relates to
$\displaystyle cos (x) = 1-\frac {x^2}{2!}+\frac {x^4}{4!}-\frac {x^6}{6!}+...+\frac{(-1)^nx^{2n}}{(2n)!}+...$
but I can't figure out what to do with the $\displaystyle x^2$ part and how to solve the integral with all the different terms to the various powers....
• Jul 20th 2009, 12:09 AM
DeMath
Quote:

Originally Posted by yellowfive
How would I use a series to approximate the following integral?
$\displaystyle \int_{0.5}^{1} \frac {cos(x)} {x^2} dx$
I think that it somehow relates to
$\displaystyle cos (x) = 1-\frac {x^2}{2!}+\frac {x^4}{4!}-\frac {x^6}{6!}+...+\frac{(-1)^nx^{2n}}{(2n)!}+...$
but I can't figure out what to do with the $\displaystyle x^2$ part and how to solve the integral with all the different terms to the various powers....

$\displaystyle \int\limits_{0.5}^1 {\frac{{\cos x}}{{{x^2}}}dx} = \int\limits_{0.5}^1 {\frac{1}{{{x^2}}}\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n}}}}{{\left( {2n} \right)!}}} dx} =$$\displaystyle \int\limits_{0.5}^1 {\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 2}}}}{{\left( {2n} \right)!}}} dx} = \sum\limits_{n = 0}^\infty {\left\{ {\frac{{{{\left( { - 1} \right)}^n}}}{{\left( {2n} \right)!}}\int\limits_{0.5}^1 {{x^{2n - 2}}dx} } \right\}} . What you need to do now, I hope you know. • Jul 20th 2009, 06:26 AM yellowfive Thanks! So this becomes: \displaystyle \int\limits_{0.5}^1 {\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 2}}}}{{\left( {2n} \right)!}}} dx} = \displaystyle [{\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 1}}}}{{\left( {2n} \right)!}}} }]_{0.5}^{1} How do I integrate this from here though? Do I do this to find each term of the series? \displaystyle \displaystyle [{\frac{{{{\left( { - 1} \right)}^0}{1^{2(0) - 1}}}}{{\left( {2(0)} \right)!}}} - {\frac{{{{\left( { - 1} \right)}^0}{0.5^{2(0) - 1}}}}{{\left( {2(0)} \right)!}}} ] + [{\frac{{{{\left( { - 1} \right)}^1}{1^{2(1) - 1}}}}{{\left( {2(1)} \right)!}}} - {\frac{{{{\left( { - 1} \right)}^1}{0.5^{2(1) - 1}}}}{{\left( {2(1)} \right)!}}} ] +... • Jul 20th 2009, 06:39 AM DeMath Quote: Originally Posted by yellowfive Thanks! So this becomes: \displaystyle \int\limits_{0.5}^1 {\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 2}}}}{{\left( {2n} \right)!}}} dx} = \displaystyle [{\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 1}}}}{{\left( {2n} \right)!}}} }]_{0.5}^{1} How do I integrate this from here though? Do I do this to find each term of the series? \displaystyle \displaystyle [{\frac{{{{\left( { - 1} \right)}^0}{1^{2(0) - 1}}}}{{\left( {2(0)} \right)!}}} - {\frac{{{{\left( { - 1} \right)}^0}{0.5^{2(0) - 1}}}}{{\left( {2(0)} \right)!}}} ] + [{\frac{{{{\left( { - 1} \right)}^1}{1^{2(1) - 1}}}}{{\left( {2(1)} \right)!}}} - {\frac{{{{\left( { - 1} \right)}^1}{0.5^{2(1) - 1}}}}{{\left( {2(1)} \right)!}}} ] +... OMG! \displaystyle \int\limits_{0.5}^1 {\frac{{\cos x}}{{{x^2}}}dx} = \int\limits_{0.5}^1 {\frac{1}{{{x^2}}}\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n}}}}{{\left( {2n} \right)!}}} dx} =$$\displaystyle \int\limits_{0.5}^1 {\sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n - 2}}}}{{\left( {2n} \right)!}}} dx} = \sum\limits_{n = 0}^\infty {\left\{ {\frac{{{{\left( { - 1} \right)}^n}}}{{\left( {2n} \right)!}}\int\limits_{0.5}^1 {{x^{2n - 2}}dx} } \right\}} .$

Now find this integral

$\displaystyle \int\limits_{0.5}^1 {{x^{2n - 2}}dx} = \left. {\frac{1}{{2n - 1}}{x^{2n - 1}}} \right|_{0.5}^1 = \frac{1}{{2n - 1}}\left( {1 - \frac{1}{{{2^{2n - 1}}}}} \right) = \frac{{{4^n} - 2}}{{\left( {2n - 1} \right){4^n}.}}$

So we have

$\displaystyle \int\limits_{0.5}^1 {\frac{{\cos x}}{{{x^2}}}dx} = \sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}\left( {{4^n} - 2} \right)}} {{\left( {2n} \right)!\left( {2n - 1} \right){4^n}}}} .$