Skip to main content
edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k

How can I reorder the factors in the terms of a polynomial? Consider

poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(\[Sigma]\σ\), \(1\)], \(3\)]\)\) /.    Subscript[\[Sigma]Subscript[σ,     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

Question1: How can I get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

Question2: Even better if possible, how can I get

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

My goal is to keep the order of the terms in (2) unchanged when I copy (4)/(5) into an inline formula cell.

How can I reorder the factors in the terms of a polynomial? Consider

poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(\[Sigma]\), \(1\)], \(3\)]\)\) /.    Subscript[\[Sigma],     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

Question1: How can I get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

Question2: Even better if possible, how can I get

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

My goal is to keep the order of the terms in (2) unchanged when I copy (4)/(5) into an inline formula cell.

How can I reorder the factors in the terms of a polynomial? Consider

poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(σ\), \(1\)], \(3\)]\)\) /.    Subscript[σ,     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

Question1: How can I get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

Question2: Even better if possible, how can I get

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

My goal is to keep the order of the terms in (2) unchanged when I copy (4)/(5) into an inline formula cell.

Tweeted twitter.com/#!/StackMma/status/366529278248099840
Made English more idiomatic.
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

How can I changereorder the factors in the terms to polynomials with "hold"of a polynomial?

#HowHow can I changereorder the factors in the terms to polynomials with "hold"of a polynomial? Consider


 
poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(\[Sigma]\), \(1\)], \(3\)]\)\) /.    Subscript[\[Sigma],     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

question1Question1: How tocan I get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

question2Question2: How to get(IfEven better if possible), how can I get

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

My goal is to keep the order of the terms in (2) unchanged when I will copy (4)/(5) tointo an inline formula cell, that's my purpose to keep (2) unchanged in terms.

How can I change terms to polynomials with "hold"

#How can I change terms to polynomials with "hold"


 
poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(\[Sigma]\), \(1\)], \(3\)]\)\) /.    Subscript[\[Sigma],     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

question1: How to get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

question2: How to get(If possible)

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

I will copy (4)/(5) to an inline formula cell, that's my purpose to keep (2) unchanged in terms.

How can I reorder the factors in the terms of a polynomial?

How can I reorder the factors in the terms of a polynomial? Consider

poly1 = \!\(\*SubsuperscriptBox[\(x\), \(1\), \(3\)] + \*SubsuperscriptBox[\(x\), \(2\), \(3\)] + \*SubsuperscriptBox[\(x\), \(3\), \(3\)]\  - \ \(TraditionalForm\`\*SuperscriptBox[SubscriptBox[\(\[Sigma]\), \(1\)], \(3\)]\)\) /.    Subscript[\[Sigma],     1] -> (Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 3]) //   Expand

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{1}\end{align*}$$

MonomialList[poly1, {Subscript[x, 1], Subscript[x, 2], Subscript[x,   3]}, "Lexicographic"]

$$\begin{align*}\left\{-3 x_1^2 x_2,-3 x_1^2 x_3,-3 x_1 x_2^2,-6 x_1 x_2 x_3,-3 x_1 x_3^2,-3 x_2^2 x_3,-3 x_2 x_3^2\right\}\tag{2}\end{align*}$$

% /. List -> Plus

$$\begin{align*}-3 x_2 x_1^2-3 x_3 x_1^2-3 x_2^2 x_1-3 x_3^2 x_1-6 x_2 x_3 x_1-3 x_2 x_3^2-3 x_2^2 x_3\tag{3}\end{align*}$$

Question1: How can I get

$$\begin{align*}-3 x_1^2 x_2-3 x_1^2 x_3-3 x_1 x_2^2-6 x_1 x_2 x_3-3 x_1 x_3^2-3 x_2^2 x_3-3 x_2 x_3^2\tag{4}\end{align*}$$

Question2: Even better if possible, how can I get

$$\begin{align*}-3\left( x_1^2 x_2+x_2^2x_1+\text{...}\right)-6 x_1 x_2 x_3\tag{5}\end{align*}$$

My goal is to keep the order of the terms in (2) unchanged when I copy (4)/(5) into an inline formula cell.

Source Link
HyperGroups
  • 8.6k
  • 1
  • 26
  • 63
Loading