[npl] / trunk / NationalProblemLibrary / Rochester / setPolarCoord1Points / ur_pc_1_2.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setPolarCoord1Points/ur_pc_1_2.pg

Tue May 9 13:07:16 2006 UTC (7 years ago) by jjholt
File size: 3889 byte(s)
Added tags.


    1 ## DESCRIPTION
2 ## Calculus
3 ## ENDDESCRIPTION
4
5
6 ## KEYWORDS('Polar Coordinates')
7 ## Tagged by tda2d
8
9 ## DBsubject('Calculus')
10 ## DBchapter('Parametric Equations and Polar Coordinates')
11 ## DBsection('Polar Coordinates')
12 ## Date('')
13 ## Author('')
14 ## Institution('Rochester')
15 ## TitleText1('')
16 ## EditionText1('')
17 ## AuthorText1('')
18 ## Section1('')
19 ## Problem1('')
20
21 DOCUMENT();        # This should be the first executable line in the problem.
22
24 "PG.pl",
25 "PGbasicmacros.pl",
26 "PGchoicemacros.pl",
28 "PGauxiliaryFunctions.pl"
29 );
30
31 TEXT(beginproblem());
32 $showPartialCorrectAnswers = 0; 33$pi = 4*arctan(1);
34 $r05 = non_zero_random(-4,4); 35$r1 = 2*$r05; #so r1,r2 r3 are even 36$r2 = $r1; 37$r3 = $r1; 38$r35 = non_zero_random(-4,4);
39 $r4 = 2*$r35;                      #so r4 is even
40 $r5 =$r1 + 3;                     #so r5 is odd
41 $r55 = non_zero_random(-4,4); 42$r6 = 2*$r55; #so r6,r7 are even 43$r7 = $r2; 44 45$t1 = 1;
46 $t15 = random(-3,3); 47$t2 = non_zero_random(-8,8,4) + 1;    #so t2 is odd (ne t1 mod4)
48 $t3 = random(2,8) * random(-1,1,2); 49$t35 = non_zero_random(-4,3);
50 $t4 = 3*$t35 + 1;                  #so t4 is 1 mod 3
51 $t5 = 3*$t35 + 5;                  # so t5 is 2 mod 3
52 $t55 = non_zero_random(-2,2); 53$t6 = 6*$t55 - 1; #so t6 is 5mod 6 54$t7 = 6*$t55 + 1; #so t7 is 1mod 6 55 56$x1 = ($r1) * cos ($t1 * $pi/4) /sqrt(2); 57$x2 = ($r2) * cos ($t2 * $pi/4) /sqrt(2); 58$x3 = ($r3) * cos ($t3 * $pi/2) ; 59 if (abs($t3-int($t3/2)*2)>0) {$x3=0;} # if t3 is odd then x3=0
60 $x4 = ($r4) * cos ($t4 *$pi/3) ;
61 $x5 = ($r5) * cos ($t5 *$pi/3) ;
62 $x6 = ($r6) * cos ($t6 *$pi/6) /sqrt(3) ;
63 $x7 = ($r7) * cos ($t7 *$pi/6) /sqrt(3) ;
64
65 $y1 = ($r1) * sin (($t1) * ($pi/4)) /sqrt(2) ;
66 $y2 = ($r2) * sin (($t2) * ($pi/4)) /sqrt(2) ;
67 $y3 = ($r3) * sin (($t3) * ($pi/2)) ;
68 $y4 = ($r4) * sin (($t4) * ($pi/3)) /sqrt(3) ;
69 $y5 = ($r5) * sin (($t5) * ($pi/3)) /sqrt(3) ;
70 $y6 = ($r6) * sin (($t6) * ($pi/6)) ;
71 $y7 = ($r7) * sin (($t7) * ($pi/6)) ;
72
73 $questStr1 =EV2( " $$( r1 , \frac{t1 \pi}{4} )$$"); 74$ansStr1 = EV2(   '$$( \{spf(x1, "%5.0f")\} \sqrt{2}, 75 \{spf(y1,"%5.0f") \} \sqrt{2} )$$');
76
77 $questStr2 = EV2( " $$( r2 , \frac{t2 \pi}{4} )$$"); 78$ansStr2 = EV2(   '$$( \{spf(x2, "%5.0f")\} \sqrt{2}, 79 \{spf(y2,"%5.0f") \} \sqrt{2} )$$');
80
81 $questStr3 =EV2( " $$( r3 , \frac{t3 \pi}{2} )$$"); 82$ansStr3 = EV2(   '$$( \{spf(x3, "%5.0f")\} , \{spf(y3,"%5.0f") \} )$$');
83
84 $questStr4 =EV2( " $$( r4 , \frac{t4 \pi}{3} )$$"); 85$ansStr4 = EV2(   '$$( \{spf(x4, "%5.0f")\} , \{spf(y4,"%5.0f") \} \sqrt{3})$$');
86
87 $questStr5 =EV2( " $$( r5 , \frac{t5 \pi}{3} )$$"); 88$ansStr5 = EV2(   '$$( \{spf(x5, "%5.1f")\} , \{spf(y5,"%5.1f") \} \sqrt{3})$$');
89
90 $questStr6 =EV2( " $$( r6 , \frac{t6 \pi}{6} )$$"); 91$ansStr6 = EV2(   '$$( \{spf(x6, "%5.0f")\} \sqrt{3} , 92 \{spf(y6,"%5.0f") \} )$$');
93
94 $questStr7 =EV2( " $$( r7 , \frac{t7 \pi}{6} )$$"); 95$ansStr7 = EV2(   '$$( \{spf(x7, "%5.0f")\} \sqrt{3} , 96 \{spf(y7,"%5.0f") \} )$$');
97
98 @questions =( $questStr1,$questStr2,$questStr3,$questStr4,$questStr5,$questStr6,$questStr7); 99 @answers =($ansStr1,$ansStr2,$ansStr3,$ansStr4,$ansStr5, $ansStr6,$ansStr7);
100
101 # Now randomize the questions:
102 @slice = &NchooseK(7,6);
103 @shuffle = &shuffle(scalar(@slice));
104
105 TEXT(EV2(<<EOT));
106 For each set of Polar coordinates $$(r,\theta )$$,
107 match the equivalent Cartesian coordinates $$(x,y)$$.
108 $BR 109 Don't use a calculator.$BR
110 EOT
111 TEXT(
112 &match_questions_list(@questions[@slice]),