[npl] / trunk / NationalProblemLibrary / LoyolaChicago / Precalc / Chap9Sec5 / Q14.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/LoyolaChicago/Precalc/Chap9Sec5/Q14.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2461 - (download) (annotate)
Fri Oct 7 16:42:13 2011 UTC (19 months, 2 weeks ago) by glarose
File size: 3287 byte(s)
LoyolaChicago 9.5: 4e tagging, updates.

    1 # DESCRIPTION
    2 # Problem from Functions Modeling Change, Connally et al., 3rd ed.
    3 # WeBWorK problem written by Adam Spiegler, <aspiegler@luc.edu>
    4 # ENDDESCRIPTION
    5 
    6 ## DBsubject('Precalculus')
    7 ## DBchapter('Polynomial And Rational Functions')
    8 ## DBsection('The Short-Run Behavior Of Rational Functions')
    9 ## KEYWORDS('rational','fraction','polynomial,'asymptote','intercept')
   10 ## TitleText1('Functions Modeling Change')
   11 ## EditionText1('3')
   12 ## AuthorText1('Connally')
   13 ## Section1('9.5)
   14 ## Problem1('14')
   15 ## TitleText2('Functions Modeling Change');
   16 ## EditionText2('4')
   17 ## AuthorText2('Connally')
   18 ## Section2('11.5')
   19 ## Problem2('14')
   20 ## Author('Adam Spiegler and Paul Pearson')
   21 ## Institution('Loyola University Chicago and Fort Lewis College')
   22 
   23 DOCUMENT();
   24 
   25 loadMacros("PG.pl",
   26            "PGbasicmacros.pl",
   27 #           "PGchoicemacros.pl",
   28            "PGanswermacros.pl",
   29 #           "PGgraphmacros.pl",
   30            "PGauxiliaryFunctions.pl",
   31 #           "extraAnswerEvaluators.pl",
   32 "MathObjects.pl",
   33 "AnswerFormatHelp.pl",
   34 "PGcourse.pl",
   35            );
   36 
   37 TEXT(beginproblem());
   38 
   39 Context("Numeric");
   40 
   41 $showPartialCorrectAnswers = 1;
   42 
   43 $pick = random(0,1,1);
   44 $k = non_zero_random(1,9,2);
   45 $b = non_zero_random(2,10,2);
   46 
   47 $eqn = "\frac{$k-x}{(x-$b)^2}";
   48 
   49 if ($k > $b) {
   50    $right = "INFINITY";
   51    $right_sym = "\infty";
   52    $left = "INFINITY";
   53    $left_sym = "\infty"}
   54 else {
   55    $right = "-INFINITY";
   56    $left = "-INFINITY";
   57    $right_sym = "- \infty";
   58    $left_sym = "- \infty"};
   59 
   60 
   61 $d[0] = .001;
   62 $d[1] = .01;
   63 $d[2] = .1;
   64 $d[3] = 1;
   65 
   66 for ($i = 0; $i <= 3; $i++){
   67   $x[$i] = $b+$d[$i];
   68   $r[$i] = round(($k-$x[$i])/($x[$i]-$b)**2)};
   69 
   70 for ($i = 0; $i <= 3; $i++){
   71   $z[$i] = $b-$d[3-$i];
   72   $l[$i] = round(($k-$z[$i])/($z[$i]-$b)**2)};
   73 
   74 Context()->texStrings;
   75 BEGIN_TEXT
   76 Estimate the one-sided limits below.
   77 $PAR
   78 (a) As \( x \to $b^+ \),  \( \displaystyle $eqn \to \) \{ ans_rule(12) \}
   79 \{ AnswerFormatHelp("limits") \}
   80 $PAR
   81 (b) As \( x \to $b^- \), \( \displaystyle $eqn \to \) \{ ans_rule(12) \}
   82 \{ AnswerFormatHelp("limits") \}
   83 END_TEXT
   84 Context()->normalStrings;
   85 
   86 ANS( Compute("$right")->cmp() );
   87 ANS( Compute("$left")->cmp() );
   88 
   89 #ANS(fun_cmp( $right, vars=>['I','N','F','T','Y']  ));
   90 #ANS(fun_cmp( $left, vars=>['I','N','F','T','Y'] ));
   91 
   92 Context()->texStrings;
   93 SOLUTION(EV3(<<'END_SOLUTION'));
   94 $PAR
   95 $BBOLD  SOLUTION $EBOLD
   96 $PAR
   97 (a)
   98 To find \( \displaystyle \lim_{x \to $b^+} f(x) \) we consider what happens to the function when \( x \) is slightly larger than \( $b \).  One way to investigate this behavior is to use a table such as the one below:
   99 $BR
  100 $BCENTER
  101 \{ begintable(6) \}
  102 \{ row ( "\( x \)", "$b", @x ) \}
  103 \{ row ( "\( f(x) \)", "Undefined", @r ) \}
  104 \{ endtable() \}
  105 $ECENTER
  106 $BR
  107 From the table we can see that \( \displaystyle \lim_{x \to $b^+} f(x) = $right_sym \).
  108 $PAR
  109 (b)
  110 To find \( \displaystyle \lim_{x \to $b^-} f(x) \) we consider what happens to the function when \( x \) is slightly less than \( $b \).  Again we can use a table to investigate this behavior:
  111 $BR
  112 $BCENTER
  113 \{ begintable(6) \}
  114 \{ row ( "\( x \)", @z , "$b" ) \}
  115 \{ row ( "\( f(x) \)", @l, "Undefined" ) \}
  116 \{ endtable() \}
  117 $ECENTER
  118 $BR
  119 From the table we can see that \( \displaystyle \lim_{x \to $b^-} f(x) = $left_sym \).
  120 
  121 END_SOLUTION
  122 Context()->normalStrings;
  123 
  124 COMMENT('MathObject version');
  125 ENDDOCUMENT();

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9