Re: Why isn't Expand grouping terms by order?
- To: mathgroup at smc.vnet.net
- Subject: [mg87859] Re: Why isn't Expand grouping terms by order?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 18 Apr 2008 07:13:01 -0400 (EDT)
- Organization: Uni Leipzig
- References: <firstname.lastname@example.org>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, because it doen not know that you look for orders of x and not of a or b .. and Collect[Expand[(1 + a*x)*(1 + b*x), x], x] will do what you want. Regards Jens p at dirac.org wrote: > Consider this: > > In:= Expand[ (1+a*x)*(1+b*x), x] > > 2 > Out= 1 + a x + b x + a b x > > > How can I coax Mathematica to give me this, instead: > > 2 > Want= 1 + (a + b) x + a b x > > Why isn't Mathematica reporting the answer in terms of powers of x? > > Thanks! >