[npl] / trunk / NationalProblemLibrary / Union / setIntSurfaceArea / ur_in_27_4.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Union/setIntSurfaceArea/ur_in_27_4.pg

Fri Jun 18 12:54:22 2010 UTC (3 years ago) by gage
File size: 1910 byte(s)
`Adding COMMENT('MathObject version') to files loading MathObjects.pl`

```    1 ## DESCRIPTION
2 ##   Calculate a Surface Area of a Solid of Revolution
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Surface Area', 'Solid of Revolution', 'Rotate Curve')
6 ## Tagged by nhamblet
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Applications of Integration')
10 ## DBsection('Solids of Revolution')
11 ## Date('8/23/07')
12 ## Author('')
13 ## Institution('Union')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19 ## TitleText2('Calculus: Early Transcendentals')
20 ## EditionText2('1')
21 ## AuthorText2('Rogawski')
22 ## Section2('6.3')
23 ## Problem2('11')
24
25 DOCUMENT();        # This should be the first executable line in the problem.
26
28   "PGstandard.pl",
29   "PGunion.pl",            # Union College utilities
30   "MathObjects.pl",
31   "PGcourse.pl",           # Customization file for the course
32 );
33
34 TEXT(beginproblem());
35
36 ###################################
37 # Setup
38
39 \$a = random(2,6,1);
40 \$b = random(1,9,1);
41
43 \$curve=Formula("\$a e^{2y}");
44 \$left=0;
45 \$right=\$b;
46
47 ###################################
48 # Main text
49
50 Context()->texStrings;
51 BEGIN_TEXT
52
53 Find the area of the surface obtained by rotating the curve
54 \[x = \$curve\]
55 from \(y = \$left\) to \(y= \$right\) about the \(y\)-axis.
56 \$PAR
57
58 The area is \{ans_rule(50)\} square units.
59
60 END_TEXT
61 Context()->normalStrings;
62
63 ###################################
65
67 Context()->flags->set(tolerance => .001, reduceConstants=>0, reduceConstantFunctions => 0);
68
69 ## In this problem, need to integrate 2pi * ae^(2y) * sqrt(1+(2ae^(2y))^2 ).
70 ## Do this by 'u-sub': u=2ae^(2y) so then need to integrate pi/2 * sqrt(1+u^2) ...
71
72 \$u = "2*\$a*exp(2*\$b)";
73 \$v = "2*\$a";
74 \$c = "sqrt(1+{\$u}**2)";
75 \$d = "sqrt(1+{\$v}**2)";
76
77 \$answer = "(pi/4) * ((\$u*\$c+ln(\$u+\$c)) - (\$v*\$d+ln(\$v+\$d)))";
78