Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Power Series Estimation/Error Problem

  1. Mar 7, 2010 #1
    1. The problem statement, all variables and given/known data
    Use power series to estimate [tex] \int_0^1 \cos(x^2)dx [/tex] with an error no greater than 0.005





    2. Relevant equations

    Lagrange Error Formula [tex] \frac{f^{(n+1)}}{(n+1)!}(x-a)^{(n+1)} [/tex]



    3. The attempt at a solution

    My original attempt was to find the series for [tex] \cos(x^2) [/tex], integrate it, and then subtract the functions to find where the error is less than or equal to .005. However since actually integrating [tex] \int\cos(x^2)dx [/tex] 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.
     
  2. jcsd
  3. Mar 7, 2010 #2
    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)
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook