# DESCRIPTION # solve [sic] arcsec(x) = nice # ENDDESCRIPTION DOCUMENT(); loadMacros( 'PGstandard.pl' , 'MathObjects.pl' , 'AnswerFormatHelp.pl' , 'PGcourse.pl' ) ; Context( 'Numeric' ) ; Context()->functions->disable('Trig'); Context()->flags->set( tolerance => 0.0000000000001, tolType => 'absolute' ); $k = random(1,2,1); #### restrict index to cases with display error $t = ( 0 , '\frac{\pi}{6}', '\frac{\pi}{4}', '\frac{\pi}{3}' )[$k]; $y = ( 1 , '2/sqrt(3)' , 'sqrt(2)' , '2' )[$k]; $ans = List( Compute( "$y" ) ); #### nothing shown for $sol $ans = Compute( "$y" ); #### $sol is decimal value Context()->texStrings ; TEXT(beginproblem()); BEGIN_TEXT Find all solutions to the equation \(\displaystyle \sec^{-1}(x) = $t . \) $BR $BR $BCENTER \( x = \) \{ ans_rule() \} \{ AnswerFormatHelp('number') \} $ECENTER END_TEXT Context()->normalStrings; $showPartialCorrectAnswers = 0 ; ANS( $ans -> cmp() ); $sol = $ans->{original_formula} ; Context()->texStrings; BEGIN_SOLUTION $SOLUTION \(\displaystyle \sec^{-1}(x) = $t \) $SPACE is equivalent to $SPACE \(\displaystyle x = \sec\left( $t \right) = $sol . \) END_SOLUTION Context()->normalStrings; ENDDOCUMENT();