randRange( 2, 10 ) randRangeNonZero( -10, 10 ) randRange( 2, 10 ) randRangeNonZero( 2, 10 ) fractionReduce( D - B, A - C ) $._("No solution") (function() { if ( ( D - B ) / ( A - C) > 0 ) { return "<code>" + "x = " + fractionReduce( ( D - B ) * ( D - B), ( A - C ) * ( A - C) ) + "</code>"; } else { return NOSOLN; } })() (function() { var choices = []; for ( var i = 0; i < 4; i++ ) { var nOffset = randRange( 1, 10 ); var dOffset = randRangeExclude( 1, 10, [ C - A ] ); var choice = "<code>" + "x = " + fractionReduce( ( D - B + nOffset ) * ( D - B + nOffset ), ( A - C + dOffset ) * ( A - C + dOffset ) ) + "</code>"; choices.unshift( choice ); } if ( ( D - B ) / ( A - C ) > 0 ) { choices.shift(); choices.unshift( SOLUTION ); } choices = shuffle( choices ); choices.push( NOSOLN ); return choices; })()

Solve for `x`:

`A\sqrt{x} + B = C\sqrt{x} + D`

SOLUTION

- choice

Subtract `C\sqrt{x}` from both sides:

`(A\sqrt{x} + B) - C\sqrt{x} = (C\sqrt{x} + D) - C\sqrt{x}`

`A - C\sqrt{x} + B = D`

Subtract `abs(B)` from both sides:

Add `abs(B)` to both sides:

`(A - C\sqrt{x} + B) + -B = D + -B`

`A - C\sqrt{x} = D - B`

Divide both sides by `A - C`.

`\frac{A - C\sqrt{x}}{A - C} = \frac{D - B}{A - C}`

Simplify.

`\sqrt{x} = SIMPLIFIED`

Square both sides.

`\sqrt{x} \cdot \sqrt{x} = SIMPLIFIED \cdot SIMPLIFIED`

SOLUTION

The principal root of a number cannot be negative. So, there is no solution.

Subtract `A\sqrt{x}` from both sides:

`(A\sqrt{x} + B) - A\sqrt{x} = (C\sqrt{x} + D) - A\sqrt{x}`

`B = C - A\sqrt{x} + D`

Subtract `abs(D)` from both sides:

Add `abs(D)` to both sides:

`B + -D = (C - A\sqrt{x} + D) + -D`

`B - D = C - A\sqrt{x}`

Divide both sides by `C - A`.

`\frac{B - D}{C - A} = \frac{C - A\sqrt{x}}{C - A}`

Simplify.

`SIMPLIFIED = \sqrt{x}`

Square both sides.

`SIMPLIFIED \cdot SIMPLIFIED = \sqrt{x} \cdot \sqrt{x}`

SOLUTION

The principal root of a number cannot be negative. So, there is no solution.