randVar() randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12)) randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12)) randRangeNonZero(-1, 1) * randRange(1, randRange(1, 20)) randRangeNonZero(-1, 1) * randRange(1, randRange(1, 12))
A + B + X

Combine the like terms to make a simpler expression:

`\large{expr(["+", ["*", A, X], ["*", B, X]])}`

SOLUTION

Combine the `\pink{X}` terms:

`\qquad \large{ \begin{eqnarray} coefficient(A)\pink{X} + - coefficient(abs(B))\pink{X} &=& (A + B)\pink{X} \\ &=& coefficient(A + B)\pink{X} \end{eqnarray}}`

The simplified expression is `expr(["*", A + B, X])`

A + B + X + "+" + C

`\large{expr(["+", ["*", A, X], ["*", B, X], C])}`

Combine the `\pink{X}` terms:

`\qquad \large{ \begin{eqnarray} coefficient(A)\pink{X} + - coefficient(abs(B))\pink{X} + C &=& (A + B)\pink{X} + C\\ &=& coefficient(A + B)\pink{X} + C \end{eqnarray}}`

The simplified expression is `expr(["*", A + B, X]) + C`

`\large{expr(["+", ["*", A, X], C, ["*", B, X]])}`

Combine the `\pink{X}` terms:

`\qquad \large{ \begin{eqnarray} coefficient(A)\pink{X} + C + - coefficient(abs(B))\pink{X} &=& (A + B)\pink{X} + C\\ &=& coefficient(A + B)\pink{X} + C \end{eqnarray}}`

The simplified expression is `expr(["*", A + B, X]) + C`

A + B + X + "+" + (C + D)

`\large{expr(["+", ["*", A, X], C, ["*", B, X], D])}`

Combine the `\pink{X}` terms:

`\qquad \large{ \begin{eqnarray} coefficient(A)\pink{X} + C + - coefficient(abs(B))\pink{X} + D &=& (A + B)\pink{X} + C + D \\ &=& coefficient(A + B)\pink{X} + C + D \end{eqnarray}}`

Combine the numeric terms:

`\qquad \large{ coefficient(A + B)\pink{X} + - \blue{abs(C)} + - \blue{abs(D)} = coefficient(A + B)\pink{X} + - \blue{abs(C + D)}}`

The simplified expression is `expr(["+", ["*", A + B, X], C + D])`

`\large{expr(["+", ["*", A, X], C, D, ["*", B, X]])}`

Combine the `\pink{X}` terms:

`\qquad \large{ \begin{eqnarray} coefficient(A)\pink{X} + C + D + - coefficient(abs(B))\pink{X} &=& (A + B)\pink{X} + C + D \\ &=& coefficient(A + B)\pink{X} + C + D \end{eqnarray}}`

Combine the numeric terms:

`\qquad \large{ coefficient(A + B)\pink{X} + - \blue{abs(C)} + - \blue{abs(D)} = coefficient(A + B)\pink{X} + - \blue{abs(C + D)}}`

The simplified expression is `expr(["+", ["*", A + B, X], C + D])`

A + X + "+" + (C + D)

`\large{expr(["+", ["*", A, X], C, D])}`

Combine the numeric terms:

`\qquad \large{ expr(["*", A, X]) + - \blue{abs(C)} + - \blue{abs(D)} = expr(["*", A, X]) + - \blue{abs(C + D)}}`

The simplified expression is `expr(["+", ["*", A, X], C + D])`

`\large{expr(["+", C, ["*", A, X], D])}`

Combine the numeric terms:

`\qquad \large{ \blue{C} + expr(["*", A, X]) + - \blue{abs(D)} = expr(["*", A, X]) + - \blue{abs(C + D)}}`

The simplified expression is `expr(["+", ["*", A, X], C + D])`