Displays values of trig functions on the unit circle
Download file: SpecialTrigValues.pg
DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'specialTrigValues.pl', 'PGcourse.pl');
Preamble
We load the specialTrigValues.pl
macro to use exact values on the unit circle.
($d, $n) = random_coprime([ 2, 3, 4, 6 ], [ 1 .. 12 ]); $r = random(2, 3); $c = specialRadical("$r cos($n pi/$d)"); $s = specialRadical("$r sin($n pi/$d)"); $x = list_random(sqrt(3) / 2, sqrt(2) / 2, 1 / 2); $a = specialAngle(arcsin($x)); Context("Complex"); $z = specialRadical("$r exp($n pi i/$d)");
Setup
The random_coprime
function selects two random numbers that are coprime from the list. This will give fractions with denominators of 2,3,4 or 6.
The specialRadical
function returns a MathObject in the form a sqrt(b)/c
were b, c come from a list of integers (defaults to [1,2,3]
).
It is noted that specialRadical
has a complex form as well.
The specialAngle
function returns a MathObject in the form a pi/c
where a in an integer and c
comes from a list (defaults to [1,2,3,4,6]
).
BEGIN_PGML Evaluate the following: a) [`[$r] \cos([$n] \pi/[$d])=`] [_]{$c} b) [`[$r] \sin([$n] \pi/[$d])=`] [_]{$s} c) [`[$r] \exp([$n] \pi/[$d])=`] [_]{$z} d) [`\arcsin([$x])=`] [_]{$a} END_PGML
Statement
This is the problem statement in PGML.BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.