Degrees in Trigonometric Functions

Trigonometry: trig functions in degrees using context TrigDegrees

Complete Code

Download file: TrigDegrees.pg

POD for Macro Files

PG problem file

Explanation

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

BEGIN_PGML
1. [`\sin(30^{\circ})=`] [___]{$ans1}
2. [`\arcsin(1/2)=`] [___]{$ans2}

Interpret arguments of the sine and arcsine in terms of degrees.
END_PGML

Statement

Since this is in degrees, you should tell the students this.

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.