Sum of cosines

Discussion in 'Maple' started by I.N. Galidakis, Jan 28, 2010.

  1. I have a sum of cosines with different arguments and I need to combine them so I
    can estimate the period. Can this be done with Maple 9?

    I think this question has been asked before, but I cannot find it in Google.

    For example, can I combine the following into the form cos(A+B+C+...+W)?


    I.N. Galidakis, Jan 28, 2010
    1. Advertisements

  2. I.N. Galidakis

    Archimedes Guest

    This "works" in Maple 9.5, but if you increase Digits to a higher
    value, it does not work(not a simpler version than what you started
    with). Check the accuracy to make sure it is acceptable for your
    needs. For values of `t` greater than what I plotted, you can not see
    the difference.
    This yields: cos(.3141592654e16*t)+6.
    Archimedes, Jan 29, 2010
    1. Advertisements

  3. Thanks. It works on Maple 9 :)
    I.N. Galidakis, Jan 29, 2010
  4. I assume these frequencies are not supposed to be exact, but rather are
    approximations to rational multiples of Pi. That makes a big difference.

    Interestingly, identify can handle all the frequencies except one that is
    most obvious to the eye:


    So it looks like the periods of the different cosine terms are
    33/50, 50/33, 1/3, 3, 1/500000000000000, 1/75 and 1/50. Put over
    a common denominator 16500000000000000, the numerators are
    10890000000000000, 25000000000000000, 5500000000000000, 49500000000000000,
    33, 220000000000000, 330000000000000
    which have least common multiple 27225000000000000000.
    Thus the minimal period is 27225000000000000000/16500000000000000
    = 1650.
    Robert Israel, Jan 29, 2010
  5. Yes, that's what they are. Or rather, what they were, when I was trying to
    figure out a minimum period of the phasor:


    Unfortunately, it seems that any oscillator vibrating at N_j, vibrates also at
    all the harmonics, so the phasor is really:


    (which is, I think, 7 separate Fourier series added together)

    Please see my reply to Arturo on sci.math.

    I.N. Galidakis, Jan 29, 2010
  6. Robert,

    It doesn't look like it's working. I get with Maple 9:
    with N[j] loaded with the aforementioned values:


    and then:


    3.438304986+1.671248677*I, 2.223885744+2.474913511*I

    What am I doing wrong?
    I.N. Galidakis, Jan 30, 2010
  7. I.N. Galidakis

    Axel Vogt Guest

    Just tested with Maple 9.52 and it works (even if using
    only Digits=10). Have you tried after a restart?
    Axel Vogt, Jan 30, 2010
  8. Looks like it's an accuracy issue. I increased Digits:=50 and it works. For some
    reason it doesn't work with the default number of digits.

    I.N. Galidakis, Jan 30, 2010
  9. I.N. Galidakis

    Axel Vogt Guest

    May the versions work a bit different. Might it be that later versions
    for evalf( f(t) ) try a simplification first and take floats later?

    If you use 2/10 instead of 0.2 then you should see, that both terms
    are equal.
    Axel Vogt, Jan 30, 2010
  10. Yes, it does! The problem seems to be that I had on my worksheet:

    N[1]:=1/0.66;, instead of N[1]:=100/66;

    and this affects N[2] as well. Then the arguments in the phasor are a bunch of
    floats. If I use fractions instead, Maple puts fractions on the phasor and then
    it works, if I also have 2/10 for 0.2.

    The world of floating point is strange indeed! Try it with N[1]:=1/0.66,
    N[2]:=1/N[1] and see what you get on


    Thanks Alex,
    I.N. Galidakis, Jan 30, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.