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: [mg103582] Re: [mg103399] Replace not spotting a replacement
  • From: "David Carter-Hitchin" <david at carter-hitchin.clara.co.uk>
  • Date: Tue, 29 Sep 2009 07:37:41 -0400 (EDT)
  • References: <200909201021.GAA24204@smc.vnet.net> <20090920101230.QC4SM.18877.imail@eastrmwml39>

Hi Bob,

Thanks - I'll bear this approach in mind.  Use solve to simplify the 
rule first.

Thanks,
David.



> -----Original Message-----
> From: Bob Hanlon [mailto:hanlonr at cox.net]
> Sent: 20 September 2009 15:13
> To: mathgroup at smc.vnet.net; claranet news
> Subject: Re: [mg103399] Replace not spotting a replacement
>
>
> Make the LHS of a rule as simple as possible
>
> sub = Solve[Equal @@ (Sqrt[2*Pi*\[Tau]] -> \[Mu]), \[Tau]][[1]]
>
> {\[Tau] -> \[Mu]^2/(2*Pi)}
>
> Simplify[Sqrt[2*Pi]*\[Tau]^(3/2) /. sub,
>  Element[\[Mu], Reals]]
>
> Abs[\[Mu]]^3/(2*Pi)
>
> Simplify[Sqrt[2*Pi]*\[Tau]^(3/2) /. sub,
>  \[Mu] >= 0]
>
> \[Mu]^3/(2*Pi)
>
>
> Bob Hanlon
>
> ---- claranet news <david at carter-hitchin.clara.co.uk> wrote:
>
> =============
> 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.
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.111/2386 - Release Date:
> 09/21/09 05:51:00



  • Prev by Date: Re: Replace not spotting a replacement
  • Next by Date: Re: Replace not spotting a replacement
  • Previous by thread: Re: Replace not spotting a replacement
  • Next by thread: Re: Replace not spotting a replacement