Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

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

Search the Archive

Re: Straightforward factoring and simplification

  • To: mathgroup at
  • Subject: [mg111770] Re: Straightforward factoring and simplification
  • From: AES <siegman at>
  • Date: Fri, 13 Aug 2010 06:52:57 -0400 (EDT)

Some time back there was a post in this group about how to convert the 

(Eq_1)   a*b + a*c - 2*a*d + b*c - 2*b*d - 2*c*d + 3*d^2 


(Eq_2)   (a-d)*(b-d) + (a-d)*(c-d) + (b-d)*(c-d) 

to which I made an absurd response.  My meds are working better now, so 
I hope the following will make sense.

Although I'm not attempting to answer the original question, I did want 
to understand better the symmetry of these expressions.  So, suppose we 
scale a, b and c to d, and rename them as x, y, z.  The expression then 
obviously has a zero at x=y=z=1, so shift the origin of coordinates to 
that point (suffix 's') and get


    xs ys+xs zs+ys zs

This has an obvious axis of symmetry, so rotate the axes into alignment 
with it (suffix 'r') and get

   {xs,ys,zs}=RotationMatrix[{{0,0,1},{1,1,1}}] .{xr,yr,zr};

   -xr^2/2 - yr^2/2 + zr^2

Note sure what a geometer would call that, but it's obviously a figure 
of rotation about an axis (ellipsoid of rotation about an imaginary 
axis?).  Confirm this by making a couple of plots:

fs=x y +x z+y z;
fr=z^2 - 0.5(x^2+y^2);

or by mapping f onto the surface or spheres of varying diameter:

x=a Sin[theta]Sin[phi];y=a Sin[theta]Cos[phi];z=a Cos[theta];
Show[Graphics[SphericalPlot3D[a+ b f,theta,phi]]],

[and in the process learn that Mathematica allows spheres to have 
negative radii.]

Follow-up question:  Suppose you want to plot a unit sphere with 
SphericalPlot3D in which different areas or patches on the surface have 
different colors. depending on the theta, phi (or x,y,z) values.  Or, a 
SphericalPlot3D[r[theta,phi], theta, phi] for which positive values of r 
give a red surface and negative values a blue surface.  How might one do 
that in some simple way?

  • Prev by Date: Re: A new graphic user interface
  • Next by Date: Re: Problem with renaming Mathematica path on Mac OS X
  • Previous by thread: Re: Can I set Page Setup scale for a notebook programmatically?
  • Next by thread: Re: Straightforward factoring and simplification