random() < 0.5 ADD ? "+" : "-" ADD ? "-" : "+" shuffle(randFromArray([[3,4], [6,8], [5,12], [7, 24], [8, 15], [10, 24], [12,16]])) sqrt(AC * AC + BC * BC) randFromArray(["BAC","ABC"]) randFromArray([30,45,60,90,180,270]) ["\\angle "+T_ANGLE, S_ANGLE+"^{\\circ}"] (T_ANGLE[0] + T_ANGLE[2]) (function(){ if (OPPOSITE_NAME === "AC"){ return AC; } else if (OPPOSITE_NAME === "BC"){ return BC; } return AB; })() T_ANGLE.substring(1) (function(){ if (ADJACENT_NAME === "AC"){ return AC; } else if (ADJACENT_NAME === "BC"){ return BC; } return AB; })() "AB" AB
[OPPOSITE_VALUE, HYPOTENUSE_VALUE, "\\dfrac{"+OPPOSITE_VALUE+"}{"+HYPOTENUSE_VALUE+"}"] (function() { switch(S_ANGLE) { case 30: return [Math.sqrt(3),2,"\\dfrac{\\sqrt{3}}{2}"]; case 45: return [Math.sqrt(2),2,"\\dfrac{\\sqrt{2}}{2}"]; case 60: return [1,2,"\\dfrac{1}{2}"]; case 90: return [0,1,"0"]; case 180: return [1,-1,"-1"]; case 270: return [0,1,"0"]; } })() [ADJACENT_VALUE, HYPOTENUSE_VALUE, "\\dfrac{"+ADJACENT_VALUE+"}{"+HYPOTENUSE_VALUE+"}"] (function() { switch(S_ANGLE) { case 30: return [1,2,"\\dfrac{1}{2}"]; case 45: return [Math.sqrt(2),2,"\\dfrac{\\sqrt{2}}{2}"]; case 60: return [Math.sqrt(3),2,"\\dfrac{\\sqrt{3}}{2}"]; case 90: return [1,1,"1"]; case 180: return [0,1,"0"]; case 270: return [1,-1,"-1"]; } })() formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP) [formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP2), formatRadicalFraction(T3N,T3D,T2N,T2D,T1N,T1D,T4N,T4D,OP2), formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP), formatRadicalFraction(T3N,T3D,T2N,T2D,T1N,T1D,T4N,T4D,OP)]

`\sin(T_ANG OP S_ANG) = \; ?`

betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
`ANS_DISPLAY`

- `op`

We don't know what `T_ANG` is exactly, so we can't directly evaluate this function. We do know what `\sin(T_ANG)` is, though.

To simplify this formula to something we can use, we try the sine addition/subtraction identity: `\sin(x \pm y) = \sin x \cdot \cos y \pm \cos x \cdot \sin y`

In this case, we have

`\qquad \sin(T_ANG OP S_ANG) =`
`\qquad\qquad \sin(T_ANG) \cdot \cos(S_ANG) OP \cos(T_ANG) \cdot \sin(S_ANG)`

Now we just need to evaluate each term.

`\qquad \sin(T_ANG) = \dfrac{Opposite}{Hypotenuse} = \dfrac{OPPOSITE_NAME} {HYPOTENUSE_NAME} = TERM1`

`\qquad \cos(S_ANG) = TERM2`

`\qquad \cos(T_ANG) = \dfrac{Adjacent}{Hypotenuse} = \dfrac{ADJACENT_NAME} {HYPOTENUSE_NAME} = TERM3`

`\qquad \sin(S_ANG) = TERM4`

Putting it together, we get

`\qquad TERM1 \cdot TERM2 OP TERM3 \cdot TERM4 = ANS_DISPLAY`

