[npl] / trunk / NationalProblemLibrary / ASU-topics / setOptimization / di1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/ASU-topics/setOptimization/di1.pg

Sat Jun 3 14:35:45 2006 UTC (6 years, 11 months ago) by gage
File size: 1906 byte(s)
 Cleaned code with convert-functions.pl script


    1 ## DESCRIPTION
2 ## Optimization
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Optimization' 'Maximum' 'Minimum')
6 ## Tagged by tda2d
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Applications of Differentiation')
10 ## DBsection('Optimization Problems')
11 ## Date('')
12 ## Author('')
13 ## Institution('ASU')
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            "PGbasicmacros.pl",
24            "PGchoicemacros.pl",
26            "PGauxiliaryFunctions.pl",
28 );
29
30 $a = random(6,12,2); 31$b = random(14,20,2);
32 $x = (($a + $b)-sqrt(($a+$b)**2 - 3*$a*$b))/6; 33$V = "($a - 2 * x)($b - 2 *x)x";
34 $c =$a / 2;
35 $vol = ($a - 2 * $x) * ($b - 2 * $x) *$x;
36
37 TEXT(beginproblem());
38
39 $showPartialCorrectAnswers = 1; 40 41 TEXT(EV2(<<EOT)); 42 A box is to be made out of a$a cm by $b cm piece of cardboard. Squares 43 of side length $$x$$ cm will be cut out of each corner, and then the ends 44 and sides will be folded up to form a box with an open top. 45$PAR
46 (a) Express the volume $$V$$ of the box as a function of $$x$$.
47 $BR$BR
48 $$V =$$ \{ans_rule(60)\} $$\textrm{cm}^3$$
49 $PAR 50 (b) Give the domain of $$V$$ in interval notation. (Use the fact that length and volume must be positive.) 51$BR$BR 52 \{ans_rule(40)\} 53$PAR
54 (c) Find the length $$L$$, width $$W$$, and height $$H$$ of the resulting
55 box that maximizes the volume.  (Assume that $$W \leq L$$).
56 $BR$BR
57 $$L$$ = \{ans_rule(20)\} cm
58 $BR 59$BR
60 $$W$$ = \{ans_rule(20)\} cm
61 $BR 62$BR
63 $$H$$ = \{ans_rule(20)\} cm
64 $PAR 65 (d) The maximum volume of the box is \{ans_rule(30)\} $$\textrm{cm}^3$$. 66 EOT 67 @answers = (num_cmp($b - 2*$x), num_cmp($a - 2*$x) , num_cmp($x), num_cmp($vol)); 68 69 ANS(fun_cmp($V));
70 ANS(interval_cmp("(0, \$c)"));