[npl] / branches / UWSP / SS4e / Chapter_02 / Section_07 / SS4e_02_07_020.pg Repository:
ViewVC logotype

View of /branches/UWSP/SS4e/Chapter_02/Section_07/SS4e_02_07_020.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2557 - (download) (annotate)
Tue Nov 1 02:43:54 2011 UTC (18 months, 3 weeks ago) by nwodarz
File size: 2311 byte(s)
Importing Section 2.7 files

    1 ##DESCRIPTION
    2 ##   Mathematical modeling -- wire divided into triangle and circle
    3 ##ENDDESCRIPTION
    4 
    5 ##KEYWORDS('modeling','optimization')
    6 
    7 ## DBsubject('Algebra')
    8 ## DBchapter('Functions')
    9 ## DBsection('Modeling with Functions')
   10 ## Author('Nathan Wodarz')
   11 ## Institution('UWSP')
   12 ## TitleText1('Precalculus Enhanced with Graphing Utilities')
   13 ## EditionText1('4')
   14 ## AuthorText1('Sullivan, Sullivan')
   15 ## Section1('2.7')
   16 ## Problem1('20')
   17 #
   18 # First comes some stuff that appears at the beginning of every problem
   19 #
   20 
   21 DOCUMENT();        # This should be the first executable line in the problem.
   22 
   23 loadMacros(
   24 # Always call these
   25 "PGstandard.pl",
   26 "MathObjects.pl",
   27 "PGcourse.pl",
   28 "PGunion.pl",
   29 # Extra calls for this problem
   30 "parserNumberWithUnits.pl",
   31 "parserFormulaWithUnits.pl",
   32 );
   33 
   34 
   35 
   36 TEXT(&beginproblem);
   37 $showPartialCorrectAnswers = 1;
   38 
   39 $length = random(5,100,5);
   40 
   41 Context()->flags->set(limits=>[0,$length]);
   42 
   43 $area = Formula("x/2*sqrt(x^2-(x/2)^2) + ($length - 3 x)^2/(4*pi)");
   44 
   45 $min_x = (3*$length)/(9 + sqrt(3)*pi) - sqrt(-sqrt(3)*$length**2*pi + (
   46   36*sqrt(3)*$length**2*pi+12*$length**2*pi**2)/(36 + 4*sqrt(3)*pi))/(9 + sqrt(3)*pi);
   47 
   48 ###################################
   49 # Main text
   50 
   51 Context()->texStrings;
   52 
   53 BEGIN_TEXT
   54 A wire $length meters long is to be cut into two pieces. One piece will be shaped as an equilateral triangle, and the other piece will be shaped as a circle.$PAR
   55 Express the total area \(A\) enclosed by the pieces of wire as a function of the length \(x\) of a side of the equilateral triangle. \(A(x) = \) \{ans_rule(40)\} (Use appropriate \{helpLink('units')\})$PAR
   56 What is the domain of \(x\)? \{ans_rule(10)\} (Use \{helpLink('interval notation')\})$PAR
   57 Graph \(A = A(x)\). For what value of \(x\) is \(A\) smallest? \(x = \) \{ans_rule(10)\} (Use appropriate \{helpLink('units')\})$PAR
   58 What is the minimum value of \(A\)? \(A = \) \{ans_rule(10)\} (Use appropriate \{helpLink('units')\})$PAR
   59 END_TEXT
   60 Context()->normalStrings;
   61 
   62 ###################################
   63 # Answer checking
   64 
   65 ANS(FormulaWithUnits($area,"m^2")->cmp);
   66 Context("Interval");
   67 ANS(Compute("(0,$length/3)")->cmp);
   68 ANS(NumberWithUnits($min_x,"m")->cmp);
   69 ANS(NumberWithUnits($area->eval(x=>$min_x),"m")->cmp);
   70 
   71 END_PROBLEM();
   72 ENDDOCUMENT();

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9