randVar() randVar() randRangeExclude(-9, 9, [-1, 0, 1]) -A * A

Simplify the following expression and state the condition under which the simplification is valid.

Y = \dfrac{X^2 + CONSTANT}{X + A}

^\s*X\s*A < 0 ? "\\+" : "[-\u2212]"\s*abs(A)\s*$
-A
^\s*A < 0 ? "" : "[-\u2212]"\s*abs(A)\s*\+\s*X\s*$
-A
Y = \space a \space X \neq \space a
a simplifed expression, like x + 2

The numerator is in the form \pink{a^2} - \blue{b^2}, which is a difference of two squares so we can factor it as (\pink{a} + \blue{b})(\pink{a} - \blue{b}).

\qquad a = X

\qquad b = \sqrt{A * A} = A

So we can rewrite the expression as:

Y = \dfrac{(\blue{X} + \pink{A})(\blue{X} \pink{-A})} \dfrac{(\blue{X} \pink{A})(\blue{X} + \pink{-A})} {X + A}

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

Therefore

Y = X + -A; X \neq -A

randVar() randVar() randRangeNonZero(-10, 10) randRangeNonZero(-10, 10) A * B -A - B

Simplify the following expression:

Y = \dfrac{X^2 + plus(LINEAR + X) + CONSTANT}{X + -A}

^\s*X\s*B < 0 ? "\\+" : "[-\u2212]"\s*abs(B)\s*$
A
^\s*B < 0 ? "" : "[-\u2212]"\s*abs(B)\s*\+\s*X\s*$
A
Y = \space a \space X \neq \space a
a simplifed expression, like x + 2

X^2 + plus(LINEAR + X) + CONSTANT = (X + -A)(X + -B)

So we can rewrite the expression as:

Y = \dfrac{(X + -A)(X + -B)}{X + -A}

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

Therefore

Y = X + -B; X \neq A

First factor the polynomial in the numerator.