[npl] / trunk / NationalProblemLibrary / Rochester / setVectors5Coordinates / urvc_3_2.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setVectors5Coordinates/urvc_3_2.pg

Wed May 10 16:17:05 2006 UTC (7 years, 1 month ago) by jjholt
File size: 1250 byte(s)
Added tags.


    1 ## DESCRIPTION
2 ##   Rectangular to Cylindrical Coordinates
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Coordinate', 'Rectangular', 'Cylindrical')
6 ## Tagged by nhamblet
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Vectors and the Geometry of Space')
10 ## DBsection('Cylindrical and Spherical Coordinates')
11 ## Date('5/30/2000')
12 ## Author('Joseph Neisendorfer')
13 ## Institution('Rochester')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl"
28 );
29
30 TEXT(beginproblem());
31 $showPartialCorrectAnswers = 1; 32 33$a1 = random(1,5,1);
34 $b1 = random(1,5,1); 35$c1 = random(-5,5,1);
36
37 BEGIN_TEXT
38 $PAR 39 What are the cylindrical coordinates of the point whose rectangular coordinates 40 are $$(x= a1 ,\ y= b1 ,\ z= c1 )$$ ? 41$PAR
42 $BR 43 $$r$$ = \{ans_rule(30)\}$BR
44 $$\theta$$  = \{ans_rule(30)\} $BR 45 $$z$$ = \{ans_rule(30)\}$BR
46 END_TEXT
47
48
49 $ans0 = ($a1*$a1+$b1*$b1)**.5 ; 50$ans1 =  arctan($b1/$a1) ;
51 $ans2 =$c1 ;
52
53
54 ANS(num_cmp($ans0)); 55 ANS(num_cmp($ans1));
56 ANS(num_cmp(\$ans2));
57
58 ENDDOCUMENT();        # This should be the last executable line in the problem.