Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

197 lines (169 sloc) 7.387 kb
<!DOCTYPE html>
<!-- TODO: Improve hints -->
<html data-require="math graphie math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Trigonometry 0.5</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
<script>
function fractionSQRoot(b, root){
var natRoot = KhanUtil.splitRadical( root )[0];
var underRoot = KhanUtil.splitRadical( root )[1];
var d = KhanUtil.reduce( natRoot * underRoot, b )[0];
var n = KhanUtil.reduce( natRoot * underRoot, b )[1];
if ( d === 1 ){
if ( n !== 1 ) {
return n + "\\sqrt{" + underRoot +"}";
}
else{
return "\\sqrt{" + underRoot + "}";
}
}
else if ( underRoot !== 1 ) {
if ( n !== 1 ) {
return "\\dfrac{" + n + "\\sqrt{" + underRoot +"} }{"+ d + "}";
}
else {
return "\\dfrac{ \\sqrt{" + underRoot + "}}{" + d + "}";
}
}
else {
return "\\dfrac{" + n + "}{" + d + "}";
}
}
function betterTriangle(width, height, A, B, C, a, b, c) {
with ( KhanUtil.currentGraph ) {
// Leave some space for the labels
init({ range: [[-1.5, width + 1], [-1, height + 1]] });
path([ [0, 0], [width, 0], [0, height], true ]);
label( [0, height], A, "above left" );
label( [0, 0], C, "below left" );
label( [width, 0], B, "below right" );
label( [0, height/2], b, "left" );
label( [width/2, 0], a, "below" );
label( [width/2, height/2], c, "above right", {
labelDistance: 3
} );
path([[0.4, 0], [0.4, 0.4], [0, 0.4]]);
}
}
</script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="AC, BC">shuffle(randFromArray([[3,4], [6,8], [5,12], [7, 24], [8, 15], [10, 24], [12,16]]))</var>
<var id="CB">BC</var>
<var id="AB">sqrt(AC * AC + BC * BC)</var>
<var id="SCALE">5 / AB</var>
<var id="ANGLE">randFromArray([
"ABC",
"BAC"
])</var>
<var id="OPPOSITE_NAME">(ANGLE.substring(0,1) + ANGLE.substring(2))</var>
<var id="OPPOSITE_VALUE">
(function(){
if ( OPPOSITE_NAME === "AC" ){
return AC;
}
else if ( OPPOSITE_NAME === "BC" ){
return CB;
}
return AB;
})()
</var>
<var id="HYPOTENUSE_NAME">"AB"</var>
<var id="HYPOTENUSE_VALUE">AB</var>
<var id="ADJACENT_NAME">ANGLE.substring(1)</var>
<var id="ADJACENT_VALUE">
(function(){
if ( ADJACENT_NAME === "AC" ){
return AC;
}
else if ( ADJACENT_NAME === "BC" ){
return BC;
}
return AB;
})()
</var>
<var id="SIMPLE_TAN">fraction( OPPOSITE_VALUE, ADJACENT_VALUE, false, false, false, false)</var>
<var id="TAN">OPPOSITE_VALUE / ADJACENT_VALUE</var>
<var id="SIMPLE_SIN">fraction(OPPOSITE_VALUE, AB)</var>
<var id="SIN">OPPOSITE_VALUE / AB</var>
<var id="SIMPLE_COS">fraction(ADJACENT_VALUE, AB)</var>
<var id="COS">ADJACENT_VALUE / AB</var>
</div>
<div class="problem">
<p><code>\overline{AC}</code> is <code><var>AC</var></code> units long</p>
<p><code>\overline{BC}</code> is <code><var>BC</var></code> units long</p>
<p><code>\overline{AB}</code> is <code><var>AB</var></code> units long</p>
</div>
<div class="problems">
<div id="sinTrig1">
<div class="question">
<p>What is <code>\sin(\angle <var>ANGLE</var>)</code> ?</p>
<div class="render-answer-area-here"></div>
<div class="graphie" id="triangle">
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
</div>
</div>
<div class="solution" data-simplify="optional"><var>SIN</var></div>
<div class="hints" data-apply="appendContents">
<p><b>SOH</b> CAH TOA</p>
<p><b>S</b>in = <b>O</b>pposite over <b>H</b>ypotenuse</p>
<p><code>\sin(\angle <var>ANGLE</var>)=<var>SIMPLE_SIN</var></code></p>
</div>
</div>
<div id="cosTrig1">
<div class="question">
<p>What is <code>\cos(\angle <var>ANGLE</var>)</code> ?</p>
<div class="render-answer-area-here"></div>
<div class="graphie" id="triangle">
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
</div>
</div>
<div class="solution" data-simplify="optional"><var>COS</var></div>
<div class="hints" data-apply="appendContents">
<p>SOH <b>CAH</b> TOA</p>
<p><b>C</b>os = <b>A</b>djacent over <b>H</b>ypotenuse</p>
<p><code>\cos(\angle <var>ANGLE</var> )=<var>SIMPLE_COS</var></code></p>
</div>
</div>
<div id="tanTrig1">
<div class="question">
<p>What is <code>\tan(\angle <var>ANGLE</var>)</code> ?</p>
<div class="render-answer-area-here"></div>
<div class="graphie" id="triangle">
betterTriangle(BC * SCALE, AC * SCALE, "A", "B", "C", BC, AC, AB);
</div>
</div>
<div class="solution" data-simplify="optional"><var>TAN</var></div>
<div class="hints" data-apply="appendContents">
<p>SOH CAH <b>TOA</b></p>
<p><b>T</b>an = <b>O</b>pposite over <b>A</b>djacent</p>
<p><code>\tan(\angle <var>ANGLE</var>)=<var>SIMPLE_TAN</var></code></p>
</div>
</div>
</div>
<div class="hints">
<div>
<p>First identify <code>\angle <var>ANGLE</var></code></p>
<div class="graphie" data-update="triangle">
if (ANGLE === 'ABC') {
var angle = atan(AC / BC) * 180 / Math.PI;
arc([BC * SCALE, 0], 0.6, 180 - angle, 180);
} else {
var angle = atan(BC / AC) * 180 / Math.PI;
arc([0, AC * SCALE], 0.6, 270, 270 + angle);
}
</div>
</div>
<div>
<p>Therefore:</p>
<p>opposite <code>= \overline{<var>OPPOSITE_NAME</var>} = <var>OPPOSITE_VALUE</var></code><br/>
adjacent <code>= \overline{<var>ADJACENT_NAME</var>} = <var>ADJACENT_VALUE</var></code></p>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.