Power Series Estimation/Error Problem

• chimychang

Homework Statement

Use power series to estimate $$\int_0^1 \cos(x^2)dx$$ with an error no greater than 0.005

Homework Equations

Lagrange Error Formula $$\frac{f^{(n+1)}}{(n+1)!}(x-a)^{(n+1)}$$

The Attempt at a Solution

My original attempt was to find the series for $$\cos(x^2)$$, integrate it, and then subtract the functions to find where the error is less than or equal to .005. However since actually integrating $$\int\cos(x^2)dx$$ is very difficult and it's ridiculously slow to graph I am now thinking about using the Lagrange error formula. I'm not exactly sure how that would work though.

so the power series representation of cos(x) is
sum_(k=0 to infinity) (-1)^k *x^(2k)/(2k)!

So the first few terms are
cos(x) = 1-x^2/2!+x^4/4!-x^6/6!+x^8/x!-x^10/10!

Now for cos(x^2), put x^2 in for every x
cos(x^2) = 1-(x^2)^2/2!+(x^2)^4/4!-(x^2)^6/6!+(x^2)^8/x!-(x^2)^10/10!
= 1-x^4/2! + x^8/4! -x^12/6! +x^16/8!-x^20/10!

then integrate each term (not that hard, its a polynomial)
-x^21/76204800+x^17/685440-x^13/9360+x^9/216-x^5/10+x+constant
^copied from wolfram alpha

for the error to be less than .005, that means that one of the integrated terms has to have an absolute value of less than .005 when you put x=1

basically, you guess and check. or you can do about 5 terms since its pretty accurate (9 terms is accurate to 7 decimal places)