MathGroup Archive 2005

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

Search the Archive

Re: Re: Replacement equivalence?


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?