MathGroup Archive 1999

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

Search the Archive

Re: Algebraic substitutions. HOW?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17935] Re: Algebraic substitutions. HOW?
  • From: "Atul Sharma" <mdsa at musica.mcgill.ca>
  • Date: Sat, 5 Jun 1999 02:56:05 -0400
  • References: <7i35a6$bfd@smc.vnet.net> <7i80pj$p9@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

A more general approach to the problem of algebraic substitution is
required, since controlling the level and extent of replacement can be
almost as tedious as doing it by hand (that's 'almost', so please don't
flame me :)

A very useful utility for anyone needing to do this kind of task on complex
expressions is provided by Salford consulting and involves being able to
limit replacement rules to specific sub-expressions easily, indicating the
restricted area by color coding it (i.e. apply the replacement rule to only
the 'red' expression). A handy palette accompanies this utility, and I for
one am delighted that the authors have made it available at their web site:

http://www.ftn95.com/mathematica/

A. Sharma MD

Peter Breitfeld wrote in message <7i80pj$p9 at smc.vnet.net>...
>Alessio Massaro <alessio at mail.cern.ch> schrieb:
>> Hi,
>>
>> say I have an expression like (a^2)/(b^2) and I want to change it by
>> introducing c:=a/b in order to obtain c^2.
>>
>> Euivalent exaple: h^3/t^2 -> (z:=h^2/t^2) -> z*h
>>
>> How do I get Mathematica to perform this kind of algebraic
>> substitutions (on complex formulas)?
>>
>
>Alessio,
>I think all you can do is something like this:
>
>In[1]:= a^2/b^2 /. a->c b
>Out[1]= c^2
>
>In[2]:= h^3/t^2 /. t->h/Sqrt[z]
>Out[2]= h z
>
>You can't do eg.
>a^2/b^2 /. a/b->z
>because the pattern a/b doesn't match anything in the FullForm of
>a^2/b^2, which is Times[Power[a,2],Power[b,-2]]
>
>Es gruesst  Peter
>--
>=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
>  Peter Breitfeld, Saulgau, Germany        PGP public key:  08548045
>




  • Prev by Date: Problem with CHasing[]
  • Next by Date: Re: Strain Ellipsoids
  • Previous by thread: Problem with CHasing[]
  • Next by thread: Re: Strain Ellipsoids