[npl] / trunk / NationalProblemLibrary / Michigan / Chap16Sec4 / Q28.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Michigan/Chap16Sec4/Q28.pg

Tue Aug 24 14:40:25 2010 UTC (2 years, 8 months ago) by apizer
File size: 2262 byte(s)
Results of running convert_fun_in_dir.sh to clean up problems

    1 # DESCRIPTION
2 # Problem from Calculus, multi-variable, Hughes-Hallett et al.,
3 # originally from 5ed (with updates)
4 # WeBWorK problem written by Gavin LaRose, <glarose@umich.edu>
5 # ENDDESCRIPTION
6
7 ## KEYWORDS('polar coordinates', 'integral', 'calculus')
8 ## Tagged by glr 04/29/10
9
10
11 ## DBsubject('Calculus')
12 ## DBchapter('Multiple Integrals')
13 ## DBsection('Double Integrals in Polar Coordinates')
14 ## Date('')
15 ## Author('Gavin LaRose')
16 ## Institution('University of Michigan')
17 ## TitleText1('Calculus')
18 ## EditionText1('5')
19 ## AuthorText1('Hughes-Hallett')
20 ## Section1('16.4')
21 ## Problem1('28')
22
23 ## Textbook tags
24 ## HHChapter1('Integrating Functions of Several Variables')
25 ## HHSection1('Double Integrals in Polar Coordinates')
26
27 DOCUMENT();
28
30 "PGstandard.pl",
31 "PGchoicemacros.pl",
32 "MathObjects.pl",
33 "parserNumberWithUnits.pl",
34 # "parserFormulaWithUnits.pl",
35 # "parserFormulaUpToConstant.pl",
36 # "PGcourse.pl",
37 );
38
39 Context("Numeric");
40 $showPartialCorrectAnswers = 1; 41 42$rad = random(2,7,1);
43 $den = random(6,14,2); 44 45$mass = NumberWithUnits( "$den*pi*$rad^2/3", "g" );
46
47 Context()->texStrings;
48 TEXT(beginproblem());
49 BEGIN_TEXT
50
51 A disk of radius $rad cm has density$den g/cm$${}^2$$  at
52 its center, density 0 at its edge, and its density is a linear
53 function of the distance from the center. Find the mass of the disk.
54
55 $PAR 56 mass = \{ ans_rule(35) \} 57$BR
58 ${BITALIC}(Include \{helpLink('units')\}.)$EITALIC
59
60 END_TEXT
61 Context()->normalStrings;
62
63 ANS($mass->cmp() ); 64 65 ($dn,$dd) = reduce($den,$rad ); 66$dor = ( $dd==1 ) ?$dn : "\frac{$dn}{$dd}";
67 ($rn,$rd) = reduce( $rad*$rad, 3 );
68 $rsqo3 = ($rd == 1 ) ? $rn : "\frac{$rn}{$rd}"; 69 ($an,$ad) = reduce($den*$rad*$rad, 3 );
70 $ans = ($ad == 1 ) ? $an : "\frac{$an}{$ad}"; 71 72 Context()->texStrings; 73 SOLUTION(EV3(<<'END_SOLUTION')); 74$PAR SOLUTION \$PAR
75
76 The density function is given by
77 $\rho(r) = dor(rad - r),$
78 where $$r$$ is the distance from the center of the disk.
79 So the mass of the disk in grams is
80 $81 \int_R \rho(r)\,dA = \int_0^{2\pi} \int_0^{rad} dor(rad - r)rdr\,d\theta 82 = dor \int_0^{2\pi} (rado2\,r^2 - \frac13\,r^3)\bigg|_0^{rad}\,d\theta 83$
84 $85 = dor \int_0^{2\pi} rsqo3 \,d\theta 86 = ans \mbox{ g}. 87$
88
89
90 END_SOLUTION
91 Context()->normalStrings;
92
93
94 COMMENT('MathObject version');
95 ENDDOCUMENT();