MathGroup Archive 2009

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

Search the Archive

Re: Replace not spotting a replacement

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103426] Re: Replace not spotting a replacement
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Mon, 21 Sep 2009 05:51:40 -0400 (EDT)

Hi, David,
try this:

In[12]:= Sqrt[2 \[Pi]] \[Tau]^(3/2) /. \[Tau] -> \[Mu]^2/2 Pi


Out[12]= 1/2 \[Pi]^2 (\[Mu]^2)^(3/2)

I do not understand the internal mechanism of it, but I observe that the rule holds:
in replacements one should resolve expression to be substituted with respect to one of the variables. 
In other words, if you need that in your expression expr=expr[x,y,z] a relation f[x,y,z]=0 holds, you should resolve
first the relation  f[x,y,z]=0 to get say, x=g[y,z], and then you may use the replacement expr[x,y,z]/.x->g[y,z].

Regards, Alexei 


Hi Folks,

Seems the replace function is being a bit dim here.  This fails:

Sqrt[2 \[Pi]] \[Tau]^(3/2) /. Sqrt[ 2 \[Pi] \[Tau]] -> \[Mu]

Apologies if this is an FAQ - I couldn't see anything about it.  What do I 
need to do here to coerce Mathematica into making this replacement? I tried using the 
Collect function on tau first, but that didn't seem to work.  I also tried 
re-writing the replacement rule as

Sqrt[2 \[Pi]] \[Tau]^(3/2) /. Sqrt[ 2 \[Pi] ] t^(1/2) -> \[Mu]

But still no joy.

Anyone know?

Many thanks,
David.

-- 
Alexei Boulbitch, Dr., habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.




  • Prev by Date: Re: Overlaying List...Plots with other Plots?
  • Next by Date: Re: Minimization Algebraically
  • Previous by thread: Re: Replace not spotting a replacement
  • Next by thread: Re: Replace not spotting a replacement