[ADJACENT_VALUE, HYPOTENUSE_VALUE, "\\dfrac{"+ADJACENT_VALUE+"}{"+HYPOTENUSE_VALUE+"}"] (function() { switch(S_ANGLE) { case 30: return [Math.sqrt(3),2,"\\dfrac{\\sqrt{3}}{2}"]; case 45: return [Math.sqrt(2),2,"\\dfrac{\\sqrt{2}}{2}"]; case 60: return [1,2,"\\dfrac{1}{2}"]; case 90: return [0,1,"0"]; case 180: return [1,-1,"-1"]; case 270: return [0,1,"0"]; } })() [OPPOSITE_VALUE, HYPOTENUSE_VALUE, "\\dfrac{"+OPPOSITE_VALUE+"}{"+HYPOTENUSE_VALUE+"}"] (function() { switch(S_ANGLE) { case 30: return [1,2,"\\dfrac{1}{2}"]; case 45: return [Math.sqrt(2),2,"\\dfrac{\\sqrt{2}}{2}"]; case 60: return [Math.sqrt(3),2,"\\dfrac{\\sqrt{3}}{2}"]; case 90: return [1,1,"1"]; case 180: return [0,1,"0"]; case 270: return [1,-1,"-1"]; } })() formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP2) [formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP2), formatRadicalFraction(T3N,T3D,T2N,T2D,T1N,T1D,T4N,T4D,OP2), formatRadicalFraction(T1N,T1D,T2N,T2D,T3N,T3D,T4N,T4D,OP), formatRadicalFraction(T3N,T3D,T2N,T2D,T1N,T1D,T4N,T4D,OP)]

`\cos(T_ANG OP S_ANG) = \; ?`

betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
`ANS_DISPLAY`

- `op`

We don't know what `T_ANG` is exactly, so we can't directly evaluate this function. We do know what `\cos(T_ANG)` is, though.

To simplify this formula to something we can use, we try the cosine addition/subtraction identity: `\cos(x \pm y) = \cos x \cdot \cos y \mp \sin x \cdot \sin y`

In this case, we have

`\qquad \cos(T_ANG OP S_ANG) =`
`\qquad\qquad \cos(T_ANG) \cdot \cos(S_ANG) OP2 \sin(T_ANG) \cdot \sin(S_ANG)`

Now we just need to evaluate each term.

`\qquad \cos(T_ANG) = \dfrac{Adjacent}{Hypotenuse} = \dfrac{ADJACENT_NAME} {HYPOTENUSE_NAME} = TERM1`

`\qquad \cos(S_ANG) = TERM2`

`\qquad \sin(T_ANG) = \dfrac{Opposite}{Hypotenuse} = \dfrac{OPPOSITE_NAME} {HYPOTENUSE_NAME} = TERM3`

`\qquad \sin(S_ANG) = TERM4`

Putting it together, we get

`\qquad TERM1 \cdot TERM2 OP2 TERM3 \cdot TERM4 = ANS_DISPLAY`

shuffle(randFromArray([[3,4], [6,8], [1,3], [2, 3], [2, 4], [3, 4]])) formattedSquareRootOf(AC * AC + BC * BC) sqrt(AC * AC + BC * BC) "\\dfrac{"+OPPOSITE_VALUE+"}{"+HYPOTENUSE_VALUE+"}" "\\dfrac{"+ADJACENT_VALUE+"}{"+HYPOTENUSE_VALUE+"}" fraction(2*OPPOSITE_VALUE*ADJACENT_VALUE, Math.round(Math.pow(HYPOTENUSE_NUMBER,2)),true,true) 2*OPPOSITE_VALUE*ADJACENT_VALUE/ Math.round(Math.pow(HYPOTENUSE_NUMBER,2))

`\sin(2 \cdot T_ANG) = \; ?`

betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
ANS

We don't know what `T_ANG` is exactly, so we can't compute `2 \cdot T_ANG` to directly evaluate this function. We do know what `\sin( T_ANG)` and `\cos(T_ANG)` are, though.

To simplify this formula to something we can use, we try the sine double-angle identity: `\sin(2x) = 2 \sin (x) \cos (x)`

In this case, we have

`\qquad \sin(2 \cdot T_ANG) = 2 \sin(T_ANG) \cos(T_ANG)`

