       Rewriting a polynomial

• To: mathgroup at smc.vnet.net
• Subject: [mg101693] Rewriting a polynomial
• From: Luca <Lucazanottifragonara at alice.it>
• Date: Tue, 14 Jul 2009 06:58:36 -0400 (EDT)

```Hello all. I've a problem, I'm trying to reorder a polynomial, which is obtained by substitution from this:

Poly = Subscript[\[Alpha], 5] \!
\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + Subscript[\[Alpha], 6] \!
\*SubsuperscriptBox[\(x\), \(2\), \(3\)] + Subscript[\[Alpha], 7] \!
\*SubsuperscriptBox[\(f\), \(1\), \(3\)]  + Subscript[\[Alpha], 8] \!
\*SubsuperscriptBox[\(f\), \(2\), \(3\)] + Subscript[\[Alpha], 9] \!
\*SubsuperscriptBox[\(x\), \(1\), \(2\)] Subscript[x, 2] +
Subscript[\[Alpha], 10] \!
\*SubsuperscriptBox[\(x\), \(1\), \(2\)] Subscript[f, 1] +
Subscript[\[Alpha], 11] \!
\*SubsuperscriptBox[\(x\), \(1\), \(2\)] Subscript[f, 2] +
Subscript[\[Alpha], 12] \!
\*SubsuperscriptBox[\(x\), \(2\), \(2\)] Subscript[x, 1] +
Subscript[\[Alpha], 13] \!
\*SubsuperscriptBox[\(x\), \(2\), \(2\)] Subscript[f, 1] +
Subscript[\[Alpha], 14] \!
\*SubsuperscriptBox[\(x\), \(2\), \(2\)] Subscript[f, 2] +
Subscript[\[Alpha], 15] \!
\*SubsuperscriptBox[\(f\), \(1\), \(2\)] Subscript[x, 1] +
Subscript[\[Alpha], 16] \!
\*SubsuperscriptBox[\(f\), \(1\), \(2\)] Subscript[x, 2] +
Subscript[\[Alpha], 17] \!
\*SubsuperscriptBox[\(f\), \(1\), \(2\)] Subscript[f, 2] +
Subscript[\[Alpha], 18] \!
\*SubsuperscriptBox[\(f\), \(2\), \(2\)] Subscript[x, 1] +
Subscript[\[Alpha], 19] \!
\*SubsuperscriptBox[\(f\), \(2\), \(2\)] Subscript[f, 1] +
Subscript[\[Alpha], 20] \!
\*SubsuperscriptBox[\(f\), \(2\), \(2\)] Subscript[f, 2]

Subscript[q, 3] =
Poly /. {Subscript[x, 1] -> Sum[Subscript[x, 1, {i}], {i, 1, 3}],
Subscript[x, 2] -> Sum[Subscript[x, 2, {i}], {i, 1, 3}],
Subscript[f, 1] -> Sum[Subscript[f, 1, {i}], {i, 1, 3}],
Subscript[f, 2] -> Sum[Subscript[f, 2, {i}], {i, 1, 3}]};

If I want to reorder my polynomial q3, I can use Simplify, the only problem is that Mathematica consider my alpha coefficients, as variables. Instead, I want to write my polynomial in this form:

a1 (x1+x2+x3...what's inside) + a2 (what's inside)+a3 (what's inside)...

I want to write my results in this way, instead, if I use Simplify, or stuff like that, I obtain something in the form:

x1 (what's inside)+x2(what's inside)+....

I've tried to explore the help of the software for two days but I didn't find anything useful!