On Thu, Jun 28, 2007 at 10:33:28AM -0700, Daniel Lakeland wrote:
> On Thu, Jun 28, 2007 at 10:11:49AM -0500, Thomas Widlar wrote:
> > Is there a function that will factor out a from an expression with
> > f(x) and g(x) arbitrary functions?
> >
> >
> > a*f(x) + a*b*g(x) --> a*( f(x) + b*g(x) )
>
> Try "factor"
also, "factorout" which I find a bit confusing...
Can anyone explain what factorout is intended to do? An example:
expr: a * (x^2-2*x) + a*b*log(x)/x;
factor(expr);
factorout(expr,x,log(x),b);
I would expect factorout to do something like "pull out these items"
perhaps we need a "pullout" function along the lines of a nicely
beefed up version of:
pullout(expr,var) := var * (multthru(1/var,expr));
--
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan