## DESCRIPTION ## Integral calculus: sequences ## ENDDESCRIPTION ## KEYWORDS('integral calculus', 'sequences') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('01/30/2011') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "AnswerFormatHelp.pl", ); TEXT(beginproblem()); ########################### # Setup Context("Numeric"); Context()->variables->are(n=>"Real"); $answer = Compute("(-1)^n / n!");$answer->{test_points} = [[1],[2],[3],[4],[5],[6]]; @seq = ( "a_0 = 1", "a_1 = -1", "a_2 = \frac{1}{2}", "a_3 = -\frac{1}{6}", "a_4 = \frac{1}{24}", "a_5 = -\frac{1}{120}", "\ldots" ); $sequence = join(", ", @seq); ########################### # Main text Context()->texStrings; BEGIN_TEXT Find a formula for $$n^{th}$$ term of the sequence $$sequence$$.$BR $BR $$a_n =$$ \{ ans_rule(20) \} \{ AnswerFormatHelp("formulas") \} END_TEXT Context()->normalStrings; ############################ # Answer evaluation$showPartialCorrectAnswers=1; ANS( $answer->cmp() ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION${PAR}SOLUTION:\${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();