[npl] / trunk / NationalProblemLibrary / ASU-topics / setAlgebraFunctions / beth3algfun.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/ASU-topics/setAlgebraFunctions/beth3algfun.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: 1441 byte(s)
 Cleaned code with convert-functions.pl script

    1 ## DESCRIPTION
    2 ## Algebra and Number Theory: Algebra
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('algebra', 'number', 'theory')
    6 ## Tagged by YJ
    7 
    8 ## Date('5/26/2005')
    9 ## Author('Jeff Holt')
   10 ## Institution('UVA')
   11 ## TitleText1('Calculus')
   12 ## EditionText1('5e')
   13 ## AuthorText1('Stewart')
   14 ## Section1('3.1.2')
   15 ## Problem1(' ')
   16 
   17 DOCUMENT();        # This should be the first executable line in the problem.
   18 
   19 loadMacros(
   20 "PG.pl",
   21 "PGbasicmacros.pl",
   22 "PGchoicemacros.pl",
   23 "PGanswermacros.pl",
   24 "PGauxiliaryFunctions.pl"
   25 );
   26 
   27 TEXT(beginproblem());
   28 $showPartialCorrectAnswers = 1;
   29 
   30 $a = random(2,9,1);
   31 $b = non_zero_random(-9,9,1);
   32 do {$c = random(2,9,1)} until ($c!=$a);
   33 $d = non_zero_random(-9,9,1);
   34 
   35 TEXT(EV2(<<EOT));
   36 
   37 $BR
   38 Given that \(f(x)=$a x ? {$b}\) and \(g(x)=$c x ? {$d}\), calculate
   39 $BR
   40 (a) \(f\circ g(x)\)= \{ans_rule(15)\}
   41 
   42 $BR
   43 (b) \(g\circ f(x)\)= \{ans_rule(15)\}
   44 
   45 $BR
   46 (c) \(f\circ f(x)\)= \{ans_rule(15)\}
   47 
   48 $BR
   49 (d) \(g\circ g(x)\)= \{ans_rule(15)\}
   50 
   51 $BR
   52 $BR
   53 EOT
   54 
   55 $ans1 = "$a*($c*x + $d)+$b";
   56 $ans2 = "-infinity";
   57 $ans3 = "infinity";
   58 $ans4 = "$c*($a*x + $b)+$d";
   59 $ans5 = "-infinity";
   60 $ans6 = "infinity";
   61 $ans7 = "$a*($a*x + $b)+$b";
   62 $ans8 = "-infinity";
   63 $ans9 = "infinity";
   64 $ans10 = "$c*($c*x + $d)+$d";
   65 $ans11 = '-infinity';
   66 $ans12 = 'infinity';
   67 ANS(fun_cmp($ans1));
   68 
   69 ANS(fun_cmp($ans4));
   70 
   71 ANS(fun_cmp($ans7));
   72 
   73 ANS(fun_cmp($ans10));
   74 
   75 
   76 ENDDOCUMENT();        # This should be the last executable line in the problem.
   77 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9