Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 220 lines (194 sloc) 6.888 kB
eb168d3 @igorT Add exercise -- trigonometry 1
igorT authored
1 <!DOCTYPE html>
2 <html data-require="math graphie math-format">
3 <head>
4 <title>Trigonometry 1</title>
5 <script src="../khan-exercise.js"></script>
6 <script>
7 function fractionSQRoot(b, root){
8 var natRoot = KhanUtil.splitRadical( root )[0];
9 var underRoot = KhanUtil.splitRadical( root )[1];
10 var d = KhanUtil.reduce( natRoot * underRoot, b )[0];
11 var n = KhanUtil.reduce( natRoot * underRoot, b )[1];
12 if ( d === 1 ){
13 if ( n !== 1 ) {
14 return n + "\\sqrt{" + underRoot +"}";
15 }
16 else{
17 return "\\sqrt{" + underRoot + "}";
18 }
19
20 }
21 else if ( underRoot !== 1 ) {
22 if ( n !== 1 ) {
23 return "\\dfrac{" + n + "\\sqrt{" + underRoot +"} }{"+ d + "}";
24 }
25 else {
26 return "\\dfrac{ \\sqrt{" + underRoot + "}}{" + d + "}";
27 }
28 }
29 else {
30 return "\\dfrac{" + n + "}{" + d + "}";
31 }
32 }
33
34 function betterTriangle(width, height, A, B, C, a, b, c) {
35 var scale = 5 / Math.sqrt(width * width + height * height);
36 width *= scale;
37 height *= scale;
38
39 with ( KhanUtil.currentGraph ) {
40 // Leave some space for the labels
41 init({ range: [[-1.5, width + 1], [-1, height + 1]] });
42
43 path([ [0, 0], [width, 0], [0, height], true ]);
44
45 label( [0, height], A, "above left" );
46 label( [0, 0], C, "below left" );
47 label( [width, 0], B, "below right" );
48
49 label( [0, height/2], b, "left" );
50 label( [width/2, 0], a, "below" );
51 label( [width/2, height/2], c, "above right", {
52 labelDistance: 3
53 } );
54 }
55 }
56 </script>
57 </head>
58 <body>
59 <div class="exercise">
60 <div class="vars">
61 <var id="AC">randRange(3, 10)</var>
62 <var id="BC">randRange(3, 10)</var>
63 <var id="CB">BC</var>
64 <var id="AB">AC * AC + BC * BC</var>
65 <var id="AB_STRING">formattedSquareRootOf(AC * AC + BC * BC)</var>
66 <ul id="ANGLE">
67 <li>"ABC"</li>
68 <li>"BAC"</li>
69 </ul>
70 <var id="OPPOSITE_NAME">(ANGLE.substring(0,1) + ANGLE.substring(2))</var>
71 <var id="OPPOSITE_VALUE">
72 (function(){
73 if ( OPPOSITE_NAME == "AC" ){
74 return AC;
75 }
76 else if ( OPPOSITE_NAME == "BC" ){
77 return CB;
78 }
79 return AB_STRING;
80 })()
81 </var>
82
83 <var id="HYPOTENUSE_NAME">"AB"</var>
84 <var id="HYPOTENUSE_VALUE">AB_STRING</var>
85
86 <var id="ADJACENT_NAME">ANGLE.substring(1)</var>
87 <var id="ADJACENT_VALUE">
88 (function(){
89 if ( ADJACENT_NAME=="AC" ){
90 return AC;
91 }
92 else if ( ADJACENT_NAME=="BC" ){
93 return BC;
94 }
95
96 return AB_STRING;
97 })()
98 </var>
99 <var id="SIMPLE_TAN">
100 fraction( OPPOSITE_VALUE, ADJACENT_VALUE, false, false, false, false)
101 </var>
102 <var id="TAN">
103 fractionReduce( OPPOSITE_VALUE, ADJACENT_VALUE, false, false)
104 </var>
105 <var id="SIMPLE_SIN">
106 "\\frac{" + OPPOSITE_VALUE + "}{" + formattedSquareRootOf(AB) + "}"
107 </var>
108 <var id="SIN">
109 fractionSQRoot( OPPOSITE_VALUE , AB )
110 </var>
111 <var id="SIMPLE_COS">
112 "\\frac{" + ADJACENT_VALUE + "}{" + formattedSquareRootOf(AB) + "}"
113 </var>
114 <var id="COS">
115 fractionSQRoot( ADJACENT_VALUE , AB )
116 </var>
117
118
119 </div>
120
121 <div class="problems">
122 <div id="sin">
123 <div class="problem">
124 <p><code>\overline{AC}</code> is <code><var>AC</var></code> units long</p>
125 <p><code>\overline{BC}</code> is <code><var>BC</var></code> units long</p>
126 <p><code>\overline{AB}</code> is <code><var>AB_STRING</var></code> units long</p>
127 </div>
128 <div class="question">
129 <p>What is <code>\sin(\angle <var>ANGLE</var>)</code> ?</p>
130
131 <div class="graphie">
132 betterTriangle( BC, AC, "A", "B", "C", BC, AC, AB_STRING );
133 </div>
134 </div>
135
136 <div class="solution">
137 <code><var>SIN</var></code>
138 </div>
139 <ul class="choices" data-show="4" data-none="true">
140 <li data-if="COS !== SIN"><code><var>COS</var></code></li>
141 <li><code><var>SIN</var></code></li>
142 <li><code><var>TAN</var></code></li>
143 <li><code>\dfrac{1}{<var>AB</var>}</code></li>
144 <li><code>\dfrac{1}{<var>BC</var>}</code></li>
145 <li><code>\dfrac{1}{<var>AC</var>}</code></li>
146 <li><code>\dfrac{2 \sqrt{2}}{<var>AC</var>}</code></li>
147 </ul>
148
149 <div class="hints">
150 <p><b>SOH</b> CAH TOA</p>
151 <p><b>S</b>in = <b>O</b>pposite over <b>H</b>ypotenuse</p>
152 <p>opposite <code>= \overline{<var>OPPOSITE_NAME</var>} = <var>OPPOSITE_VALUE</var></code></p>
153 <p>hypotenuse <code>= \overline{<var>HYPOTENUSE_NAME</var>} = <var>AB_STRING</var></code></p>
154 <p><code>\sin(\angle <var>ANGLE</var>)=<var>SIMPLE_SIN</var></code></p>
155 <p data-if="SIN !== SIMPLE_SIN"><code>=<var>SIN</var></code></p>
156 </div>
157 </div>
158
159 <div id="cos" data-type="sin">
160 <div class="problem">
161 <p><code>\overline{AC}</code> is <code><var>AC</var></code> units long</p>
162 <p><code>\overline{BC}</code> is <code><var>BC</var></code> units long</p>
163 <p><code>\overline{AB}</code> is <code><var>AB_STRING</var></code> units long</p>
164 </div>
165 <div class="question">
166 <p>What is <code>\cos(\angle <var>ANGLE</var>)</code> ?</p>
167
168 <div class="graphie">
169 betterTriangle( BC, AC, "A", "B", "C", BC, AC, AB_STRING );
170 </div>
171 </div>
172
173 <div class="solution">
174 <code><var>COS</var></code>
175 </div>
176
177 <div class="hints">
178 <p>SOH <b>CAH</b> TOA</p>
179 <p><b>C</b>os = <b>A</b>djacent over <b>H</b>ypotenuse</p>
180 <p>adjacent <code>= \overline{<var>ADJACENT_NAME</var>} = <var>ADJACENT_VALUE</var></code></p>
181 <p>hypotenuse <code>= \overline{<var>HYPOTENUSE_NAME</var>} = <var>AB_STRING</var></code></p>
182 <p><code>\cos(\angle <var>ANGLE</var> )=<var>SIMPLE_COS</var></code></p>
183 <p data-if="COS !== SIMPLE_COS"><code>=<var>COS</var></code></p>
184 </div>
185 </div>
186
187 <div id="tan" data-type="sin">
188 <div class="problem">
189 <p><code>\overline{AC}</code> is <code><var>AC</var></code> units long</p>
190 <p><code>\overline{BC}</code> is <code><var>BC</var></code> units long</p>
191 <p><code>\overline{AB}</code> is <code><var>AB_STRING</var></code> units long</p>
192 </div>
193 <div class="question">
194 <p>What is <code>\tan(\angle <var>ANGLE</var>)</code> ?</p>
195
196 <div class="graphie">
197 betterTriangle( BC, AC, "A", "B", "C", BC, AC, AB_STRING );
198 </div>
199 </div>
200
201 <div class="solution">
202 <code><var>TAN</var></code>
203 </div>
204
205 <div class="hints">
206 <p>SOH CAH <b>TOA</b></p>
207 <p><b>T</b>an = <b>O</b>pposite over <b>A</b>djacent</p>
208 <p>opposite <code>= \overline{<var>OPPOSITE_NAME</var>} = <var>OPPOSITE_VALUE</var></code></p>
209 <p>adjacent <code>= \overline{<var>ADJACENT_NAME</var>} = <var>ADJACENT_VALUE</var></code></p>
210 <p><code>\tan(\angle <var>ANGLE</var>)=<var>SIMPLE_TAN</var></code></p>
211 <p data-if="TAN !== SIMPLE_TAN"><code>=<var>TAN</var></code></p>
212 </div>
213 </div>
214
215 </div>
216
217 </div>
218 </body>
219 </html>
Something went wrong with that request. Please try again.