MathGroup Archive 1995

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

Search the Archive

Simplifying vector expressions

  • To: mathgroup at
  • Subject: [mg2140] Simplifying vector expressions
  • From: shenkin at (Peter Shenkin)
  • Date: Wed, 4 Oct 1995 01:57:42 -0400
  • Organization: MacroModel Development Group, Chemistry, Columbia U., NY, NY

Consider the following vectors:

In[2]:= vec1 = { a, b, c }

Out[2]= {a, b, c}

In[3]:= vec2 = (1/x) * vec1

         a  b  c
Out[3]= {-, -, -}
         x  x  x

I am looking for a mechanism I can apply to vec2 to put it in the form:

	(-) { a, b, c }


	{ a, b, c }

This would be the list equivalent of Factor[], as shown by the 
following example:

In[4]:= expr = a/x + b/x + c/x

        a   b   c
Out[4]= - + - + -
        x   x   x

In[5]:= Factor[ expr ]

        a + b + c
Out[5]= ---------

Does this facility (for lists) exist in Mathematica, or in a package I 
can obtain easily?  If not, can you suggest guidelines for implementing
something like this?  Naturally, I'd want access to the full panoply
of algebraic functionality:  Simplify[], Expand[], etc., in addition
to Factor[].


******** When somebody says, "It's a matter of principle,"... ********
*Peter S. Shenkin, Box 768 Havemeyer Hall, Chemistry, Columbia Univ.,*
*NY, NY  10027;  shenkin at;  (212)854-5143;  FAX: 678-9039*
************'s a sure sign he wants the whole pie. *************

  • Prev by Date: Re: Converting table to a number?
  • Next by Date: RE:MmaToHTML_for_Macs
  • Previous by thread: Re: Converting table to a number?
  • Next by thread: Re: Simplifying vector expressions