Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Abs and derivative problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14650] Re: [mg14639] Abs and derivative problems
  • From: Daniel Lichtblau <danl>
  • Date: Sat, 7 Nov 1998 02:10:00 -0500
  • References: <199811041847.NAA19370@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

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