Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11194 > unrolled thread

Re: Ordering an algebraic expression in Mathematica

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-08-04 10:01 +0000
Last post2012-08-04 10:01 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Ordering an algebraic expression in Mathematica Bob Hanlon <hanlonr357@gmail.com> - 2012-08-04 10:01 +0000

#11194 — Re: Ordering an algebraic expression in Mathematica

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-08-04 10:01 +0000
SubjectRe: Ordering an algebraic expression in Mathematica
Message-ID<jvirt2$2sk$1@smc.vnet.net>
First, you must use the form b d or b*d rather than bd when multiplying factors.

expr = (a x + b) (c x + d) + b d x + x^3*a + c (x^2 + x^3);

Collect[expr, x]

b d + (b c + a d + b d) x + (c + a c) x^2 + (a + c) x^3

or if your output format ( Mathematica | Preferences | Evaluation |
Format type of new output cells: ) is not StandardForm

Collect[expr, x] // StandardForm

b d + (b c + a d + b d) x + (c + a c) x^2 + (a + c) x^3

Not literally what you asked for, but doing that would be
significantly more involved.


Bob Hanlon


On Fri, Aug 3, 2012 at 4:15 AM,  <mrafiee87@gmail.com> wrote:
> Hi to all,
>
> Would you please kindly let me know, how can one sort an algebraic expression in Mathematica?
> for example
> a, b, c, d are constants
> x is the parameter for ordering
>
> expression:
> (ax+b)(cx+d)+bdx+x^3*a+c(x^2+x^3)
>
> I wanna get the following results:
> bd +x(bd+ad+bc)+x^2(c)+x^3(a+c)
>
> Thank you very much
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web