MathGroup Archive 1998

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

Search the Archive

Re: Abs and derivative problems


sylvan wrote:
> 
> I could not calculate the modulus of  a complex expression containing
> imaginary parts in both denominator and numerator with Mathematica. An
> Example:
> 
> (a + I b) / (c + I d)
> 
> a,b,c,d (real) symbolic variables.
> 
> In pratice, this should be absolutely trivial. ComplexExpand is not
> effective.
> How do you "tell" mathematica that your variables are real ??
> ...

In[19]:= ComplexExpand[Abs[(a + I b) / (c + I d)],
TargetFunctions->{Re,Im}] // InputForm

Out[19]//InputForm= Sqrt[a^2 + b^2]/Sqrt[c^2 + d^2]

The TargetFunction option is needed to tell ComplexExpand not to use Abs
(or any of Arg, Sign, or Conjugate, for that matter). Otherwise it will
simply return a result that is correct but in terms of Abs, which,
presumably, you do not want.


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: I have A Problem
  • Next by Date: Re: Limits pre- & post-Solve[]
  • Previous by thread: Abs and derivative problems
  • Next by thread: Re: Abs and derivative problems