-
-
Notifications
You must be signed in to change notification settings - Fork 436
Expand file tree
/
Copy pathjj1.pg
More file actions
78 lines (57 loc) · 1.9 KB
/
Copy pathjj1.pg
File metadata and controls
78 lines (57 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
## DESCRIPTION
## Algebra
## ENDDESCRIPTION
## Tagged by cmd6a 8/6/06
## DBsubject(Algebra)
## DBchapter(Polynomial equations and functions)
## DBsection(Graphs of polynomials)
## Institution(ASU)
## MLT(Incr_Decr)
## Level(2)
## KEYWORDS('algebra','function','graph','increasing', 'graphs', 'functions')
#
# First comes some stuff that appears at the beginning of every problem
#
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"PGgraphmacros.pl",
"PGasu.pl",
"extraAnswerEvaluators.pl",
"PGcourse.pl"
);
TEXT(beginproblem());
$a = random(-7,-1);
$b = random(1,7);
$c = random(1, 3.5, 0.01);
$up = random(-2,2,0.01);
($x1dom, $y1dom, $x2dom, $y2dom) = (10,10, 10, 10);
($xgrid, $ygrid) = ($x1dom+$x2dom,$y1dom+$y2dom);
$graph = init_graph(-$x1dom,-$y1dom,$x2dom,$y2dom,
'axes'=>[0,0],
'grid'=>[$xgrid,$ygrid],
'size'=>[400,400]);
$f = FEQ("$c*(((2*(x-$a)/($b-$a)-1))**3 - 3*((2*(x-$a)/($b-$a)-1))) for x in <-$x1dom,$x2dom> using color:blue and weight:2");
($fref) = plot_functions( $graph, $f);
# Label some points
#$label1 = new Label(0,$a, "$a",'black','right');
#$label2 = new Label($period, 0, "($period,0)",'black','left');
#$d = -$a;
#$label3 = new Label(0,$d,"$d",'black','right');
#$graph->lb($label1, $label2, $label3);
BEGIN_TEXT
Consider the function shown in the following graph.
$BR
\{ image(insertGraph($graph),
alt=>"Graph of a sinusoidal function oscillating between a positive maximum and negative minimum, used to identify intervals where the function is decreasing."
) \} $PAR
$BBOLD Note: $EBOLD you can click on the graph to enlarge it.
$PAR
Where is the function decreasing?
$BR
\{ans_rule(40)\}
$BR $BBOLD Note: $EBOLD use interval notation to enter your answer.
END_TEXT
ANS(interval_cmp("($a,$b)", sloppy=>'yes'));
ENDDOCUMENT(); # This should be the last executable line in the problem.