MathGroup Archive 2010

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

Search the Archive

Re: More about algebraic simplification

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110535] Re: More about algebraic simplification
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Thu, 24 Jun 2010 04:26:44 -0400 (EDT)
  • References: <hvmvpp$ps2$1@smc.vnet.net>

On 21/06/10 07:11, S. B. Gray wrote:
> variables describing the plane and circle. Next, I want to find the line
It always helps to post some code.

However, when you say you define some new variables, I am guessing that 
you wrote an actual assignment:

xn= a x + b y + c z;

(say)

This is not usually the best way to do algebraic manipulations, because 
after such an assignment, whenever you write (or otherwise create) an 
expression involving xn, it will evaluate to an expression involving x,y,z.

Don't make such an assignment, but change variables using a replacement 
rule. Thus to revert to {x,y,z}, do :

expr /.{xn->a x+b y+c z,yn-> ...... }

Notice that if you use Solve to get the Xn in terms of the {x,y,z}, the 
answer comes back as rules - ready made for a replacement!

You should only use an assignment when you really want Mathematica to 
use that assignment to eliminate the variable whenever it can - which 
isn't that often when doing algebra, as opposed to more general 
programming.

David Bailey

http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Export 3D graphics to Web page (a la LiveGraphics3D)
  • Next by Date: precedence for ReplaceAll?
  • Previous by thread: More about algebraic simplification
  • Next by thread: SFTP