Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12251
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Abs in the denominator |
| Date | 2012-11-05 01:15 +0000 |
| Message-ID | <k773ul$4h3$1@smc.vnet.net> (permalink) |
| References | <k6vj61$6b4$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On 02/11/2012 04:45, Dieter Ernst wrote: > Hello > > I have an expression with Abs applied to the entire denominator: > > 0.5/Abs[(C * R * omega)/(-1 + C * L * omega^2)] > > (Just as an example, the function in Abs could also be another one). How can I transform it to an expression with Abs wrapping the entire Fraction, such as: > Abs[0.5/((C * R * omega)/(-1 + C * L * omega^2))] > > ... and then to: > Abs[(0.5 * (-1 + C * L * omega^2) / (C * R * omega)]] > You can always transform an expression using a transformation, but the onus is then on you to ensure that the transformation is sound: expr= 0.5/Abs[(C * R * omega)/(-1 + C * L * omega^2)] expr/. (num_/;num>0)/Abs[x_] -> Abs[num/x] However, it would seem that Mathematica automatically extracts the factor of 0.5 from Abs. You can only avoid this by using HoldForm to protect the structure of the expression: expr/. (num_/;num>0)/Abs[x_] :> Abs[HoldForm[num]/x] However, beware, this expression is for display only - the HoldForm embedded in the result prevents it being used directly in further calculations. David Bailey http://www.dbaileyconsultancy.co.uk
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Abs in the denominator Dieter Ernst <didi.vela@gmail.com> - 2012-11-02 04:45 +0000 Re: Abs in the denominator David Bailey <dave@removedbailey.co.uk> - 2012-11-05 01:15 +0000
csiph-web