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!

Taylor Polynomial of Smallest Degree to approximation

  1. Dec 8, 2012 #1
    Hey, guys. Having problems with this question because I don't exactly know how to begin it.

    1. The problem statement, all variables and given/known data
    The problem states to: "Find the Taylor polynomial of smallest degree of an appropriate function about a suitable point to approximate the given number to within the indicated accuracy.


    2. Relevant equations
    The only two things given are -1/2.1 and the indicated accuracy= 0.0005.


    3. The attempt at a solution

    I don't know how to start this seeing as there's not really a function given or at least I don't see it. If instead I was given the number √e, then √e = e^1/2 = f(1/2) and I would know where to go from there. But -1/2.1, I don't know how to start.
     
  2. jcsd
  3. Dec 8, 2012 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    2.1 is not a round number, so you could choose the denominator (or 1/2 of it) as variable and calculate the taylor polynomial around a number close to that.
     
  4. Dec 8, 2012 #3
    You're saying I could choose x to be 2.1 and have a function as f(x) = -1/x? Lemme see if I know what to do with that.
     
  5. Dec 8, 2012 #4
    Ok, this is what I did so far. I set x = 2.1 and said that f(x) = -1/x = -x^-1

    Then I took derivatives.

    f^1(x) = x^-2
    f^2(x) = -2x^-3
    f^3(x) = (-3)(-2)(-1)(-x^-4)
    f^4(x) = (-4)(-3)(-2)(-1)(-x^-5)

    thereby establishing a series Ʃ[(-1)^(n+1)×n!]/x^(n+1) from n=0 to ∞

    The problem is that my center, or c, is equal to 0, right? I can't take f(0) or f^1(0) and so forth in order to create a Taylor polynomial.
     
  6. Dec 8, 2012 #5

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    That is a bad choice, there are better options. It is your task to find an appropriate point.
    Oh, and you can reduce the sign mess a bit if you calculate 1/2.1 and add the sign afterwards.
     
  7. Dec 8, 2012 #6

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    The nth derivative of f(x) = -1/x is
    [itex]\displaystyle
    f^{(n)}(x)=\frac{(-1)^{n+1}n!}{x^{n+1}}\ .[/itex]​
    Use that to evaluate the derivative at x=c.


    The Taylor series is not
    [itex]\displaystyle
    \sum_{n=0}^{\infty}\frac{(-1)^{n+1}n!}{x^{n+1}}\ .[/itex]​

    It seems to me that you would want to use the Taylor Polynomial obtained by expanding f(x) = -1/x about x=+2 , not x=0 .

    The kth order Taylor Polynomial for f(x) at x=c is
    [itex]\displaystyle P_k(x) = f(c) + f'(c)(x-c) + \frac{f''(c)}{2!}(x-c)^2+\frac{f^{(3)}(c)}{3!}(x-c)^3 + \cdots + \frac{f^{(k)}(c)}{k!}(x-c)^k \ .[/itex]​
     
  8. Dec 8, 2012 #7
    I'm confused. How is x=c? Because we choose it to be?
     
  9. Dec 8, 2012 #8

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    You need [itex]\displaystyle f(c)\,,\ f'(c)\,,\ f''(c)\,,\ f^{(3)}(c)\,,\ \text{etc.}[/itex] So you evaluate the function, f(x), and its derivatives, f(n)(x), at x=c .

    In this case it makes sense to choose c = 2, so f(c) = -1/2 . You then find a Taylor Polynomial for f(x) = -1/x, expanded about x = 2 . That means that c is 2 and the polynomial will be a good approximation to f(x) in the vicinity of x = 2 .

    Then, because you want an approximation for -1/(2.1) you will evaluate the polynomial at x = 2.1 . This is very convenient because in this case (x-c) = 2.1 - 2 = 0.1 . Taking powers of (x-c) then means that you will be taking powers of 0.1 .

    At any rate, what do you get for a Taylor Polynomial of -1/x expanded about x = 2 ?
     
  10. Dec 8, 2012 #9
    Hm, ok. So my remainder function is equal to f^(n+1)(z)(0.1)^(n+1)/(n+1)!.

    Since c=2 and x=2.1, z lies in between both of those numbers and z is also going to be in the denominator of the function.

    From here, I decided that replacing z with 2 will give me the largest possible value so that the error is less than 0.0005. (2 < z < 2.1)

    I started with n=2 and got my remainder as (0.1)^3/(z^4) < (0.1)^3/(2^4) = 0.0000625, which is less than 0.0005.

    However the book used c = -2 and x = -2.1 and got a different approximation.

    Can I really use x = +2.1 and c = +2 to get the same approximation? Or am I doing something wrong still?

    Btw, thanks for the help. I'm slowly understanding it
     
  11. Dec 8, 2012 #10

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    The sign should not change anything, so the error has to be somewhere else.
     
  12. Dec 8, 2012 #11

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    I don't know what you mean by the quantity, z . It doesn't appear to be mentioned anywhere else in this thread.


    Regarding the book's solution which apparently uses f(x) = 1/x , c = -2 , and x = -2.1 : that's also a reasonable approach, very similar to what you are doing.

    Both your approach and the approach in your book should give the same approximation and the same error.


    BTW, I still have not seen what you came up with for the Taylor Polynomial.
     
  13. Dec 8, 2012 #12
    The book I'm using uses z in the remainder function. As in there exists a number z between x and c. I know others use a as the variable or something else.

    The Taylor polynomial will be Psubn(x)= -1/2 + (.1)/4 - (.1)^2/(4)(2!) + 3(0.1)^3/(8)(3!) - 3(0.1)^4/(4)(4!) +...+f^(n)(2)(0.1)^n/n!

    That's what you mean, right? I'm not that good at remembering terminology so I hope that's what you mean by Taylor Polynomial
     
  14. Dec 8, 2012 #13

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    The definition of the Taylor polynomial has a factorial in the denominator which should cancel with the factorial in the derivative.
     
  15. Dec 8, 2012 #14
    Oh, I wrote the polynomial where I subbed in 2 for x in the function and it's derivatives.

    Psubn(x) = -1/x + (0.1)/x^2 - (2!)(0.1)^2/(x^4)(2!) + (3!)(0.1)^3/(x^4)(3!) - (4!)(0.1)^4/(x^5)(4!) + (n!)(x-c)^n/(x^(n+1))(n!).

    I can see the factorials cancelling out like you said.
     
  16. Dec 8, 2012 #15

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    That's not it either. Also I missed another error in your previous post.

    [itex]\displaystyle P_n(x)=-\frac{1}{2}+\frac{1}{4}(x-2)-\frac{2!}{8(2!)}(x-2)^2+\frac{3!}{16(3!)}(x-2)^3-\frac{4!}{32(4!)}(x-2)^4+\dots+(-1)^{n+1}\frac{n!}{2^n(n!)}(x-2) [/itex]

    Of course the factorials cancel.

    For your approximation to -1/(2.1), you want to look at Pn(2.1) with the proper choice of n to fulfill the requirement for accuracy.
     
  17. Dec 8, 2012 #16
    Ok, I see. In the other post where I tried to write the taylor polynomial, I was reducing the number instead of writing the factorial.

    Like for the 2nd derivative, I wrote f^2(2)= -1/4 instead of -(2)!/8. And instead of writing (x-2), I plugged in 2.1 for x and just wrote 0.1. Sorry about that. Writing these functions and numbers out makes it hard for me to see my errors. I'm not good at writing it out with the latex reference

    I do have the correct Taylor polynomial on my paper though. I just couldn't type it out properly.

    The only part I didn't have was this last part [(−1)^(n+1)n!(x−2)]/[(2^n)(n!)]
     
    Last edited: Dec 8, 2012
  18. Dec 8, 2012 #17
    Is that last part correct? The general term? I'm plugging in numbers for n starting from 0. Shouldn't it give me the terms from the beginning? And I think the (x-2) should have a n in the exponent, right? Shouldn't it be [(-1)^(n+1)(n!)(x-2)^n]/[(2^(n+1))(n!)]

    [itex]\displaystyle P_n(x)=-\frac{1}{2}+\frac{1}{4}(x-2)-\frac{2!}{8(2!)}(x-2)^2+\frac{3!}{16(3!)}(x-2)^3-\frac{4!}{32(4!)}(x-2)^4+\dots+(-1)^{n+1}\frac{n!}{2^{n+1}(n!)}(x-2)^n [/itex]
     
    Last edited: Dec 8, 2012
  19. Dec 9, 2012 #18

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Yes, that was a typo. The exponent on (x-2) should be should be n in that last term. The polynomial you have in the above 'QUOTE' is correct. The factorials in each term cancel.

    To find an approximation to -1/(2.1) evaluate Pn(2.1) . Of course each factor of (x-2) becomes (0.1) .
     
  20. Dec 9, 2012 #19
    Ah, okay I got it now. Thanks SammyS and mfb.

    Hurricane Sandy cancelled a few classes so we just barely caught up and didn't go too indepth with this Taylor Polynomial Approximation. But I think I got the gist of it now.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Taylor Polynomial of Smallest Degree to approximation
Loading...