MathGroup Archive 1996

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

Search the Archive

Replacement


Hi,

I have something like 

x/Sqrt[a^2+b^2]+Sqrt[a^2+b^2]/y 

and I'd like to substitute Sqrt[a^2+b^2] by r.

x/Sqrt[a^2+b^2]+Sqrt[a^2+b^2]/y //. Sqrt[a^2+b^2]->r
gives:

      x         r
------------- + -
Sqrt[a^2+b^2]   y

(replace one only in the numerator)
How to replace Sqrt[a^2+b^2] by r everywhere in the expression?

Thanks.
				S.

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Compression Algorithm wanted
  • Next by Date: DInterpolatingFunction.m
  • Previous by thread: Re: Replacement
  • Next by thread: Re: Replacement