       Re: ComplexExpand in Mathematica 5.2 and 6

• To: mathgroup at smc.vnet.net
• Subject: [mg77988] Re: [mg77955] ComplexExpand in Mathematica 5.2 and 6
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Thu, 21 Jun 2007 05:34:42 -0400 (EDT)
• References: <200706200939.FAA10222@smc.vnet.net>

```On 20 Jun 2007, at 18:39, Jepessen wrote:

> Hi to all.
>
> I'm working with the new version of Mathematica, and I've noticed that
> ComplexExpand works in a different way.
>
> I've used this code, that allows me to find center and radius of a
> circle mappend by a bilinear transformation from plane X to plane Y
>
> -----------------------
>
> moebius = y == (a + b*x)/(c + d*x);
> cirX = Abs[x - cen] == rad;
> t1 = Solve[moebius, x][[1, 1]];
> cirY = cirX /. t1;
> t2 = Abs[Together[cirY[[1, 1]]]] == rad;
> t3 = Abs[a + b*cen - c*y - cen*d*y] == rad*Abs[-b + d*y];
> t4 = t3[]^2 - t3[]^2;
>
> (* Use of ComplexExpand *)
> t5 = ComplexExpand[t4 /. Abs[q_]^2 -> Re[q]^2 + Im[q]^2,{a, b, c, d,
> cen, y}] /. {Re[y] -> U, Im[y] -> V}
>
> ------------------------
>
> What I obtain is an expression stored in t5, with unknowns U and V,
> that are coordinates of the Y plane of the mapped circle. What I
> obtain is t5, that's the equation of this mapped circle.
>
> In Mathematica 5.2, I obtain a result that's is a conic expression, in
> U and V, and I can use Collect to extract coefficients of U, V, U^2
> and V^2.
>
> In Mathematica 6.0, instead, I obtain the same equation, but in a
> different form, that contains Re, Im and Abs function with aurgments
> with U and V variables; in this way, I can't use Collect to extract
> coefficient of the expression.
>
> I'd like to have the old behavior of ComplexExpand, because this
> allows me to extract coefficient. How can I obtain the same result
> with the 6.0 version?
>
>
> Daniele
>
>

Try:

Collect[ComplexExpand[t4 /. Abs[q_]^2 -> Re[q]^2 + Im[q]^2,
{a, b, c, d, cen, y}, TargetFunctions -> {Re, Im}] /.
{Re[y] -> U, Im[y] -> V}, {U, V}, Simplify]

or, if you do not ming waiting longer

Collect[ComplexExpand[t4 /. Abs[q_]^2 -> Re[q]^2 + Im[q]^2,
{a, b, c, d, cen, y}, TargetFunctions -> {Re, Im}] /.
{Re[y] -> U, Im[y] -> V}, {U, V}, FullSimplify]

will give you a much shorter answer.

```

• Prev by Date: Re: copying values of entries between matrices
• Next by Date: Re: What is the problem?
• Previous by thread: ComplexExpand in Mathematica 5.2 and 6
• Next by thread: Re: ComplexExpand in Mathematica 5.2 and 6