In Maple, how can I partially factor an expression?
To partially factor an expression in Maple, consider the following example. Suppose you want to change the first line below to the second:
a b + a c + b c a (b + c) + b cThe following simple procedure will work for many examples:
> pullout := proc(f,e) local f0; f0:= subs(e=0,f); normal(f0) + e * normal((f - f0)/e); end:You can then use this newly defined procedure as follows:
> pullout(a*b + a*c + b*c,a); b c + a (b + c)However, the above won't get the b + c partial factorization.
Above, replacing subs in algsubs in the
definition of pullout results in a procedure that will
rewrite some additional expressions. However, sometimes this may
yield undesirable results by "trying too hard", for instance:
This information is derived with permission from a Usenet
news message posted by Robert Israel in the newsgroup
sci.math.symbolic.
For more about Maple, see Maple at IU.
For more about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.
Last modified on April 20, 2011.







