randVar() randRangeNonZero(-5, 5) randRangeExclude(-8, 8, [0, 1]) randRangeNonZero(-8, 8) expr(["*", CONSTANT1, ["+", ["*", COEFFICIENT1, X], CONSTANT2]])

Expand the expression.

EXPRESSION

(CONSTANT1 * COEFFICIENT1)X + (CONSTANT1 * CONSTANT2)

Use the distributive property to distribute the \blue{CONSTANT1}.

\qquad = (\blue{CONSTANT1} \times expr(["*", COEFFICIENT1, X])) + (\blue{CONSTANT1} \times CONSTANT2)

\qquad = (expr(["*", CONSTANT1 * COEFFICIENT1, X])) + (CONSTANT1 * CONSTANT2)

\qquad = expr(["*", CONSTANT1 * COEFFICIENT1, X]) + CONSTANT1 * CONSTANT2

randVar() randRangeNonZero(-5, 5) randRangeExclude(-8, 8, [0, 1]) randRangeNonZero(-8, 8) expr(["*", COEFFICIENT2, X, ["+", ["*", COEFFICIENT1, X], CONSTANT2]])

Simplify the expression.

EXPRESSION

(COEFFICIENT2 * COEFFICIENT1)X^2 + (COEFFICIENT2 * CONSTANT2X)

Use the distributive property to distribute the \blue{expr(["*", COEFFICIENT2, X])}.

\qquad = (\blue{expr(["*", COEFFICIENT2, X])} \times expr(["*", COEFFICIENT1, X])) + (\blue{expr(["*", COEFFICIENT2, X])} \times CONSTANT2)

\qquad = (expr(["*", COEFFICIENT2 * COEFFICIENT1, ["^", X, 2]])) + (expr(["*", COEFFICIENT2 * CONSTANT2, X]))

\qquad = expr(["*", COEFFICIENT2 * COEFFICIENT1, ["^", X, 2]]) + expr(["*", COEFFICIENT2 * CONSTANT2, X])

randVar() randRangeNonZero(-5, 5) randRangeNonZero(-5, 5) randRangeNonZero(-8, 8) randRangeNonZero(-8, 8) expr(["*", ["+", ["*", COEFFICIENT1, X], CONSTANT1], ["+", ["*", COEFFICIENT2, X], CONSTANT2]]) COEFFICIENT1 * COEFFICIENT2 CONSTANT1 * COEFFICIENT2 + COEFFICIENT1 * CONSTANT2 CONSTANT1 * CONSTANT2

Simplify the expression.

EXPRESSION

AX^2 + BX + C

First distribute the \blue{expr(["+", ["*", COEFFICIENT1, X], CONSTANT1])} onto the \green{expr(["*", COEFFICIENT2, X])} and \red{CONSTANT2}.

\qquad = \green{expr(["*", COEFFICIENT2, X])}(\blue{expr(["+", ["*", COEFFICIENT1, X], CONSTANT1])}) + \red{CONSTANT2}(\blue{expr(["+", ["*", COEFFICIENT1, X], CONSTANT1])})

Then distribute the \green{expr(["*", COEFFICIENT2, X])}.

\qquad = (\green{expr(["*", COEFFICIENT2, X])} \times \blue{expr(["*", COEFFICIENT1, X])}) + (\green{expr(["*", COEFFICIENT2, X])} \times \blue{CONSTANT1}) + \red{CONSTANT2}(\blue{expr(["+", ["*", COEFFICIENT1, X], CONSTANT1])})

\qquad = expr(["*", A, ["^", X, 2]]) + expr(["*", CONSTANT1 * COEFFICIENT2, X]) + \red{CONSTANT2}(\blue{expr(["+", ["*", COEFFICIENT1, X], CONSTANT1])})

Then distribute the \red{CONSTANT2}.

\qquad = expr(["*", A, ["^", X, 2]]) + expr(["*", CONSTANT1 * COEFFICIENT2, X]) + (\red{CONSTANT2} \times \blue{expr(["*", COEFFICIENT1, X])}) + (\red{CONSTANT2} \times \blue{CONSTANT1})

\qquad = expr(["*", A, ["^", X, 2]]) + expr(["*", CONSTANT1 * COEFFICIENT2, X]) + expr(["*", COEFFICIENT1 * CONSTANT2, X]) + C

Finally, combine the x terms.

\qquad = expr(["*", A, ["^", X, 2]]) + expr(["*", B, X]) + C