## DESCRIPTION ## Integral calculus: sequences and recursively defined functions ## ENDDESCRIPTION ## KEYWORDS('integral calculus', 'recursively defined functions') ## 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", "parserFunction.pl", ); TEXT(beginproblem()); ########################### # Setup Context("Numeric")->variables->are(n=>"Real"); parserFunction(f => "sin(pi^n)+e"); \$fn = Formula("3 f(n-1) + 2"); ########################### # Main text Context()->texStrings; BEGIN_TEXT The current value \( f(n) \) is three times the previous value, plus two. Find a recursive definition for \( f(n) \). Enter \( f_{n-1} \) as \( f(n-1) \). \$BR \( f(n) \) = \{ ans_rule(20) \} END_TEXT Context()->normalStrings; ############################ # Answer evaluation \$showPartialCorrectAnswers=1; ANS( \$fn->cmp() ); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION \${PAR}SOLUTION:\${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();