# Khan/khan-exercises

Add a statement to assume x != 0 for simplifying rational expressions

```fix #42324

Test plan: load each exercise locally and make sure it displays properly

Auditors: peter, cbhl```
beneater committed Mar 14, 2013
1 parent 36051ed commit 44691243d32b442f0c384c060acedec827db3053
 @@ -81,11 +81,12 @@ getSolution(COEFFICIENT1, COEFFICIENT2, DEGREE1, DEGREE2, X) -

Simplify the expression.

-

+

Simplify the following expression:

+

Y = \dfrac{NUMERATORCOEFFICIENTPOWER1} {DENOMINATORCOEFFICIENTPOWER2}

+

You can assume X \neq 0.

 @@ -75,7 +75,7 @@
randRangeWeighted(-10, 10, 0, 0.15)
- + (function() { if (getGCD(COEFFICIENT1, CONSTANT1) !== 1 && getGCD(COEFFICIENT2, CONSTANT1) !== 1) { // Ensure there are no common factors @@ -104,8 +104,9 @@ getExpressionRegex(-COEFFICIENT2, X, -CONSTANT2) -

Simplify the following expression:

-

Y = \dfrac{NUMERATOR}{DENOMINATOR}

+

Simplify the following expression:

+

Y = \dfrac{NUMERATOR}{DENOMINATOR}

+

You can assume X \neq 0.

@@ -183,4 +184,4 @@
- +
 @@ -75,8 +75,9 @@ -

Simplify the following expression:

-

Y = \dfrac{NUMERATOR}{DENOMINATOR}

+

Simplify the following expression:

+

Y = \dfrac{NUMERATOR}{DENOMINATOR}

+

You can assume X \neq 0.

@@ -142,4 +143,4 @@
- +

Member

### petercollingridge replied Mar 14, 2013

 Thanks for that. For some of the exercises you divide by (x - 3) so there are some other exceptions, but if you say what they are that will make the answer more obvious.
Member

### beneater replied Mar 14, 2013

 Oh hrm.. I didn't think of that. If you wanna take a stab at a better fix, feel free.
Member

### petercollingridge replied Mar 14, 2013

 I guess the ideal solution would be to ask them to include the domain of the new expression, which would be possible, but would require a bit of work.