# publicKhan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

file 94 lines (75 sloc) 4.322 kb
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94         Inverse trig functions

This exercise covers inverses of trig functions.

random() < 0.5                        random() < 0.5            randFromArray([ "sin", "cos", "tan" ])            "\\" + FN + "^{-1}"            "\\arc" + FN            function( x, arc ) {                return ( ( typeof arc === "undefined" ? ARC : arc ) ? FN_ARC : FN_INV ) + "\\left(" + x + "\\right)";            }            [ 0, 1/2, sqrt(2)/2, sqrt(3)/2 ]            [ 0, sqrt(3)/3, 1, sqrt(3) ]            ( random() < 0.5 ? -1 : 1 ) * {                sin: randFromArray( SIN_RANGE ),                cos: randFromArray( SIN_RANGE ),                tan: randFromArray( TAN_RANGE )            }[ FN ]            {                sin: asin,                cos: acos,                tan: atan            }[ FN ]( X )            round( Y * 180 / PI )            KhanUtil.toFraction( Y / Math.PI, 0.001 )                        ( Y_DEGREES === 0 ? "^(\\s*0*\\s*)|" : "^" ) + Y_DEGREES + "\\s*[Dd][Ee][Gg]([Rr][Ee][Ee][Ss])?\\s*\$"            function( n ) {                var sign = n < 0 ? "-" : "";                n = abs( n );                var o = {};                o[ 1/2 ] = "\\frac{1}{2}";                o[ sqrt(2)/2 ] = "\\frac{\\sqrt{2}}{2}";                o[ sqrt(3)/2 ] = "\\frac{\\sqrt{3}}{2}";                o[ sqrt(3)/3 ] = "\\frac{\\sqrt{3}}{3}";                o[ sqrt(3) ] = "\\sqrt{3}";                return sign + ( o[n] || n );            }            {                sin: [ DEG ? "-90°" : "-\\frac{\\pi}{2}", DEG ? "90°" : "\\frac{\\pi}{2}" ],                cos: [ "0", DEG ? "180°" : "\\pi" ],                tan: [ DEG ? "-90°" : "-\\frac{\\pi}{2}", DEG ? "90°" : "\\frac{\\pi}{2}" ]            }[ FN ]

What is the principal value of FN_TEX( PRETTY( X ) )?

Y_DEGREES_REGEX

Y

FN_TEX( PRETTY( X ) ) = FN_TEX( PRETTY( X ), false )

If FN_TEX( PRETTY( X ), false ) = \theta, then...

"\\" + FN\left( \theta \right) = PRETTY( X )

The range of FN_TEX( "x" ) is [ DOMAIN[0], DOMAIN[1] ], so we know DOMAIN[0] \leq \theta \leq DOMAIN[1].

"\\" + FN \left( ( DEG ? Y_DEGREES + "°" : fractionReduce( Y_RADIANS[0], Y_RADIANS[1], true ) + "\\pi" ) \right) = PRETTY( X )

So FN_TEX( PRETTY( X ) ) = DEG ? Y_DEGREES + "°" : fractionReduce( Y_RADIANS[0], Y_RADIANS[1], true ) + "\\pi".

Something went wrong with that request. Please try again.