1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculus II - Taylor Series

  1. Aug 19, 2011 #1
    New Question (Changed Old one) - Taylor Polynomial - Upper Bound for Absolute Error

    1. The problem statement, all variables and given/known data

    (a) Find the 3-rd degree Taylor polynomial of sin(pix) centered at x=1.

    (b) Use (a) to approximate sin(1.1*pi)

    (c) Use the remainder term to find an upper bound for the absolute error in this approximation

    2. Relevant equations

    Estimate of the Remainder
    Let n be a fixed positive integer. Suppose there exists a number M such that |f(x)^(n+1)| <= M for all c between a and x inclusive. the remainder in the nth-order Taylor polynomial for f centered at a satisfies
    |Rn(x)| = |f(x) - Pn(x)| <= (M|x-a|^(n+1))/(n+1)!

    Remainder in a Taylor Polynomial
    Let Pn be the Taylor polynomial of order n for f. The remainder in using Pn to approximate f at the point x is
    Rn(x) = f(x) - Pn(x)

    Taylor Polynomials
    Let f be a function with f', f'', ..., f^(n) defined at a. The nth-order Taylor polynomial for f with its center a, denoted Pn, has the property that it matches f in value, slope and all derivatives up to the nth derivative at a; that is,
    Pn(x) = sigma[k=0,n] ck (x-a)^k, where the coefficients are
    ck = f(a)^k/k!, for k = 0, 1 2, ..., n

    Taylor's Theorem
    Let f have continuous derivatives up to f^(n+1) on an open interval I containing a. For all x in I,
    f(x) = Pn(x) + Rn(x),
    where Pn is the nth-order Taylor polynomial for f centered at a, and the remainder is
    Rn(x) = ( f(x)^(n+1)*(x-a)^(n+1) )/(n+1)!,
    for some point c between x and a

    3. The attempt at a solution

    (a) Find the 3-rd degree Taylor polynomial of sin(pix) centered at x=1.

    f(x) = sin(pix), df(x)/dx = pi cos(pix), d^2f(x)/dx^2 = -pi^2*sin(pix), d^3f(x)/dx^3 = -pi^3*cos(pix), f(1) = 0, df(1)/dx = -pi, d^2f(1)/dx^2 = 0, d^3f(1)/dx^3 = pi^3

    P3(x) = -pi(x-1) + (pi^3*(x-1)^3)/6

    (b) Use (a) to approximate sin(1.1*pi)

    P3(1.1) is about -.309

    (c) Use the remainder term to find an upper bound for the absolute error in this approximation

    d^4f(x)/dx^4 = pi^4*sin(pix), |d^4f(x)/dx^4| <= pi^4 = M
    R3(x) <= ( pi^4 |x-1|^4 )/4!

    So I take it that sense the maximum value of R3(x) occurs at R3(inf) which has a value of infinity I say that the upper bound is infinity? I think I may be doing something wrong

    I apologize for posting a post #2 I had to change some things around because I original had asked a different question but found the answer myself, so instead of creating another topic I just edited this one post for my new question that I seem to be struggling with.
     
    Last edited: Aug 19, 2011
  2. jcsd
  3. Aug 19, 2011 #2
    Please see post #1.
     
    Last edited: Aug 19, 2011
  4. Aug 19, 2011 #3

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Re: New Question (Changed Old one) - Taylor Polynomial - Upper Bound for Absolute Err

    Huh? How did you conclude that. Your remainder [itex]R_3(x)[/itex] is correct. So the upper bound is simply [itex]R_3(1.1)[/itex]. I don't see what infinity has to do with all of this...
     
  5. Aug 19, 2011 #4
    I thought I had to find the maximum value of this
    R3(x) <= ( pi^4 |x-1|^4 )/4!
    but I can just plug in 1.1?
     
  6. Aug 19, 2011 #5

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Yes, that's the idea!
     
  7. Aug 19, 2011 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You want to maximize the function |f(n+1)(x)| on the interval [1, 1.1]. One end of the interval is the point you're expanding about, and the other end is the point you're evaluating the polynomial at.
     
    Last edited: Aug 19, 2011
  8. Aug 19, 2011 #7
    So you don't necessarily just plug in the value your evaluating at, in this case 1.1, but what ever value from were the polynomial is centered at to the value that you were being asked to estimate, in this case [1,1.1] and this is why you plug in 1.1, because ( pi^4 |x-1|^4 )/4! attains it's maximum value on [1,1.1] at the value of 1.1... ?

    So I could have cases were I don't necessarily plug in the value I'm trying to estimate into the remainder expression just what ever value from [a, c] were a is the value were the polynomial is centered at, and c is the value that you plugged into the Taylor polynomial to get an estimate of?
     
  9. Aug 19, 2011 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Just to keep your variable straight, a is the point your expanding about; x is the point you're approximating the function at; and c is some point in the interval [a,x].

    M is an upper bound for |f(n+1)(x)|. That's the function you're interested in maximizing. In this case, as you noted, it would be [itex]\lvert\pi^4 \sin \pi x\rvert[/itex]. At [itex]x=\pi[/itex], that function vanishes, and you know over the interval [1, 1.1] it's strictly increasing, which is why you know x=1.1 is where it reaches a maximum. If you had a function that wiggled more, the maximum could occur somewhere in the middle of the interval instead of at an endpoint. So in this case, you know [itex]M=\pi^4 \sin 1.1\pi[/itex] will work (which is actually a bit better than the estimate for M you're using by about a factor of 3).

    Presumably, you don't know what [itex]\sin 1.1\pi[/itex] equals, otherwise you wouldn't be trying to approximate it, so that expression for M doesn't seem so useful. But you can say [itex]\lvert\sin \pi x\rvert \le \lvert \pi(x-1) \rvert[/itex] when x is close to 1 (just look at a graph of the two functions), so [itex]\lvert\pi^4 \sin 1.1\pi \rvert \le \pi^5 \lvert x-1 \rvert = 0.1\pi^5 = M[/itex] would work.

    At this point, you're done with finding a maximum. Now you just plug the values you're given and your estimate for M into the formula for the remainder. In this problem, you're given x=1.1, so that's what you use.
     
    Last edited: Aug 19, 2011
  10. Aug 19, 2011 #9
    I'm just trying to fully understand this, you don't plug in x=1.1 because this is what your given into the remainder equation, but you do so because it's the value on [1,1.1] in which the equation for the remainder achieves it's maximum value? I'm sort of unsure based on that.
     
  11. Aug 19, 2011 #10

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You're not trying to maximize R(x). (If anything, you want to minimize it.) You need to estimate the maximum of f(n+1)(x) on [a,x] to find M.
     
  12. Aug 19, 2011 #11
    So I can plug in any value between [a,x] including either a or x? Sorry my book didn't do that great job explaining this at all. But sense we want to minimize this value I should plug in the value that will minimize it but it doesn't really matter if you don't?
     
  13. Aug 19, 2011 #12

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    No. What does Taylor's theorem say about the remainder?
     
  14. Aug 19, 2011 #13
    My book says

    "the remainder is
    Rn(x) = ( f(x)^(n+1)*(x-a)^(n+1) )/(n+1)!,
    for some point c between x and a"

    So I take it I'm not suppose to plug in either x or a but c, which is some value between x and a, any value at all?
     
  15. Aug 19, 2011 #14

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    No, your book probably says

    [tex]R_n(x)=\frac{f(c)^{(n+1)}(x-a)^{n+1}}{(n+1)!}[/tex]

    But c is not known, so you can only find an upper bound of it. In this case, [itex]\pi^4[/itex] is an upper bound, so

    [tex]|R_n(x)|\leq \frac{\pi^4 (x-a)^{n+1}}{(n+1)!}[/tex]

    And now you just need to plug in 1.1 to find the answer.
     
  16. Aug 19, 2011 #15
    [tex]|R_n(x)|\leq \frac{M (x-a)^{n+1}}{(n+1)!}[/tex]

    Thanks for your response. So I can always just plug in x, the value I was trying to make an estimate for, in this case 1.1, into the equation above when asked for a upper bound? I don't have to try to maximize or minimize this function in any way or shape or form?

    Is the absolute value function not necessary because my book has the function as

    [tex]|R_n(x)|\leq \frac{M |x-a|^{n+1}}{(n+1)!}[/tex]
     
  17. Aug 19, 2011 #16

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    No, the only thing you have to worry about is to choose M as small as you can. Obviously, choosing M=10000000000000000 is correct here but wouldn't convey much useful information :smile: But your [itex]M=\pi^4[/itex] seems quite small.

    So yes, jjust plug in x now.
     
  18. Aug 19, 2011 #17

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Yes, I'm sorry, the absolute value is necessary. A typo of mine...
     
  19. Aug 19, 2011 #18
    I think I get it now. Thanks for the help.
     
  20. Aug 19, 2011 #19

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    As you wrote in the original post, the remainder is the difference between the actual function, f(x), and the Taylor polynomial Pn(x):[tex]R_n(x) = f(x)-P_n(x)[/tex]So for this problem, you have[tex]R_n(1.1) = f(1.1)-P_n(1.1)[/tex]The theorem tells you[tex]R_n(x) = \frac{f^{(n+1)}(c)(x-a)^{n+1}}{(n+1)!}[/tex]where c is between x and a. The problem is, you don't know what c is, but if you could find a number M such that M≥|f(n+1)(z)| for all z in [a,x], you can say[tex]|R_n(x)| = \left\lvert \frac{f^{(n+1)}(c)(x-a)^{n+1}}{(n+1)!} \right\rvert \le \frac{M \lvert x-a \rvert^{n+1}}{(n+1)!}[/tex]The problem now is to find a suitable M. It needs to be big enough so it bounds |f(n+1)| from above, but you want to find an M as small as possible so that your estimate for the remainder is actually useful. One approach is to find the maximum |f(n+1)| attains on [a,x] and use that for M. Since it's the maximum, it obviously bounds the function from above, and it's the smallest M that does that. However, sometimes, like when f(n+1) is complicated, finding the maximum is more trouble than it's worth, so you find a possible M another way, like you did in this problem.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Calculus II - Taylor Series
Loading...