randVar() randFromArray(["+", "-"]) randFromArray(["+", "-"]) randRange(1, 5) randRange(1, 5) rand(2) ? new Term(randRange(1, 5)) : new Term(randRange(1, 5), X) new RationalExpression([[1, X], randRangeNonZero(-10, 10)]) new RationalExpression([[1, X], randRangeNonZero(-10, 10)]) randRangeWeighted(1, 5, 1, 0.4) randRangeWeighted(1, 5, 1, 0.4) getGCD(F1, F2) TERM1.multiply(F1) TERM2.multiply(F2) TERM1.multiply(TERM2) coefficient(F1 * F2 / F_GCD) + "(" + TERM1 + ")(" + TERM2 + ")" D2.divide(F_GCD).toStringFactored() D1.divide(F_GCD).toStringFactored() D2.multiply(N1).divide(F_GCD) D1.multiply(N2).divide(F_GCD) SIGN1 === '+' ? PRODUCT2 : PRODUCT2.multiply(-1) N3.multiply(F1 * F2 / F_GCD) SIGN2 === '+' ? PRODUCT3 : PRODUCT3.multiply(-1) PRODUCT1.add(PRODUCT2a).add(PRODUCT3a) TERM1.multiply(TERM2).multiply(F1 * F2 / F_GCD) DENOMINATOR.getGCD(NUMERATOR) NUMERATOR.divide(GCD) DENOMINATOR.divide(GCD) DENOMSOL.getCoefficient("") / NUMERSOL.getCoefficient("") === DENOMSOL.getCoefficient(X + 1) - NUMERSOL.getCoefficient("")

Simplify and expand the following expression:

\dfrac{N1}{D1}SIGN1 \dfrac{N2}{D2}SIGN2 \dfrac{N3}{D3}

(NUMERSOL.toString())/(DENOMSOL.toString())
(NUMERSOL.toString())/(DENOMSOL.toStringFactored())
(NUMERSOL.toString())/(COMMON_DENOM)
(NUMERSOL.toStringFactored())/(DENOMSOL.toString())
(NUMERSOL.toStringFactored())/(DENOMSOL.toStringFactored())
(NUMERSOL.toStringFactored())/(COMMON_DENOM)

First find a common denominator by finding the least common multiple of the denominators.

Try factoring the denominators.

We can factor a F1 out of denominator in the first term:

\qquad\dfrac{N1}{D1} = \dfrac{N1}{F1(TERM1)}

We can factor a F2 out of denominator in the second term:

\qquad\dfrac{N2}{D2} = \dfrac{N2}{F2(TERM2)}

We can factor the quadratic in the third term:

\qquad\dfrac{N3}{D3} = \dfrac{N3}{(TERM1)(TERM2)}

Now we have:

\qquad \dfrac{N1}{D1.toStringFactored()}SIGN1 \dfrac{N2}{D2.toStringFactored()}SIGN2 \dfrac{N3}{(TERM1)(TERM2)}

The least common multiple of the denominators is:

\qquadCOMMON_DENOM

In order to get the first term over COMMON_DENOM, multiply by \dfrac{MULTIPLY1}{MULTIPLY1}:

\qquad \dfrac{N1}{D1.toStringFactored()} \times \dfrac{MULTIPLY1}{MULTIPLY1} = \dfrac{PRODUCT1.toStringFactored()}{COMMON_DENOM}

In order to get the second term over COMMON_DENOM, multiply by \dfrac{MULTIPLY2}{MULTIPLY2}:

\qquad \dfrac{N2}{D2.toStringFactored()} \times \dfrac{MULTIPLY2}{MULTIPLY2} = \dfrac{PRODUCT2.toStringFactored()}{COMMON_DENOM}

In order to get the third term over COMMON_DENOM, multiply by \dfrac{F1 * F2 / F_GCD}{F1 * F2 / F_GCD}:

\qquad \dfrac{N3}{(TERM1)(TERM2)} \times \dfrac{F1 * F2 / F_GCD}{F1 * F2 / F_GCD} = \dfrac{PRODUCT3.toStringFactored()}{COMMON_DENOM}

Now we have:

\qquad \dfrac{PRODUCT1.toStringFactored()}{COMMON_DENOM} SIGN1 \dfrac{PRODUCT2.toStringFactored()}{COMMON_DENOM} SIGN2 \dfrac{PRODUCT3.toStringFactored()}{COMMON_DENOM}

\qquad = \dfrac{ PRODUCT1.toStringFactored() + PRODUCT2a.toStringFactored() + PRODUCT3a.toStringFactored()} {COMMON_DENOM}

Expand:

\qquad = \dfrac{PRODUCT1 + PRODUCT2a + PRODUCT3a}{DENOMINATOR}

\qquad = \dfrac{NUMERATOR}{DENOMINATOR}

Simplify:

\qquad = \dfrac{NUMERSOL}{DENOMSOL}