MathGroup Archive 2008

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

Search the Archive

Re: Why isn't Expand[] grouping terms by order?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87862] Re: Why isn't Expand[] grouping terms by order?
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Sat, 19 Apr 2008 03:31:35 -0400 (EDT)
  • References: <fu9fq7$cbn$1@smc.vnet.net>

<p at dirac.org> schrieb:
> Consider this:
>
>    In[19]:= Expand[ (1+a*x)*(1+b*x), x]
>
>                                  2
>    Out[19]= 1 + a x + b x + a b x
>
>
> How can I coax Mathematica to give me this, instead:
>
>                                  2
>    Want[19]= 1 + (a + b) x + a b x
>
> Why isn't Mathematica reporting the answer in terms of powers of x?
>
> Thanks!
>

expr = (1 + a x) (1 + b x)

Collect[expr,x]

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: axis alignment of 3D plots with ListContourPlot3D
  • Next by Date: Re: Defining derivatives
  • Previous by thread: Re: Why isn't Expand[] grouping terms by order?
  • Next by thread: Re: Why isn't Expand[] grouping terms by order?