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


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

How can I force mathematica to collect a symbol from a polynomial

Started bysyzhaoyu@gmail.com
First post2013-04-09 08:04 +0000
Last post2013-04-10 17:52 +0000
Articles 3 — 3 participants

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


Contents

  How can I force mathematica to collect a symbol from a polynomial syzhaoyu@gmail.com - 2013-04-09 08:04 +0000
    Re: How can I force mathematica to collect a symbol from a polynomial Peter Pein <petsie@dordos.net> - 2013-04-10 04:48 +0000
    Re: How can I force mathematica to collect a symbol from a polynomial debguy <johnandsara2@cox.net> - 2013-04-10 17:52 +0000

#14109 — How can I force mathematica to collect a symbol from a polynomial

Fromsyzhaoyu@gmail.com
Date2013-04-09 08:04 +0000
SubjectHow can I force mathematica to collect a symbol from a polynomial
Message-ID<kk0i2o$2te$1@smc.vnet.net>
Let's say I have a polynomial:
          a+b+c
Is there any way I can force mathematica to produce the following result:
          a*(1+b/a+c/a)

I think such transformation of polynomials should be very common; however, I have been trying all day and still can not get mathematica to do so automatically.

[toc] | [next] | [standalone]


#14122

FromPeter Pein <petsie@dordos.net>
Date2013-04-10 04:48 +0000
Message-ID<kk2qvg$bin$1@smc.vnet.net>
In reply to#14109
Am 09.04.2013 10:04, schrieb syzhaoyu@gmail.com:
> Let's say I have a polynomial:
>            a+b+c
> Is there any way I can force mathematica to produce the following result:
>            a*(1+b/a+c/a)
>
> I think such transformation of polynomials should be very common; however, I have been trying all day and still can not get mathematica to do so automatically.
>

Try this:

FactorOut[pol_, var_] := var*HoldForm@Expand[pol/var] // ReleaseHold

FactorOut[a + b + c, a]
--> a (1 + b/a + c/a)

Collect[Expand[(a + b)^4 (x + y)^3 - (a - b)^4 (x - y)^3],  x | y,
         FactorOut[#, a^Exponent[#, a]] &]

--> a^3 (8 b + (8 b^3)/a^2) x^3 +
     a^4 (6 + (36 b^2)/a^2 + (6 b^4)/a^4) x^2 y +
     a^3 (24 b + (24 b^3)/a^2) x y^2 +
     a^4 (2 + (12 b^2)/a^2 + (2 b^4)/a^4) y^3

etc.

Peter

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


#14133

Fromdebguy <johnandsara2@cox.net>
Date2013-04-10 17:52 +0000
Message-ID<kk48t2$i7q$1@smc.vnet.net>
In reply to#14109
a*ExpandAll[(a + b + c)*1/a]

(* might help.  try searching help for Partial Fractions  *)

[toc] | [prev] | [standalone]


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


csiph-web