Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*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 1999

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

Search the Archive

Re: Simple edit ...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19328] Re: [mg19319] Simple edit ...
  • From: BobHanlon at aol.com
  • Date: Mon, 16 Aug 1999 02:14:57 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Mike,

z = (a + Sqrt[d + e])/(a Sqrt[d + e]);

% // FullForm

Times[Times[1, Power[Sqrt[Plus[d, e]], -1], Plus[a, Sqrt[Plus[d, e]]]], 
  Power[a, -1]]

Note in the FullForm that both terms in the denominator are 
actually included in Times with a negative power. 
Consequently, your pattern only matches the square root in the 
numerator.  Use the following:

z /. (d + e)^n_ :> L^(2*n)

(a + L)/(a*L)

Bob Hanlon

In a message dated 8/15/99 4:19:17 AM, stokes at aris.net writes:

>Consider the following examaple;
>
>z = (a+Sqrt[d+e])/(a Sqrt[d+e])
>
>z //. Sqrt[d+e] ->L
>
>The replacement function only replaces the instance of Sqrt[d+e] in the
>numerator and leaves the instance in the denominator alone.  Why does
>this not work and what is the work around?
>


  • Prev by Date: vector derivation of quadratic forms
  • Next by Date: Re: Solve and Trig functions
  • Previous by thread: Re: Simple edit ...
  • Next by thread: Re: Simple edit ...