MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: ComplexExpand



Let me emend my last post.

Daniel Lichtblau wrote:
> 
> Jack Goldberg wrote:
> >
> > Hi Group;
> >
> > I have found ComplexExpand useful and sometimes necessary.
> > ...
> 
> There is an in-house suggestion that we implement CartesianForm and
> PolarForm functions. They would return ordered pairs of the form
> {re,im} (resp. {abs,arg}).
> 

I should elaborate on my statement. Though there is a suggestion that we
implement such functions, there are no plans to do so at this time. If
people think this would be useful then it would help to see examples of
how one might use them, what sorts of assumptions about variables one
might wish to allow in the function, and that sort of thing.


> > These functions have some amusing features.  Here is one trivial
> > example. When ComplexExpand is applied to (1+2I)*Exp[I*x]  we get the
> > mildly unsatisfactory
> >
> >         (1+2I)*Cos[x]-(2-I)*Sin[x]
> >
> > (I have been unable to use any form of Collect or Expand to separate the
> > real and imaginary parts.)  However,
> >
> > CartesianForm[(1+2I)*Exp[I*x]] -> Cos[x]-2Sin[x]+I(2Cos[x]+Sin[x])
> >
> > does the job nicely.
> ...
> I should note that ComplexExpand doing otherwise was probably a small
> bug. It works better in our development version.
> 
> In[13]:= ComplexExpand[(1+2I)*Exp[I*x]]
> Out[13]= (1 + I) Cos[x] - (2 - I) Sin[x]

Sorry, I was careless and printed from the wrong session.

In[27]:= ComplexExpand[(1+2I)*Exp[I*x]] Out[27]= Cos[x] - 2 Sin[x] + I
(2 Cos[x] + Sin[x])


> > ...
> > ComplexExpand[Cos[Arg[Cos[x]+I*Sin[x]]]] -> Cos[x]
> 
> This one is more difficult.
> 
> In[7]:=  ComplexExpand[Cos[Arg[Cos[x]+I*Sin[x]]],
>         TargetFunctions->{Re,Im}]
> Out[7]= Cos[ArcTan[Cos[x], Sin[x]]]
> 
> Possibly Simplify or FullSimplify should be made to convert this to x.
>

Actually it looks like we can make ComplexExpand a bit smarter about
this. Next version:

In[28]:= ComplexExpand[Cos[Arg[Cos[x]+I*Sin[x]]]] Out[28]= Cos[x]

> > ...

Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Matrix manipulation
  • Next by Date: Re: a^n*b^n ?? (a*b)^n
  • Prev by thread: Re: ComplexExpand
  • Next by thread: Re: ComplexExpand