[npl] / trunk / NationalProblemLibrary / ASU-topics / setOptimization / di1.pg Repository:
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 268 - (download) (annotate)
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 
   22 loadMacros("PG.pl",
   23            "PGbasicmacros.pl",
   24            "PGchoicemacros.pl",
   25            "PGanswermacros.pl",
   26            "PGauxiliaryFunctions.pl",
   27 "extraAnswerEvaluators.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)"));
   71 ANS(@answers);
   72 
   73 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9