# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
310 lines (289 sloc) 12.9 KB
 Law of sines
randRange(20, 140) randRange(20, 160 - ANGLE1) randRange(5, 25) shuffle([0, 1, 2]) [ KNOWN === 0 ? SIDELEN : null, KNOWN === 1 ? SIDELEN : null, KNOWN === 2 ? SIDELEN : null ] !!rand(2) [ KNOWN === 0 ? ANGLE1 : (UNKNOWN === 0 ^ GIVE_OPPOSITE ? null : ANGLE2), KNOWN === 1 ? ANGLE1 : (UNKNOWN === 1 ^ GIVE_OPPOSITE ? null : ANGLE2), KNOWN === 2 ? ANGLE1 : (UNKNOWN === 2 ^ GIVE_OPPOSITE ? null : ANGLE2) ] solveTriangle({ sides: SIDES.slice(), angles: ANGLES.slice(), sideLabels: SIDES.slice(), angleLabels: _.map(ANGLES, function(a) { return a == null ? a : a + "^\\circ"; }), vertexLabels: ["A", "B", "C"] }) ["BC", "AC", "AB"][UNKNOWN] roundTo(1,TRIANGLE.sides[UNKNOWN]) rand(2) ? randRange(-20, 20) : randRange(160, 200)

Find UNKNOWN_MEASURE.

Round to the nearest tenth.

TRIANGLE = addTriangle(_.extend(TRIANGLE, { xPos: 1, yPos: 1, width: 10, height: 6, rot: ROTATION })); init({ range: [[0, TRIANGLE.width + 2], [0, TRIANGLE.height + 2]] }); TRIANGLE.draw();
SOLUTION

You can use the law of sines:

Fill in the unknown angle using the fact that the angles of a triangle always sum to 180^\circ.

TRIANGLE.angleLabels[UNKNOWN] = "\\pink{" + TRIANGLE.angles[UNKNOWN] + "^\\circ}"; TRIANGLE.draw();

Set up a useful relationship using the law of sines:

TRIANGLE.sideLabels[KNOWN] = "\\blue{" + TRIANGLE.sides[KNOWN] + "}"; TRIANGLE.angleLabels[KNOWN] = "\\blue{" + TRIANGLE.angles[KNOWN] + "^\\circ}"; TRIANGLE.sideLabels[UNKNOWN] = "\\pink{" + UNKNOWN_MEASURE + "}"; TRIANGLE.angleLabels[UNKNOWN] = "\\pink{" + TRIANGLE.angles[UNKNOWN] + "^\\circ}"; TRIANGLE.color = GRAY; TRIANGLE.draw();

Solve for the unknown side:

Evaluate and round to the nearest tenth:

TRIANGLE.sideLabels[UNKNOWN] = "\\pink{" + SOLUTION + "}"; TRIANGLE.draw();
randRange(5, 15, 3) shuffle([0, 1, 2]) solveTriangle({ sides: SIDES.slice(), angles: [null, null, null], sideLabels: SIDES.slice(), vertexLabels: ["A", "B", "C"] }) _.map(TRIANGLE.angles, round) "ABC"[UNKNOWN] round(Math.asin((TRIANGLE.sides[UNKNOWN] * sin(ANGLES[KNOWN] * Math.PI / 180)) / TRIANGLE.sides[KNOWN]) / Math.PI * 180) rand(2) ? randRange(-20, 20) : randRange(160, 200)

Find m\angle UNKNOWN_MEASURE.

Round to the nearest degree.

TRIANGLE.angleLabels = [ KNOWN === 0 ? ANGLES[0] + "^\\circ" : null, KNOWN === 1 ? ANGLES[1] + "^\\circ" : null, KNOWN === 2 ? ANGLES[2] + "^\\circ" : null ]; TRIANGLE = addTriangle(_.extend(TRIANGLE, { xPos: 1, yPos: 1, width: 10, height: 6, rot: ROTATION })); init({ range: [[0, TRIANGLE.width + 2], [0, TRIANGLE.height + 2]] }); TRIANGLE.draw();
SOLUTION \Large{^\circ}

You can use the law of sines:

Set up a useful relationship using the law of sines:

TRIANGLE.sideLabels[KNOWN] = "\\blue{" + TRIANGLE.sides[KNOWN] + "}"; TRIANGLE.angleLabels[KNOWN] = "\\blue{" + ANGLES[KNOWN] + "^\\circ}"; TRIANGLE.sideLabels[UNKNOWN] = "\\pink{" + TRIANGLE.sides[UNKNOWN] + "}"; TRIANGLE.angleLabels[UNKNOWN] = "\\pink{?}"; TRIANGLE.color = GRAY; TRIANGLE.draw();

Solve for the sine of the unknown angle: