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 Series

  1. Apr 23, 2009 #1
    1. The problem statement, all variables and given/known data


    Find the first four non-vanishing terms of the Taylor series for xcotx in the neighborhood of x = 0.


    2. Relevant equations



    3. The attempt at a solution

    LaTex isn't working for me so hopefully this doesn't look too messy.

    cotx = cosx/sinx. I know what the Taylor series is for cosx and sinx about x = 0.

    cosx = 1 - x^2/2! + x^4/4! + ..

    sinx = x - x^3/3! + x^5/5! +...

    so cotx = (1 - x^2/2! + x^4/4! + ..) / (x - x^3/3! + x^5/5! +...)

    and so xcotx = (x - x^3/2! + x^5/4! + ..) / (x - x^3/3! + x^5/5! +...)

    And so the first non-vanishing terms are:

    1: x / (x - x^3/3! + x^5/5! +...)

    2: -x^3/2! / (x - x^3/3! + x^5/5! +...)

    and so on?

    Is this right?
     
  2. jcsd
  3. Apr 23, 2009 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    No, those aren't 'terms', those are still quotients. First take your expansion for x*cot(x) and cancel an x in the numerator and the denominator. Now the denominator has the form 1-C, where C is an infinite series. Use 1/(1-C)=1+C+C^2+C^3+... To expand the infinite series, if you look at the form of your product it's a pretty good guess that the first four nonvanishing terms are going to be multiples of 1, x^2, x^4 and x^6. So you only need to keep terms of those powers.
     
  4. Apr 23, 2009 #3
    I cancelled out an x in the numerator with an x in the denominator and so now I have

    xcotx = (1 - x^2/2! + x^4/4! - x^6/6! + ...) / (1 - x^2/3! + x^4/5! - x^6/7! + ...)

    The infinite series in denominator resembles the infinite series 1 - x^2 + x^4 - x^6 + ... = 1/(1+x^2). I just can't figure out how to get rid of the coefficients 1/3!, 1/5! and so on
     
  5. Apr 23, 2009 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You don't get rid of them. You use them to calculate the first four terms. Just truncate the expansions until you've accounted for all the the terms with exponent less than or equal to six.
     
  6. Apr 23, 2009 #5
    Do you mean like this:

    So for example, since I have:

    xcotx = (1 - x^2/2! + x^4/4! - x^6/6! + ...) / (1 - x^2/3! + x^4/5! - x^6/7! + ...)

    Then the first term will be:

    1 / (1 - x^2/3! + x^4/5! - x^6/7! + ...)

    = (3!5!7!) / (3!5!7! - 5!7!x^2 + 3!7!x^4 - 3!5!x^6)

    When I do this with the other terms, they will all have a similar denominator which I can make into a single denominator and then just collect like terms in the numerator?
     
    Last edited: Apr 23, 2009
  7. Apr 23, 2009 #6
    Wait, that doesn't quite make sense to me.

    *sighs* I'm gonna catch some sleep then work on this again tomorrow. Take it easy
     
  8. Apr 24, 2009 #7

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Here's a simpler example. (1+x)/(1-x+x^2/2). That's (1+x)/(1-C), where C is x-x^2/2, right? 1/(1-C)=1+C+C^2+C^3+... (geometric series expansion). Suppose I want the first three terms, a+bx+cx^2+dx^3. I've got (1+x)*(1+(x-x^2/2)+(x-x^2/2)^2+(x-x^2/2)^3+.... Now you think, wait, I don't need the C^4 term or anything larger because they don't contribute to a, b, c, d. Then you think, in the C^3 part, the only term that counts is x^3. In C^2, I don't need the (x^2/2)^2 term. Just multiply it out being selective about what terms you keep.
     
  9. Apr 25, 2009 #8
    Ah, I get what you're saying now.

    So for this example, (1+x) / (1 - x + x^2/2) = (1+x)(1/(1-c) where c = x - x^2/2

    Now, 1/(1-c) = 1 + c^2 + c^3 + .... I will only take it up to c^3. So we have

    (1+x)(1 + c + c^2 + c^3) = 1 + c^2 + c^3 + x + xc + xc^2 + xc^3

    After expanding the c^2's and c^3's and collecting like terms only up to the third degree, I end up with

    1 + x + (3x^2)/2 + (x^3)/2

    Is this right?
     
  10. Apr 25, 2009 #9

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Right. Now can you pull the same trick with the original problem?
     
  11. Apr 25, 2009 #10
    So xcotx = (1 - x^2/2! + x^4/4!) / (1 - x^2/3! + x^4/5!) = (1 - x^2/2! + x^4/4!) (1/(1-c))

    Where c = x^2/3! - x^4/5!

    Now, 1/(1-c) = 1 + c + c^2 + ... I will only take it up to c^2 because I see that after c^3, the lowest exponent on the x's is greater than 6. So I have

    (1 - x^2/2! + x^4/4!)(1 + c + c^2)

    After multiplying out and collecting like terms up to the sixth degree, I end up with

    1 - (x^2)/3 - (x^4)/45 - (x^6)/180

    I think this is right because I plugged in 0.1 into xcotx, and into my above expression, and the answers were the same up until the fifth decimal place or something like that
     
  12. Apr 25, 2009 #11

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    They are ok up to the fifth place because the first problem is with your x^6. Firstly, there is ONE term from c^3 that can contribute. You may have also missed or added a thing or two wrong. But you've got the idea.
     
  13. Apr 25, 2009 #12
    Thanks for the help, this is a great technique :)
     
  14. Apr 25, 2009 #13
    Dick, I have a question.

    We used the expansion 1/(1-c) = 1 + c + c^2 + c^3 + ... but this expansion is only valid for |c| < 1, so say for example that c = x - (x^2)/2, then does that mean that the Taylor series is only a good approximation for x satisfying |x - (x^2)/2| < 1?
     
  15. Apr 25, 2009 #14

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    True. But what you are doing is expanding a taylor series around x=0. You don't have to worry about large values of x. The full taylor series may wind up converging even if |c|>1.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Taylor Series
  1. Taylor series (Replies: 3)

  2. Taylor series (Replies: 14)

  3. Taylor Series (Replies: 1)

  4. Taylor Series (Replies: 2)

  5. Taylor series (Replies: 15)

Loading...