You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## To change the problem change $n the start value for the series, $an the
73
-
## terms of the series, $correct which is the list of test that can be used
74
-
## for the series, $ans which is whether the series converges or not.
75
-
76
-
Context()->variables->are(n=>"Real",k=>"Real");
77
-
78
-
$n = 1; # starting value for the series
79
-
$an = Formula("1/(n^2)")->TeX;
80
-
$ans = $converges;
81
-
82
-
my @all = ($divergence->string,$geometric->string,$integral->string,$pseries->string,$comparison->string,$limitcomparison->string,$ratio->string,$alternating->string);
83
-
84
-
my @correct = ($pseries->string,$integral->string);
85
-
86
-
my %all=map{$_ =>1} @all;
87
-
my %correct=map{$_=>1} @correct;
88
-
my @difference=grep(!defined $correct{$_}, @all);
89
-
90
-
## The multiple choice question.
91
-
$mc = new_checkbox_multiple_choice();
92
-
## the correct answers.
93
-
$mc->qa("", @correct);
94
-
## the list of other answers.
95
-
$mc->extra(@difference);
96
-
97
-
Context()->texStrings;
98
-
BEGIN_TEXT
99
-
Which of the following series convergence tests could be applied to the infinite series \(\sum\limits_{n=$n}^\infty $an\)? Check all that apply.
100
-
\{ $mc->print_q() \}
101
-
\{ $mc->print_a() \}
102
-
$BR
103
-
The series \{ pop_up_list([$blank->string,$converges->string,$convergesabs->string,$convergescond->string,$diverges->string]) \}
104
-
END_TEXT
105
-
Context()->normalStrings;
106
-
107
-
install_problem_grader(~~&std_problem_grader);
43
+
$test = CheckboxList(
44
+
[ "Divergence Test",
45
+
"Geometric Series Test",
46
+
"Integral Test",
47
+
"P-Series Test",
48
+
"Comparison Test",
49
+
"Limit Comparison Test",
50
+
"Ratio Test",
51
+
"Alternating Series Test"
52
+
],
53
+
[2,3]
54
+
);
108
55
109
-
$showPartialCorrectAnswers = 0;
110
-
ANS( checkbox_cmp( $mc->correct_ans() ) );
111
-
ANS($ans->cmp);
56
+
$convergeQ = PopUp(
57
+
["??", "Yes, it converges.","No, it diverges.", "The test(s) fail to decide this."],
58
+
"Yes, it converges."
59
+
);
112
60
61
+
BEGIN_PGML
62
+
Consider the infinite series
63
+
[`` \sum_{n=1}^{\infty} \frac{1}{n^2} ``]
64
+
Which of the following convergence tests is a good way to decide whether or not this series converges? Check all that apply.
65
+
[_]{$test}
66
+
67
+
Does the series converge?
68
+
[_]{$convergeQ}
69
+
END_PGML
70
+
71
+
BEGIN_PGML_SOLUTION
72
+
* [``0=\lim_{n\to\infty} 1/n^2 \ ``] so the "divergence test" does not apply.
73
+
* Our series is not a geometric series.
74
+
* Our series is a series of positive terms and [``\int_1^\infty 1/x^2\; dx < \infty ``] so the integral test says that the series converges.
75
+
* Our series is a "p-series" with [`p=2`] which is larger than 1, so the "P-series test" says that the series converges.
76
+
* To use the "comparison test" we'd need another series [``\ \sum_{n=1}^{\infty} b_n \ ``] that satisfies the criteria for the comparison test, and where it's easier to decide the convergence or divergence of this series than it is for
77
+
our series. I can't think of any good candidates for the series [``\ \sum_{n=1}^{\infty} b_n``], can you?
78
+
* The "limit comparison test" has the same issue as the "comparison test".
79
+
* [``\lim_{n\to\infty} \frac{1/(n+1)^2}{1/n^2} = 1 ``] so the "ratio test" does not yield any useful information.
0 commit comments