MathGroup Archive 2005

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

Search the Archive

Re: Common factors in a list


Hi John,
you could try to create a polynomial in a new variable, say z, from your 
vector by:
v={a x, a y, a z};
pol=Table[z^i,{i,Length[v]}] . v
now you could extract a common factor by:
com= FactorTerms[pol,z][[1]]
the residual vector you get from:
v/com

sincerely, Daniel

John Reed wrote:
> I'm working with a list (vector) that's composed of functions such as 
> complex exponentials and Bessel functions.  Some of the functions are common 
> to each element of the list.  I'm trying to find a way to do the following:
> 
>    {a x, a y, a z}-> a *{x, y, z}
> 
> In this expression, a, x, y, z are polynomials, exponentials and/or Bessel 
> functions.
> 
> So far I haven't had any luck with this.  Does anyone have a simple 
> solution?
> 
> John Reed 
> 


  • Prev by Date: Re: Common factors in a list
  • Next by Date: Re: A ToExpression question
  • Previous by thread: Re: Common factors in a list
  • Next by thread: Re: Common factors in a list