Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12221 > unrolled thread
| Started by | Dieter Ernst <didi.vela@gmail.com> |
|---|---|
| First post | 2012-11-02 04:45 +0000 |
| Last post | 2012-11-05 01:15 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
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
| From | Dieter Ernst <didi.vela@gmail.com> |
|---|---|
| Date | 2012-11-02 04:45 +0000 |
| Subject | Abs in the denominator |
| Message-ID | <k6vj61$6b4$1@smc.vnet.net> |
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)]]
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2012-11-05 01:15 +0000 |
| Message-ID | <k773ul$4h3$1@smc.vnet.net> |
| In reply to | #12221 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web