Re: Replacement?
- To: MATHGROUP at yoda.physics.unc.edu
- Subject: Re: Replacement?
- From: GER.XSE0027 at applelink.apple.com (Germany - RL Jakschewitz,Nrnbrg,IDV)
- Date: 26 Apr 93 22:20 GMT
in message <9304260436.AA28649 at yoda.physics.unc.edu> francis at osiris.ucsd.edu
writes
> I simply want Mma to replace N q with Q everywhere mathematically
> possible, so that N^2 q^2 would be replaced by Q^2,
> N^3 q^2 by N Q^2 and so on.
Handing on Arthur L. Rubin's (a_rubin at dsg4.dse.beckman.com) answer to an
analogous
question posted on news.sci.math.symbolic a couple of weeks ago:
alr: In general, you might try using the AlgebraicRules reductions, remembering
alr: to include all variables in the reduction;
alr:
alr: R = AlgebraicRules[N q == Q,{N, q,...}]
thus:
In[1]:= N^2 q^2 /. R
Out[1]= Q^2
In[2]:= N^5 q^3 /. R
Out[2]= N^2 Q^3
Roland Jakschewitz
------------------------------------------------------------------------
RL Jakschewitz
Geuderstr. 7 AppleLink: GER.XSE0027
D-8500 NUERNBERG 20 Tel: +49 - 911 - 26 13 13
Germany UUCP: rlj-nbg at infohh.rmi.de
------------------------------------------------------------------------