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 ) )?

Note: please answer in terms of degrees (ex: "180 deg" or "180 degrees")radians (ex: "3/4 pi").

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( fractionReduce( Y_RADIANS[0], Y_RADIANS[1], true )\pi \right) = PRETTY( X )

fractionReduce( Y_RADIANS[0], Y_RADIANS[1], true )\pi\mbox{ (radians) }=Y_DEGREES °

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