Re: The formula of Abraham Moivre

*To*: mathgroup at smc.vnet.net*Subject*: [mg106819] Re: [mg106792] The formula of Abraham Moivre*From*: Leonid Shifrin <lshifr at gmail.com>*Date*: Sun, 24 Jan 2010 05:41:14 -0500 (EST)*References*: <201001231236.HAA16448@smc.vnet.net>

Here is a 2-step process which does it: In[1]:= Clear[n, x, step1, step2]; In[2]:= step1 = FullSimplify[ComplexExpand[(Cos[x] + I*Sin[x])^n], Assumptions -> {Element[n, Integers], Element[x, Reals]}] Out[2]= Cos[n Arg[E^(I x)]] + Sinh[n Log[E^(I x)]] In[3]:= step2 = step1 /. {Arg[Exp[I*x_]] :> x, Log[Exp[I*x_]] :> I*x } Out[3]= Cos[n x] + I Sin[n x] The second step is manual and is correct under an assumption that -Pi<x<=Pi, which we can safely take given that the original function is periodic. Perhaps there are shorter and completely automatic ways based only on built-in rules but I did not find them. Regards, Leonid On Sat, Jan 23, 2010 at 4:36 AM, Arnold <sender999ster at gmail.com> wrote: > How by means of Mathematica to transform (Cos [x] +I* Sin [x]) ^n in Cos > [n*x] +I*Sin [n*x]? > > Thanks. > >

**References**:**The formula of Abraham Moivre***From:*Arnold <sender999ster@gmail.com>