1. R
    Standard memberRemoved
    Joined
    10 Dec '06
    Moves
    8528
    22 Apr '09 02:10
    while trying to derive the Taylor series for f(x) = cos(x)

    you get coefficients that alternate signs as follows

    +,-,-,+,+,-,-,+,+....

    which is achieved by

    (-1)^(n(n+1)/2)

    so what Im asking is what is the therory for why this happens

    Im thinking that this is a number theory problem?
  2. Joined
    11 Nov '05
    Moves
    43938
    22 Apr '09 09:201 edit
    Originally posted by joe shmo
    while trying to derive the Taylor series for f(x) = cos(x)

    you get coefficients that alternate signs as follows

    +,-,-,+,+,-,-,+,+....

    which is achieved by

    (-1)^(n(n+1)/2)

    so what Im asking is what is the therory for why this happens

    Im thinking that this is a number theory problem?
    A short hint is the following:

    d(cos) = -sin,
    d(-sin) = -cos,
    d(-cos = sin,
    d(sin) = cos, and we are back again.

    If you look at the definition of Taylor series, then this makes sense.
  3. R
    Standard memberRemoved
    Joined
    10 Dec '06
    Moves
    8528
    22 Apr '09 13:121 edit
    Originally posted by FabianFnas
    A short hint is the following:

    d(cos) = -sin,
    d(-sin) = -cos,
    d(-cos = sin,
    d(sin) = cos, and we are back again.

    If you look at the definition of Taylor series, then this makes sense.
    Im not sure how this helps, I know how to do the Taylor series

    ill rephrase this

    what i dont understand is why

    the sequence

    n(n+1)/2 ( which is used as the exponent on (-1) in the Taylor series)

    yeilds pairs of odds and even numbers.

    Ive noticed that if you write out the first 7 terms in the sequence without dividing them by 2 (i.e. just using n(n+1) ) and factoring them into thier prime factorization, of these, the ones that yeild odd terms have only one factor of 2. What is left will be some form of odd by odd multiplication, which yields odd.

    not sure if this is the must eloquent way, to analyze it, but i think it works....
    😕
  4. Joined
    21 Sep '05
    Moves
    75006
    22 Apr '09 13:29
    Originally posted by joe shmo
    what I don't understand is why the sequence
    n(n+1)/2 ( which is used as the exponent on (-1) in the Taylor series)
    yields pairs of odds and even numbers.
    First, notice that because n is an integer, exactly one of n and (n+1) will be even and the other will be odd.

    To get an answer to n(n+1)/2 that is _odd_ then we need either n or (n+1) to be a multiple of 2 that is _not_ a multiple of 4.

    To get an answer to n(n+1)/2 that is _even_ then we need either n or (n+1) to be a multiple of 2 that _is_ a multiple of 4.

    The crucial thing is whether the even number that is either n or (n+1) is a multiple of 4 or not. Whichever of these is (n+1) will, when n is incremented by 1, become n the next time.

    Does this help?
  5. Joined
    11 Nov '05
    Moves
    43938
    22 Apr '09 13:32
    Originally posted by joe shmo
    Im not sure how this helps, I know how to do the Taylor series

    ill rephrase this

    what i dont understand is why

    the sequece

    n(n+1)/2 ( which is used as the exponent on (-1) in the Taylor series)

    yeilds pairs of odds and even numbers.
    All series don't give alternate pairs of +'s and -'s.
    Try exp(x), tan(x), arcsin(x) and some hyperbolical functions.
    There is no law for alternating signs.

    Try to use the definition of Taylor, and find the series of some functions yourself, then the why's perhaps turn into aha's.
  6. R
    Standard memberRemoved
    Joined
    10 Dec '06
    Moves
    8528
    22 Apr '09 13:47
    I added an edit, I think you will understand what I'm trying to figure out after the added information
  7. R
    Standard memberRemoved
    Joined
    10 Dec '06
    Moves
    8528
    22 Apr '09 13:49
    Originally posted by Diapason
    First, notice that because n is an integer, exactly one of n and (n+1) will be even and the other will be odd.

    To get an answer to n(n+1)/2 that is _odd_ then we need either n or (n+1) to be a multiple of 2 that is _not_ a multiple of 4.

    To get an answer to n(n+1)/2 that is _even_ then we need either n or (n+1) to be a multiple of 2 that _is_ a mult ...[text shortened]... of these is (n+1) will, when n is incremented by 1, become n the next time.

    Does this help?
    I think this is along the lines of what I was looking for, I will give your answer more thought later and let you know if it makes sence to me...
  8. Joined
    02 Mar '06
    Moves
    17881
    22 Apr '09 17:282 edits
    Originally posted by Diapason
    First, notice that because n is an integer, exactly one of n and (n+1) will be even and the other will be odd.

    To get an answer to n(n+1)/2 that is _odd_ then we need either n or (n+1) to be a multiple of 2 that is _not_ a multiple of 4.

    To get an answer to n(n+1)/2 that is _even_ then we need either n or (n+1) to be a multiple of 2 that _is_ a mult ...[text shortened]... of these is (n+1) will, when n is incremented by 1, become n the next time.

    Does this help?
    more to the point, n(n+1)/2 is a well known representation for "the sum of the first n integers." i.e., 1+2+3+...+n = n(n+1)/2. these numbers expressible as n(n+1)/2 are called "triangular numbers" and have been well loved since ancient greece.

    the pattern is a recursive one: to get from any one triangular number to the next, you add the next largest number. and the first number, 1, is odd. now to find the next triangular numbers we alternate adding even and odd numbers (because the counting numbers themselves alternate even and odd): the first term is [1] then [(1)+2] then [(1+2)+3] then [(1+2+3)+4], etc.

    but if the first term (i'll label it T1) is odd, then T2 = T1 + 2 = odd + even = odd. then T3 = T2 + 3 = odd + odd = even. and T4 = T3 + 4 = even + even = even. and lastly after: T5 = T4 + 5 = even + odd = odd, the pattern repeats itself.

    note that this is an interesting fact, and is the reason the sequence [1,3,6,10,15,21,...] alternates odd-odd-even-even, but the other posters were in the right about cosine's taylor expansion having more to do with the alternating sequence of derivatives in which sine/cosine are wrapped up. hope this helped!

    EDIT: i just reread your original post, and see that actually your question came from the interesting pattern you saw in a taylor expansion, but was not a taylor expansion question! so i think this response might be exactly what you were looking for, and yes this is a number theory problem. it can be answered by this method i showed, or a similar one in modular arithmetic. p.s. if you need to see the proof that n(n+1)/2 = 1+2+3+...+n let me know! there are a number of nice methods to show this is true.
  9. R
    Standard memberRemoved
    Joined
    10 Dec '06
    Moves
    8528
    22 Apr '09 18:55
    Originally posted by Aetherael
    more to the point, n(n+1)/2 is a well known representation for "the sum of the first n integers." i.e., 1+2+3+...+n = n(n+1)/2. these numbers expressible as n(n+1)/2 are called "triangular numbers" and have been well loved since ancient greece.

    the pattern is a recursive one: to get from any one triangular number to the next, you add the next largest ...[text shortened]... 1)/2 = 1+2+3+...+n let me know! there are a number of nice methods to show this is true.
    good, you hit the nail on the head

    While I was deriving the taylor series for cos(x) centered at Pi/4 that peculiar pattern for the signs of the coefficients arose. The pattern is of no consequence when it is a maclaurin series ( it becomes regular alternating). So figuring out how to create successive pairs of odd and even whole numbers was the problem...of course, I cheated and looked up the answer, but not knowing how to arrive there from scratch really bugs me...lol

    So I will try to come to grips with the theory you've presented to me, and hopfully make it meaningful.

    come to think of it, I know i've messed with the "sum of the first n integers formula" before, but i didn't recognize it...

    P.S. Do you think that my analysis in the second post would have gotten me anywhere?
  10. Joined
    02 Mar '06
    Moves
    17881
    22 Apr '09 23:19
    Originally posted by joe shmo
    good, you hit the nail on the head

    While I was deriving the taylor series for cos(x) centered at Pi/4 that peculiar pattern for the signs of the coefficients arose. The pattern is of no consequence when it is a maclaurin series ( it becomes regular alternating). So figuring out how to create successive pairs of odd and even whole numbers was the proble ...[text shortened]... ...

    P.S. Do you think that my analysis in the second post would have gotten me anywhere?
    yes definitely - it's similar to the poster who mentioned you are looking for a n or n+1 to be a multiple of 2 that is not a multiple of 4... etc.

    the numbers you are talking about: n(n+1) numbers are called oblongs and are interesting in their own right too, though clearly related to triangular numbers. what you were saying is essentially if n(n+1) can be factored as 2*(odd)(odd) then the triangular number [n(n+1)/2] is odd. but that is essentially the same as making one of them a multiple of 2 but not 4 (i.e. reassociate without loss of generality that n(n+1) = [2*odd][odd]).

    you'll see the pattern of when this happens directly if you write out the first bunch of cases:
    (1*2)=yes (2*3)=yes (3*4)=no (4*5)=no (5*6)=yes (6*7)=yes (7*8)=no ... etc. this pattern arises clearly. however, i personally think the "sum" argument i showed in a previous post delineates the "reason" behind why it happens better than this factoring method. but both get at the right answer equally well from different directions!

    hope this helps, cheers.
Back to Top

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.I Agree