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

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

Wed May 10 16:17:05 2006 UTC (7 years ago) by jjholt
File size: 1274 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(-5,-1,1);
34 $b1 = random(1,5,1); 35$c1 = random(-5,5,1);
36 $pi = arccos(-1); 37 38 BEGIN_TEXT 39$PAR
40  What are the cylindrical coordinates of the point whose rectangular coordinates
41  are $$(x= a1 ,\ y= b1 ,\ z= c1 )$$ ?
42 $PAR 43$BR
44 $$r$$ = \{ans_rule(20)\} $BR 45 $$\theta$$ = \{ans_rule(20)\}$BR
46 $$z$$ = \{ans_rule(20)\} $BR 47 END_TEXT 48 49 50$ans0 =  ($a1*$a1+$b1*$b1)**.5 ;
51 $ans1 = arctan($b1/$a1)+$pi ;
52 $ans2 =$c1 ;
53
54
55 ANS(num_cmp($ans0)); 56 ANS(num_cmp($ans1));
57 ANS(num_cmp(\$ans2));
58
59 ENDDOCUMENT();        # This should be the last executable line in the problem.


 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9