randVar() randVar() randRangeNonZero(-10, 10) randRangeNonZero(-10, 10) randRangeExclude(-10, 10, [-1, 0, 1]) A * B -A - B new RationalExpression([[C, X], C * -B])

Simplify the following expression:

Y = \dfrac{CX^2 + C * LINEARX + C * CONSTANT}{X + -A}

Y = \spaceSOLUTION.regex(true) X \neq A

First factor the polynomial in the numerator.

We notice that all the terms in the numerator have a common factor of C, so we can rewrite the expression:

Y =\dfrac{C(X^2 + LINEARX + CONSTANT)}{X + -A}

Then we factor the remaining polynomial:

X^2 LINEAR > 0 ? "+" : "" \green{LINEAR}X CONSTANT > 0 ? "+" : "" \blue{CONSTANT}

\pink{-A} B < 0 ? "+" : "" \pink{-B} = \green{LINEAR}

\pink{-A} \times \pink{-B} = \blue{CONSTANT}

(X A < 0 ? "+" : "" \color{PINK}{-A}) (X B < 0 ? "+" : "" \color{PINK}{-B})

This gives us a factored expression:

\dfrac{C(X A < 0 ? "+" : "" \pink{-A}) (X B < 0 ? "+" : "" \pink{-B})}{X + -A}

We can divide the numerator and denominator by (X + A) on condition that X \neq A.

Therefore

Y = C(X + -B); X \neq A