Trigonometry: trig functions in degrees using context TrigDegrees
Download file: TrigDegrees.pg
DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'contextTrigDegrees.pl', 'PGcourse.pl');
Preamble
We load the contextTrigDegrees.pl
macro to help with trig functions with degrees.
Context('TrigDegrees'); $ans1 = Compute("sin(30)"); $ans2 = Compute("arcsin(0.5)");
Setup
To override the WeBWorK default of evaluating trig functions in radians, use the TrigDegrees
context, which redefines the standard trig functions to be in degrees, both in any formulas that appear later in the PG code and in any formulas that students enter in answer blanks.
These redefined functions allow students to enter inverse functions using syntax such as atan(x)
, or arctan(x)
, or tan^(-1)(x)
. You may want to mention the syntax options in the main text section of the problem.
BEGIN_PGML 1. [`\sin(30)=`] [___]{$ans1} 2. [`\arcsin(1/2)=`] [___]{$ans2} Interpret arguments of the sine and arcsine in terms of degrees. END_PGML
Statement
This is the problem statement in PGML.BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION COMMENT("Redefines trig functions to be in degrees (not radians)."); ENDDOCUMENT();
Solution
A solution should be provided here.