MathGroup Archive 2005

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

Search the Archive

Re: Re: Replacement equivalence?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63256] Re: [mg63239] Re: Replacement equivalence?
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Tue, 20 Dec 2005 23:35:40 -0500 (EST)
  • References: <do6892$b1t$1@smc.vnet.net> <200512200919.EAA28528@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David Bailey wrote:

>carlos at colorado.edu wrote:
>  
>
>>This is a spinoff of an ongoing thread in s.m.s.  Could the nonlinear
>>replacement
>>
>>                           b^2 -> 1
>>
>>be changed to the linear one
>>
>>                           b-> 1||-1
>>
>>Similarly
>>             x^4 -> 16     to    x ->  2||-2||2*I||-2*I
>>
>>Any possible side effects?
>>
>>    
>>
>Hello,
>
>Quite a few really, for example:
>
>b^2 /. b -> 1 || -1
>
>      (1 || -1)^2
>
>David Bailey
>http://www.dbaileyconsultancy.co.uk
>
>  
>
How about something like this

Cell[BoxData[
RowBox[{
RowBox[{"b", "^", "4"}], "/.",
RowBox[{"b", ":>",
RowBox[{"(",
RowBox[{"x", "=",
RowBox[{
RowBox[{"2", "\[Or]", "x"}], "=",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ", "\[Or]", "x"}], "=",
RowBox[{
RowBox[{
RowBox[{"2", "*", "I"}], "\[Or]", "x"}], "=",
RowBox[{
RowBox[{"-", "2"}], "*", "I"}]}]}]}]}],
")"}]}]}]], "Input",
CellAutoOverwrite->False]

Instead of the regular || is used esc||esc and that did the trick

Please refer to 1.10.4 of the mathematica book or just type 1.10.4 in 
the help browser



Hope this helps

Pratik

-- 
Pratik Desai 

...Moderation, as well as Regularity of Thinking, so much to be wished for in the Heads of those who imagine they come into the World only to watch and govern it?s Motion
Gulliver's Travels
by Jonathan Swift




  • Prev by Date: Re: Imposing boundary condition at infinity
  • Next by Date: Re: Speeding up simple Mathematica expressions?
  • Previous by thread: Re: Re: Replacement equivalence?
  • Next by thread: Re: Replacement equivalence?