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


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

algebraic simplification

Started byBruno Panetta <bpanetta@gmail.com>
First post2011-09-28 06:47 +0000
Last post2011-09-29 06:15 +0000
Articles 4 — 3 participants

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


Contents

  algebraic simplification Bruno Panetta <bpanetta@gmail.com> - 2011-09-28 06:47 +0000
    Re: algebraic simplification "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-29 06:06 +0000
    Re: algebraic simplification Peter Pein <petsie@dordos.net> - 2011-09-29 06:08 +0000
    Re: algebraic simplification "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-29 06:15 +0000

#5260 — algebraic simplification

FromBruno Panetta <bpanetta@gmail.com>
Date2011-09-28 06:47 +0000
Subjectalgebraic simplification
Message-ID<j5uftg$7on$1@smc.vnet.net>
I have an expression like the following

a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c

(only much more complicated). I want to simplify it so that it becomes
something like

a * (x^4 + x^3) + b * (x^2 + x) + c * (y^3 + 1)

How can I do it in Mathematica?

[toc] | [next] | [standalone]


#5270

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-09-29 06:06 +0000
Message-ID<j611tv$m0p$1@smc.vnet.net>
In reply to#5260
On Wed, 28 Sep 2011 12:12:46 +0100, Oleksandr Rasputinov  
<oleksandr_rasputinov@hmamail.com> wrote:

> coeffs = Union@
>          Flatten@
>          CoefficientList[poly, {x, y}] /. 0 -> Sequence[]

Actually, this may give incorrect results for other polynomials. Better to  
use:

coeffs = Cases[
   Union@Flatten[CoefficientList[poly, {x, y}], 1],
   Except[0], {1}
   ]

[toc] | [prev] | [next] | [standalone]


#5273

FromPeter Pein <petsie@dordos.net>
Date2011-09-29 06:08 +0000
Message-ID<j6120r$m23$1@smc.vnet.net>
In reply to#5260
Am 28.09.2011 08:47, schrieb Bruno Panetta:
> I have an expression like the following
> 
> a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c
> 
> (only much more complicated). I want to simplify it so that it becomes
> something like
> 
> a * (x^4 + x^3) + b * (x^2 + x) + c * (y^3 + 1)
> 
> How can I do it in Mathematica?
> 
Try these:

Collect[a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c, a | b | c]

% // TraditionalForm

Collect[a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c, a | b | c, Factor] //
TraditionalForm

[toc] | [prev] | [next] | [standalone]


#5288

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-09-29 06:15 +0000
Message-ID<j612e7$m6b$1@smc.vnet.net>
In reply to#5260
On Wed, 28 Sep 2011 07:47:12 +0100, Bruno Panetta <bpanetta@gmail.com>  
wrote:

> I have an expression like the following
>
> a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c
>
> (only much more complicated). I want to simplify it so that it becomes
> something like
>
> a * (x^4 + x^3) + b * (x^2 + x) + c * (y^3 + 1)
>
> How can I do it in Mathematica?
>

poly = a*x^4 + a*x^3 + b*x^2 + b*x + c*y^3 + c

coeffs = Union@
          Flatten@
          CoefficientList[poly, {x, y}] /. 0 -> Sequence[]

Collect[poly, coeffs]

gives

b (x + x^2) + a (x^3 + x^4) + c (1 + y^3)

[toc] | [prev] | [standalone]


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


csiph-web