Skip to content

TR5 Checkit #811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/precalculus/exercises/bank.xml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
<description>
Find exact values of trigonometric functions of special angles (30, 45, and 60).
</description>
</outcome>
</outcome> -->

<outcome>
<title>The Unit Circle</title>
Expand All @@ -366,7 +366,7 @@
</description>
</outcome>

<outcome>
<!-- <outcome>
<title>Properties of Sine and Cosine Graphs</title>
<slug>PF1</slug>
<path>outcomes/PF/PF1</path>
Expand Down
45 changes: 45 additions & 0 deletions source/precalculus/exercises/outcomes/TR/TR5/generator.sage
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
load("../../../source/common/sagemath/library.sage")
class Generator(BaseGenerator):
triples = sorted(TBIL.pythagorean_triples(max_length=50))
def data(self):

functions=sample([sin,cos,tan,sec,csc,cot],5)
angles=sample([i*pi/6 for i in [1..11]]+[(2*i+1)*pi/4 for i in [0..3]],3)
triple=choice(Generator.triples)
quadrant=choice(["I","II","III","IV"])
if quadrant=="I" or quadrant=="IV":
angles.append(arctan(triple[1]/triple[0]))
else:
angles.append(pi+arctan(triple[1]/triple[0]))
degrees=[True,False]
shuffle(degrees)

angle_strings= [ f"{latex(s*360/(2*pi))}"+r"^\circ" if degrees[i] else TBIL.typeset_angle(s) for i,s in enumerate(angles[:2])]
values=[functions[0](angles[0]),functions[1](angles[1]),functions[2](angles[2]),functions[3](angles[2]),functions[4](angles[3])]
for (i,v) in enumerate(values):
if v.is_infinity():
values[i]=r"\text{undefined}"
coordinate, coordinate_value =choice([("x",cos(angles[3])),("y",sin(angles[3]))])



return {
"task1": [ {"angle": angle_strings[i], "value": values[i], "f":functions[i].name()} for i in [0,1]],
"angle2": angles[2],
"point2": (cos(angles[2]),sin(angles[2])),
"task2": [ {"value": values[i], "f":functions[i].name()} for i in [2,3]],
"angle3": angles[3],
"quadrant3": quadrant,
"coordinate3": coordinate,
"coordinate3_value": simplify(coordinate_value),
"f3": functions[4].name(),
"value3": simplify(values[4])
}

@provide_data
def graphics(data):
p=TBIL.plot_angle(data["angle2"],label_unit_point=True,show_angle_value=r"$\theta$",show_unit_circle=True)
q=TBIL.plot_angle(data["angle3"],label_unit_point=("x","y"),show_angle_value=r"$\alpha$",show_unit_circle=True)

return {"plot2": p, "plot3": q
}
65 changes: 65 additions & 0 deletions source/precalculus/exercises/outcomes/TR/TR5/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version='1.0' encoding='UTF-8'?>
<knowl mode="exercise" xmlns="https://spatext.clontz.org" version="0.2">
<knowl>
<intro>
<p>
Compute an exact value (not a decimal approximation) for each of the following.
</p>
</intro>
<!--{{#task1}}-->
<knowl>
<content>
<p><m>\{{f}}\left({{angle}}\right)</m>.</p>
</content>
<outtro>
<p><m>\{{f}}\left({{angle}}\right)={{value}}</m>
</p>
</outtro>
</knowl>
<!--{{/task1}}-->
</knowl>
<knowl>
<intro>
<p>Let <m>\theta</m> be an angle drawn in standard position that intersects the unit circle at
<m>{{point2}}</m>.
</p>
<p>
<image
source="assets/TR5/generated/{{__seed__}}/plot2.png"
description="."
width="50%"/>
</p>
<p>
Compute an exact value (not a decimal approximation) for each of the following.
</p>
</intro>
<!--{{#task2}}-->
<knowl>
<content>
<p><m>\{{f}}(\theta)</m>.</p>
</content>
<outtro>
<p><m>\{{f}}(\theta)={{value}}</m>
</p>
</outtro>
</knowl>
<!--{{/task2}}-->
</knowl>
<knowl>
<content>
<p>Let <m>(x,y)</m> be a point on the unit circle that lies in Quadrant {{quadrant3}} with
an <m>{{coordinate3}}</m>-value of <m>{{coordinate3_value}}</m>. Let <m>\alpha</m> be the angle
in standard position that intersects the unit circle at this point.</p>
<p>
<image
source="assets/TR5/generated/{{__seed__}}/plot3.png"
description="."
width="50%"/>
</p>
<p>Compute <m>\{{f3}}(\alpha)</m>.</p>
</content>
<outtro>
<p><m>\{{f3}}(\alpha)={{value3}}</m></p>
</outtro>
</knowl>
</knowl>