(To cut down on the number of identities you have to memorize, you can derive this quickly from the angle addition identity for sine) [ Show how]

Start with the sine angle addition identity:

`\qquad \sin(x + y) = \sin(x) \cdot \cos(y) + \cos(x) \cdot \sin(y)`

Now take the case where `x = y`:

`\qquad \sin(x + y) = \sin(x + x) = \sin(x) \cdot \cos(x) + \cos(x) \cdot \sin(x)`

`\qquad \sin(2x) = 2 \sin(x) \cos(x)`

Now we just need to evaluate each term.

`\qquad \sin(T_ANG) = \dfrac{Opposite}{Hypotenuse} = \dfrac{OPPOSITE_NAME} {HYPOTENUSE_NAME} = TERM1`

`\qquad \cos(T_ANG) = \dfrac{Adjacent}{Hypotenuse} = \dfrac{ADJACENT_NAME} {HYPOTENUSE_NAME} = TERM2`

Putting it together, we get

`\qquad 2 \cdot TERM1 \cdot TERM2 = ANS_DISPLAY`

shuffle(randFromArray([[3,4], [6,8], [1,3], [2, 3], [2, 4], [3, 4]])) formattedSquareRootOf(AC * AC + BC * BC) sqrt(AC * AC + BC * BC) "\\dfrac{"+Math.pow(ADJACENT_VALUE,2) +"}{"+Math.round(Math.pow(HYPOTENUSE_NUMBER,2))+"}" "\\dfrac{"+Math.pow(OPPOSITE_VALUE,2) +"}{"+Math.round(Math.pow(HYPOTENUSE_NUMBER,2))+"}" fraction(Math.pow(ADJACENT_VALUE,2) -Math.pow(OPPOSITE_VALUE,2), Math.round(Math.pow(HYPOTENUSE_NUMBER,2)),true,true) (Math.pow(ADJACENT_VALUE,2)-Math.pow(OPPOSITE_VALUE,2))/ Math.round(Math.pow(HYPOTENUSE_NUMBER,2))

`\cos(2 \cdot T_ANG) = \; ?`

betterTriangle(BC, AC, "A", "B", "C", BC, AC, AB);
ANS

We don't know what `T_ANG` is exactly, so we can't compute `2 \cdot T_ANG` to directly evaluate this function. We do know what `\sin( T_ANG)` and `\cos(T_ANG)` are, though.

To simplify this formula to something we can use, we try the cosine double-angle identity: `\cos(2x) = \cos^2 (x) - \sin^2 (x)`

In this case, we have

`\qquad \cos(2 \cdot T_ANG) = \cos^2(T_ANG) - \sin^2(T_ANG)`

(To cut down on the number of identities you have to memorize, you can derive this quickly from the angle addition identity for cosine) [ Show how]

Start with the cosine angle addition identity:

`\qquad \cos(x + y) = \cos(x) \cdot \cos(y) - \sin(x) \cdot \sin(y)`

Now take the case where `x = y`:

`\qquad \cos(x + y) = \cos(x + x) = \cos(x) \cdot \cos(x) - \sin(x) \cdot \sin(x)`

`\qquad \cos(2x) = \cos^2(x) - \sin^2(x)`

Now we just need to evaluate each term.

`\qquad \cos^2(T_ANG) = \left(\dfrac{Adj}{Hyp}\right)^2 = \left(\dfrac{ADJACENT_NAME} {HYPOTENUSE_NAME}\right)^2 = \left(\dfrac{ADJACENT_VALUE} {HYPOTENUSE_VALUE}\right)^2 = TERM1`

`\qquad \sin^2(T_ANG) = \left(\dfrac{Opp}{Hyp}\right)^2 = \left(\dfrac{OPPOSITE_NAME} {HYPOTENUSE_NAME}\right)^2 = \left(\dfrac{OPPOSITE_VALUE} {HYPOTENUSE_VALUE}\right)^2 = TERM2`

Putting it together, we get

`\qquad TERM1 - TERM2 = ANS_DISPLAY`