Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Add basic reciprocal trig function exercise
Browse files Browse the repository at this point in the history
Reviewers: emily, eater

Reviewed By: eater

CC: eater, emily

Differential Revision: http://phabricator.khanacademy.org/D570
  • Loading branch information
mwittels committed Aug 16, 2012
1 parent e23c820 commit 8c7b350
Show file tree
Hide file tree
Showing 2 changed files with 301 additions and 0 deletions.
300 changes: 300 additions & 0 deletions exercises/reciprocal_trig_funcs.html
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,300 @@
<!DOCTYPE html>
<html data-require="math math-format graphie">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Reciprocal trig functions</title>
<script src="../khan-exercise.js"></script>
<script>
function betterTriangle(width, height, A, B, C, a, b, c) {
var scale = 5 / Math.sqrt(width * width + height * height);
width *= scale;
height *= scale;

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
});
}
}
</script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="csc">
<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="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="SIMPLE_CSC">fraction(AB, OPPOSITE_VALUE)</var>
<var id="SIMPLE_SIN">fraction(OPPOSITE_VALUE, AB)</var>
<var id="CSC">AB / OPPOSITE_VALUE</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="question">
<p>
What is <code>\csc(\angle <var>ANGLE</var>)?</code>
</p>

<div class="graphie">
betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
path([[ 0.4, 0 ], [ 0.4, 0.4 ], [ 0, 0.4 ]]);
</div>
</div>

<div class="solution" data-forms="proper, improper" data-simplify="optional"><var>CSC</var></div>

<div class="hints">
<p>
<code>\csc(\angle <var>ANGLE</var>) =
\dfrac{1}{\sin(\angle <var>ANGLE</var>)}</code>
</p>
<p>
How can we find
<code>\sin(\angle <var>ANGLE</var>)</code>?
</p>
<p>
<b>SOH</b> CAH TOA
</p>
<p>
<b>S</b>in = <b>O</b>pposite over <b>H</b>ypotenuse
</p>
<p>
Opposite <code>= \overline{<var>OPPOSITE_NAME</var>}
= <var>OPPOSITE_VALUE</var></code>
</p>
<p>
Hypotenuse <code>= \overline{<var>HYPOTENUSE_NAME</var>}
= <var>AB</var></code>
</p>
<p>
<code>\sin(\angle <var>ANGLE</var>)
= <var>SIMPLE_SIN</var></code>
</p>
<p>
<code>\csc(\angle <var>ANGLE</var>)
= \dfrac{1}{\sin(\angle <var>ANGLE</var>)}
= <var>SIMPLE_CSC</var></code>
</p>
</div>
</div>
<div id="sec">
<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="ANGLE">randFromArray([
"ABC",
"BAC"
])</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_COS">fraction(ADJACENT_VALUE, AB)</var>
<var id="SIMPLE_SEC">fraction(AB, ADJACENT_VALUE)</var>
<var id="SEC">AB / ADJACENT_VALUE</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="question">
<p>
What is <code>\sec(\angle <var>ANGLE</var>)?</code>
</p>

<div class="graphie">
betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
path([[ 0.4, 0 ], [ 0.4, 0.4 ], [ 0, 0.4 ]]);
</div>
</div>

<div class="solution" data-forms="proper, improper" data-simplify="optional"><var>SEC</var></div>

<div class="hints">
<p>
<code>\sec(\angle <var>ANGLE</var>) =
\dfrac{1}{\cos(\angle <var>ANGLE</var>)}</code>
</p>
<p>
How can we find
<code>\cos(\angle <var>ANGLE</var>)</code>?
</p>
<p>
SOH <b>CAH</b> TOA
</p>
<p>
<b>C</b>osine = <b>A</b>djacent over <b>H</b>ypotenuse
</p>
<p>
Adjacent <code>= \overline{<var>ADJACENT_NAME</var>}
= <var>ADJACENT_VALUE</var></code>
</p>
<p>
Hypotenuse <code>= \overline{<var>HYPOTENUSE_NAME</var>}
= <var>AB</var></code>
</p>
<p>
<code>\cos(\angle <var>ANGLE</var>)
= <var>SIMPLE_COS</var></code>
</p>
<p>
<code>\sec(\angle <var>ANGLE</var>)
= \dfrac{1}{\cos(\angle <var>ANGLE</var>)}
= <var>SIMPLE_SEC</var></code>
</p>
</div>
</div>
<div id="cot">
<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="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="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)
</var>
<var id="SIMPLE_COT">fraction(ADJACENT_VALUE, OPPOSITE_VALUE)
</var>
<var id="COT">ADJACENT_VALUE / OPPOSITE_VALUE</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="question">
<p>
What is <code>\cot(\angle <var>ANGLE</var>)?</code>
</p>

<div class="graphie">
betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
path([[ 0.4, 0 ], [ 0.4, 0.4 ], [ 0, 0.4 ]]);
</div>
</div>

<div class="solution" data-forms="proper, improper" data-simplify="optional"><var>COT</var></div>

<div class="hints">
<p>
<code>\cot(\angle <var>ANGLE</var>) =
\dfrac{1}{\tan(\angle <var>ANGLE</var>)}</code>
</p>
<p>
How can we find
<code>\tan(\angle <var>ANGLE</var>)</code>?
</p>
<p>
SOH CAH <b>TOA</b>
</p>
<p>
<b>T</b>angent = <b>O</b>pposite over <b>A</b>djacent
</p>
<p>
Opposite <code>= \overline{<var>OPPOSITE_NAME</var>}
= <var>OPPOSITE_VALUE</var></code>
</p>
<p>
Adjacent <code>= \overline{<var>ADJACENT_NAME</var>}
= <var>ADJACENT_VALUE</var></code>
</p>
<p>
<code>\tan(\angle <var>ANGLE</var>)
= <var>SIMPLE_TAN</var></code>
</p>
<p>
<code>\cot(\angle <var>ANGLE</var>)
= \dfrac{1}{\tan(\angle <var>ANGLE</var>)}
= <var>SIMPLE_COT</var></code>
</p>
</div>
</div>
</div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions utils/convert-values.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -401,3 +401,4 @@ $.extend(KhanUtil, {
} }
} }
}); });

0 comments on commit 8c7b350

Please sign in to comment.