Re: Slow ReIm

• Subject: [mg3405] Re: Slow ReIm
• From: danl (Daniel Lichtblau)
• Date: 4 Mar 1996 10:03:45 -0600
• Approved: usenet@wri.com
• Distribution: local
• Newsgroups: wri.mathgroup
• Organization: Wolfram Research, Inc.
• Sender: daemon at wri.com

```In article <4h13tr\$rr4 at dragonfly.wolfram.com> Donald Darling
<ddarling at math.uci.edu> writes:
> Can someone tell me why, after I load the package ReIm and declare the
> variables z and u real, it takes over 15 minutes to evaluate
> Re[(1- I u z)/(1-2 I u z - z^2)] ?
>
> Thanks ...  Don Darling.
>

Cannot answer this one directly. But I note that you can get much faster
results with:

In[3]:= ComplexExpand[Re[(1- I u z)/(1-2 I u z - z^2)], z] // InputForm
Out[3]//InputForm=
((1 + u*Im[z])*(1 + 2*u*Im[z] + Im[z]^2 - Re[z]^2))/
Abs[1 - 2*I*u*z - z^2]^2

or, if you do not want to see Abs/Arg,

In[4]:= ComplexExpand[Re[(1- I u z)/(1-2 I u z - z^2)], z,
TargetFunctions->{Re, Im}] // InputForm
Out[4]//InputForm=
((-2*u*Re[z] - 2*Im[z]*Re[z])^2 + (1 + 2*u*Im[z] + Im[z]^2 -
Re[z]^2)^2) \
+ ((1 + u*Im[z])*(1 + 2*u*Im[z] + Im[z]^2 - Re[z]^2))/
((-2*u*Re[z] - 2*Im[z]*Re[z])^2 + (1 + 2*u*Im[z] + Im[z]^2 -
Re[z]^2)^2)

Daniel Lichtblau
Wolfram Research, Inc
danl at wolfram.com

```

• Prev by Date: Re: Slow ReIm
• Next by Date: substitution rules and patterns
• Previous by thread: Re: Slow ReIm
• Next by thread: Re: Slow ReIm