MathGroup Archive 2007

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

Search the Archive

Re: ComplexExpand in Mathematica 5.2 and 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78001] Re: [mg77955] ComplexExpand in Mathematica 5.2 and 6
  • From: Carl Woll <carlw at wolfram.com>
  • Date: Thu, 21 Jun 2007 05:41:22 -0400 (EDT)
  • References: <200706200939.FAA10222@smc.vnet.net>

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[[1]]^2 - t3[[2]]^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?
>
>Thanks for answers
>
>Daniele
>
>  
>
What about using

ComplexExpand[t4, {a, b, c, d, cen, y},
  TargetFunctions -> {Re, Im}] /. {Re[y] -> U, Im[y] -> V}

instead of your version of ComplexExpand?

Carl Woll
Wolfram Research


  • Prev by Date: Re: RE: Re: Re: 6.0 Get Graphics Coordinates...
  • Next by Date: Re: Re: Fast interactive graphics
  • Previous by thread: Re: ComplexExpand in Mathematica 5.2 and 6
  • Next by thread: Re: ComplexExpand in Mathematica 5.2 and 6