[npl] / trunk / NationalProblemLibrary / Rochester / setSeries9Taylor / e8_7_4a.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Annotation of /trunk/NationalProblemLibrary/Rochester/setSeries9Taylor/e8_7_4a.pg

 1 : jj 141 #DESCRIPTION 2 : #Taylor_series 3 : #ENDDESCRIPTION 4 : 5 : #KEYWORDS('Taylor Series') 6 : 7 : DOCUMENT(); # This should be the first executable line in the problem. 8 : 9 : loadMacros( 10 : "PG.pl", 11 : "PGbasicmacros.pl", 12 : "PGchoicemacros.pl", 13 : "PGanswermacros.pl", 14 : "PGauxiliaryFunctions.pl" 15 : ); 16 : 17 : TEXT(beginproblem()); 18 : $showPartialCorrectAnswers = 0; 19 : 20 :$a = random(2,11,1); 21 : $b = random(2,11,1); 22 :$a1 =2*($a); 23 : 24 :$questStr1 = EV2( " $$\displaystyle \sum_{n=0}^\infty (-1)^n 25 : \frac{2x^{2n+1}}{(2n+1)!}$$ " ); 26 : 27 : $ansStr1 =EV2( " $$2 \sin(x)$$ " ); 28 : 29 :$questStr2 = EV2( " $$\displaystyle \sum_{n=0}^\infty \frac{2^n x^n}{n!}$$ " ); 30 : 31 : $ansStr2 =EV2( " $$e^{2x}$$ " ); 32 : 33 :$questStr3 = EV2( " $$\displaystyle \sum_{n=0}^\infty \frac{(-1)^n 2^{2n} x^{2n}}{(2n)!}$$ 34 : " ); 35 : 36 : $ansStr3 =EV2( " $$\cos(2x)$$ " ); 37 : 38 :$questStr4 = EV2( " $$\displaystyle \sum_{n=0}^\infty \frac{(-1)^n 2x^{2n+1}}{2n+1}$$ 39 : " ); 40 : 41 : $ansStr4 =EV2( " $$2 \arctan(x)$$ " ); 42 : 43 : @questions =($questStr1,$questStr2,$questStr3,$questStr4); 44 : @answers =($ansStr1,$ansStr2,$ansStr3,\$ansStr4); 45 : 46 : # Now randomize the questions: 47 : @slice = &NchooseK(4,4); 48 : @shuffle = &shuffle(scalar(@slice)); 49 : 50 : TEXT(EV2(<["remove_whitespace","ignore_case"])); 60 : ##the correct answers are obtained by applying 61 : ##the inverse (adjoint) permutation to the captions. 62 : 63 : ENDDOCUMENT(); # This should be the last executable line in the problem. 64 :