sin, cos into exponentials



>>>>> "Albert" == Albert Reiner <areiner@tph.tuwien.ac.at> writes:

    Albert> Hi,
    Albert> I am new to maxima, and despite spending quite some time with the
    Albert> reference manual I do not see how to replace any occurrence of sine
    Albert> and cosine by the corresponding exponentials; e.g., 3 sin(a) + cos(b)
    Albert> should be turned into a sum of exp(%i*a), exp(-%i*a), exp(%i*b), and
    Albert> exp(-%i*b).

(C1) exponentialize(3*sin(a)+cos(b));

                   %I b     - %I b           %I a     - %I a
                 %E     + %E         3 %I (%E     - %E      )
(D1)             ----------------- - ------------------------
                         2                      2


Ray