[npl] / trunk / NationalProblemLibrary / UMN / calculusStewartCCC / s_11_10_prob02.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/UMN/calculusStewartCCC/s_11_10_prob02.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2938 - (download) (annotate)
Mon Apr 23 18:50:03 2012 UTC (13 months ago) by jj
File size: 2296 byte(s)
Fixed bug 2331, and corrected some wrong answers.

    1 #DESCRIPTION
    2 ##  Calculus: Taylor and Maclaurin series
    3 ##ENDDESCRIPTION
    4 
    5 ##KEYWORDS('calculus', 'series', taylor series', 'maclaurin series')
    6 
    7 ## DBsubject('Calculus')
    8 ## DBchapter('Infinite Sequences and Series')
    9 ## DBsection('Taylor and Maclaurin Series')
   10 ## Date('04/26/2010')
   11 ## Author('Justin Sukiennik')
   12 ## Institution('University of Minnesota')
   13 ## TitleText1('Calculus: Concepts and Contexts')
   14 ## EditionText1('4 Custom UMTYMP Ed.')
   15 ## AuthorText1('Stewart')
   16 ## Section1('11.10')
   17 ## Problem1('')
   18 
   19 #####################################################################
   20 DOCUMENT();        # This should be the first executable line in the problem.
   21 
   22 loadMacros(
   23   "PGstandard.pl",
   24   "MathObjects.pl",
   25   "weightedGrader.pl",
   26   "PGcourse.pl",
   27 );
   28 
   29 #####################################################################
   30 install_weighted_grader();
   31 
   32 $showPartialCorrectAnswers = 0;
   33 
   34 TEXT(beginproblem());
   35 
   36 #####################################################################
   37 Context("Numeric");
   38 # Let students type "EmptySet" instead of "NONE"
   39 Context()->constants->add(EmptySet => Set());
   40 Context()->flags->set(noneWord=>"EmptySet");
   41 
   42 $a = random(1,5);
   43 $a2 = 2*$a;
   44 
   45 $ans0 = Compute("$a");
   46 $ans1 = Compute("-(1/(2*$a))*(x-$a)^2");
   47 $ans2 = Compute("-(1/(8*$a^3))*(x-$a)^4");
   48 $ans3 = Compute("-(1/(16*$a^5))*(x-$a)^6");
   49 $ans4 = Compute("-(1/(128*$a^6))*(x-$a)^8");
   50 
   51 Context("Numeric");
   52 $ans5 = Compute("$a");
   53 #####################################################################
   54 
   55 Context()->texStrings;
   56 BEGIN_TEXT
   57 Find the first five non-zero terms of Taylor series centered at \(x = $a\) for the function below.
   58 \[
   59 f(x) = \sqrt{$a2 x - x^2}
   60 \]
   61 $HR
   62 Answer: \(f(x) = \) \{ans_rule(8)\} \( + \) \{ans_rule(12)\} \( + \) \{ans_rule(12)\} \( + \) \{ans_rule(12)\} \( + \) \{ans_rule(14)\} \(+ \cdots\)
   63 $HR
   64 What is the radius of convergence? $BR
   65 Answer: \(R = \) \{ans_rule(10)\}
   66 END_TEXT
   67 Context()->normalStrings;
   68 
   69 #####################################################################
   70 
   71 WEIGHTED_ANS( ($ans0)->cmp(), 10 );
   72 WEIGHTED_ANS( ($ans1)->cmp(), 10 );
   73 WEIGHTED_ANS( ($ans2)->cmp(), 10 );
   74 WEIGHTED_ANS( ($ans3)->cmp(), 10 );
   75 WEIGHTED_ANS( ($ans4)->cmp(), 10 );
   76 Context("Numeric");
   77 WEIGHTED_ANS( ($ans5)->cmp(), 50 );
   78 
   79 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9