Exercise Math Trigonometry

Exercise here can be loaded by html files

trigonometry || math

Exercise - Sin or Cos 1

if (int_count_times_randomized <= 1){ //> return 10; } else { return random_min_max_precision(10, 15, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized <= 1){ //> return 30; } else { return random_min_max_precision(20, 70, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized == 0){ return true; } else if (int_count_times_randomized == 1){ return false; } else { return (Math.random()>0.5); //Half the time ~boolean_adjacent~ is true, the other is false. }
if (int_count_times_randomized <= 1){ //> return 0; } else { return Math.random()*2*Math.PI; }
return (true);
A right angle triangle given the hypotenuse and the angle.
Find the length of the red side of the triangle.
Hypotenuse: $h = ~r~$
Angle: $\theta = ~theta~^\circ$
Hint: Does the red side touch the angle?
Yes $\rightarrow$ adjacent side $\rightarrow$ use $\cos\theta$.
No $\rightarrow$ opposite side $\rightarrow$ use $\sin\theta$.

Solution

Since the red side [[return (~boolean_adjacent~)?"touches" : "does not touch"]] the angle, it is the [[return (~boolean_adjacent~)?"adjacent" : "opposite"]] side.

Recall the rules: adjacent $\rightarrow$ $\cos$, opposite $\rightarrow$ $\sin$.

$l = h [[return (~boolean_adjacent~)? String.raw`\cos`: String.raw`\sin`]] (\theta) = [[return ~r~]] [[return (~boolean_adjacent~)? String.raw`\cos`: String.raw`\sin`]] ([[return ~theta~]]^\circ ) = [[return (~boolean_adjacent~)? (~r~ * Math.cos(~theta~ * Math.PI/180)).toFixed(2) : (~r~ * Math.sin(~theta~ * Math.PI/180)).toFixed(2) ]]$.
$~r~ \cos ~theta~^\circ$
[[ if (~boolean_adjacent~) { return "Correct. The red side touches the angle so it is the adjacent side." } else { return "Incorrect. The red side does not touch the angle so it is the opposite side." } ]]
$~r~ \sin ~theta~^\circ$
[[ if (~boolean_adjacent~) { return "Inorrect. The red side touches the angle so it is the adjacent side." } else { return "Correct. The red side does not touch the angle so it is the opposite side." } ]]
if (~boolean_adjacent~) {return 0} else {return 1}
trigonometry || math

Exercise - Sin or Cos 2

A right angle triangle given the hypotenuse and the angle.
Find the length $l$ of the red side of the triangle.
Hypotenuse: $h = ~r~$
Angle: $\theta = ~theta~^\circ$
if (int_count_times_randomized <= 1){ //> return 10; } else { return random_min_max_precision(10, 15, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized <= 1){ //> return 30; } else { return random_min_max_precision(20, 70, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized == 0){ return true; } else if (int_count_times_randomized == 1){ return false; } else { return (Math.random()>0.5); //Half the time ~boolean_adjacent~ is true, the other is false. }
if (int_count_times_randomized <= 1){ //> return 0; } else { return Math.random()*2*Math.PI; }
Hint: Does the red side touch the angle?
Yes $\rightarrow$ adjacent side $\rightarrow$ use $\cos\theta$.
No $\rightarrow$ opposite side $\rightarrow$ use $\sin\theta$.

Solution

Since the red side [[return (~boolean_adjacent~)?"touches" : "does not touch"]] the angle, it is the [[return (~boolean_adjacent~)?"adjacent" : "opposite"]] side.

Recall the rules: adjacent $\rightarrow$ $\cos$, opposite $\rightarrow$ $\sin$.

$l = h [[return (~boolean_adjacent~)? String.raw`\cos`: String.raw`\sin`]] (\theta) = [[return ~r~]] [[return (~boolean_adjacent~)? String.raw`\cos`: String.raw`\sin`]] ([[return ~theta~]]^\circ ) = [[return (~boolean_adjacent~)? (~r~ * Math.cos(~theta~ * Math.PI/180)).toFixed(2) : (~r~ * Math.sin(~theta~ * Math.PI/180)).toFixed(2) ]]$.

If you do not get the right answer even if you typed in all the numbers correctly, your calculator may be set to the wrong mode. Your calculator must be in DEGREES mode instead of RADIANS mode, corresponding to the two common units for angles.
Is the red side adjacent or opposite to the highlighted angle?
Type "a" for adjacent or "o" for opposite:
return (~boolean_adjacent~)? "a" : "o"
not_number

$l =$
if (~boolean_adjacent~){ return (~r~ * Math.cos(~theta~ * Math.PI/180)).toFixed(2); } else { return (~r~ * Math.sin(~theta~ * Math.PI/180)).toFixed(2); }
0.2
trigonometry || math

Exercise - Find angle using $\tan^{-1}$

if (int_count_times_randomized == 0){ return 3; } else { return random_min_max_precision(2, 6, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized == 0){ return 6; } else { return random_min_max_precision(2, 6, 0); //defined in setup_exercise_all.js }
if (int_count_times_randomized == 0){ return 0; } else { return random_min_max_precision(0, 2*Math.PI, 0); //defined in setup_exercise_all.js }
return (true);
Find the angle.
[[ namespace_math_trig.theta = Math.atan2(~opposite~, ~adjacent~) * 180/Math.PI; return ""; ]] Find the angle $\theta$.
Hint:
  • $\tan \theta = \frac{\text{opposite}}{\text{adjacent}} \Leftrightarrow \theta = \tan^{-1}\frac{\text{opposite}}{\text{adjacent}}$

Solution

$$ \begin{eqnarray} \tan \theta &=& \frac{\text{opposite}}{\text{adjacent}}\\ \Rightarrow \theta &=& \tan^{-1}\frac{\text{opposite}}{\text{adjacent}} \\ &=& \tan^{-1}\frac{~opposite~}{~adjacent~} \\ &=& [[return sf_latex(namespace_math_trig.theta)]]^\circ \end{eqnarray} $$
$\theta = $
return sf_math(namespace_math_trig.theta)
5%
$ ^\circ$