# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

136 lines (126 sloc) 5.405 kb
randRangeNonZero( -10, 10 ) randRangeNonZero( -10, 10 )
randRange(1,6)
SQUARE*A*B A*B SQUARE*(-A-B) -A-B

Determine where f(x) intersects the x-axis.

f(x) = plus(SQUARE + "x^2") + plus( LINEAR + "x" ) + CONSTANT

A
B

The two numbers -A and -B satisfy both conditions:

\qquad \color{PINK}{-A} + \color{PINK}{-B} = \color{GREEN}{SIMPLELINEAR}

\qquad \color{PINK}{-A} \times \color{PINK}{-B} = \color{BLUE}{SIMPLECONSTANT}

So (x A < 0 ? "+" : "" \color{PINK}{-A}) (x B < 0 ? "+" : "" \color{PINK}{-B}) = 0.

x + -A = 0 or x + -B = 0

Thus, x = A and x = B are the solutions.

SQUARE * A * A A * A SQUARE * ( -2 * A ) -2 * A

Determine where f(x) intersects the x-axis.

f(x) = plus( SQUARE + "x^2") + plus( LINEAR + "x" ) + CONSTANT

The number -A used twice satisfies both conditions:

\qquad \color{PINK}{-A} + \color{PINK}{-A} = \color{GREEN}{SIMPLELINEAR}

\qquad \color{PINK}{-A} \times \color{PINK}{-A} = \color{BLUE}{SIMPLECONSTANT}

So (x A < 0 ? "+" : "" \color{PINK}{-A})^2 = 0.

x + -A = 0

Thus, x = A is the solution.

The function intersects the x-axis where f(x) = 0, so solve the equation:

\qquad plus( SQUARE + "x^2" ) LINEAR >= 0 ? "+" : "" plus( "\\color{" + GREEN + "}{" + LINEAR + "}x" ) CONSTANT >= 0 ? "+" : "" plus( "\\color{" + BLUE + "}{" + CONSTANT + "}" ) = 0

The function intersects the x-axis where f(x) = 0, so solve the equation:

\qquad plus( SQUARE + "x^2", LINEAR + "x", CONSTANT ) = 0

Dividing both sides by SQUARE gives:

\qquad x^2 SIMPLELINEAR >= 0 ? "+" : "" plus( "\\color{" + GREEN + "}{" + SIMPLELINEAR + "}x" ) SIMPLECONSTANT >= 0 ? "+" : "" plus( "\\color{" + BLUE + "}{" + SIMPLECONSTANT + "}" ) = 0

The coefficient on the x term is SIMPLELINEAR and the constant term is SIMPLECONSTANT, so we need to find two numbers that add up to SIMPLELINEAR and multiply to SIMPLECONSTANT.

Something went wrong with that request. Please try again.