# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
105 lines (104 sloc) 5.77 KB
randFromArray([ [ "A", "B", "C" ], [ "J", "K", "L" ], [ "C", "J", "T" ] ]) POINTS[ 0 ] + POINTS[ 1 ] POINTS[ 1 ] + POINTS[ 2 ] POINTS[ 0 ] + POINTS[ 2 ] randRangeNonZero( 2, 9 ) randRangeNonZero( 2, 9 ) randRangeNonZero( 2, 9 ) randRangeNonZero( 2, 9 ) randRange( 1, 9 ) ( COEF_1 * X + CONST_1 ) + ( COEF_2 * X + CONST_2 ) shuffle([ [ BLUE, SEG_1 + " = " + COEF_1 + "x + " + CONST_1 ], [ GREEN, SEG_2 + " = " + COEF_2 + "x + " + CONST_2 ], [ "purple", SEG_TOTAL + " = " + TOTAL ] ])

If:
\qquad GIVEN[ 0 ][ 1 ],
\qquad GIVEN[ 1 ][ 1 ], and
\qquad GIVEN[ 2 ][ 1 ],

Find SEG_2.

init({ range: [ [ -1, 11 ], [ -1, 1 ] ] }); line( [ 0, 0 ], [ 10, 0 ] ); style({ stroke: "#000", fill: "#000" }); graph.points = raphael.set(); graph.points.push( circle( [ 0, 0 ], 0.10 ) ); graph.points.push( circle( [ 10 * ( COEF_1 * X + CONST_1 ) / TOTAL, 0 ], 0.10 ) ); graph.points.push( circle( [ 10, 0 ], 0.10 ) ); label( [ 0, 0 ], POINTS[ 0 ], "below" ); label( [ 10 * ( COEF_1 * X + CONST_1 ) / TOTAL, 0 ], POINTS[ 1 ], "below" ); label( [ 10, 0 ], POINTS[ 2 ], "below" );
COEF_2 * X + CONST_2
style({ stroke: BLUE, strokeWidth: 3 }); line( [ 0, 0 ], [ 10 * ( COEF_1 * X + CONST_1 ) / TOTAL, 0 ] ); style({ stroke: GREEN, strokeWidth: 3 }); line( [ 10 * ( COEF_1 * X + CONST_1 ) / TOTAL, 0 ], [ 10, 0 ] ); graph.points.toFront(); $( "#given0" ).css({ "color": GIVEN[ 0 ][ 0 ] });$( "#given1" ).css({ "color": GIVEN[ 1 ][ 0 ] }); \$( "#given2" ).css({ "color": GIVEN[ 2 ][ 0 ] });

From the diagram, we can see that the total length of \purple{SEG_TOTAL} is the sum of \blue{SEG_1} and \green{SEG_2}:

\qquad \blue{SEG_1} + \green{SEG_2} = \purple{SEG_TOTAL}

Substitute in the expressions that were given for each length:

\qquad \blue{COEF_1x + CONST_1} + \green{COEF_2x + CONST_2} = \purple{TOTAL}

Combine like terms:

\qquadCOEF_1 + COEF_2x + CONST_1 + CONST_2 = \purple{TOTAL}

Subtract CONST_1 + CONST_2 from both sides:

\qquadCOEF_1 + COEF_2x = TOTAL - CONST_1 - CONST_2

Divide both sides by COEF_1 + COEF_2 to find x:

Substitute X for x in the expression that was given for SEG_2:

\qquad SEG_2 = COEF_2(\pink{X}) + CONST_2

Simplify:

\qquad \green{SEG_2 = COEF_2 * X + CONST_2}

Simplify to find \green{SEG_2}:

\qquad \green{SEG_2 = COEF_2 * X + CONST_2}

Something went wrong with that request. Please try again.