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

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

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


    1 ## DESCRIPTION
2 ##   Convert Spherical to Cylindrical Coordinates
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Coordinate', 'Spherical', '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(-5,5,1); 35$c1 = random(1,5,1);
36 $pi = arccos(-1); 37 38 39 BEGIN_TEXT 40$PAR
41  What are the cylindrical coordinates of the point whose spherical coordinates
42  are $BR $$(a1 ,\ b1 ,\ \frac{c1 \pi}{6} )$$ ? 43$PAR
44 $BR 45 $$r$$ = \{ans_rule(40)\}$BR
46 $$\theta$$ = \{ans_rule(40)\} $BR 47 $$z$$= \{ans_rule(40)\}$BR
48 END_TEXT
49
50
51 $ans0 =$a1*sin($c1*$pi/6);
52 $ans1 =$b1 ;
53 $ans2 =$a1*cos($c1*$pi/6);;
54
55
56 ANS(num_cmp($ans0)); 57 ANS(num_cmp($ans1));
58 ANS(num_cmp(\$ans2));
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.