MATH 156 LAB 13Topic 1: The integral test.We can compare the partial sums of certain series with Riemann sums (left-hand sums and right-hand sums) of certain improper integrals. We will only work with continuous functions, decreasing and positive. The integral test says that, if NiMtJSJmRzYjJSJ4Rw== satisfies these conditions, then the series NiMtJSRzdW1HNiQtJSJmRzYjJSJuRy9GKTsiIiIlKWluZmluaXR5Rw== and the improper integral NiMtJSRpbnRHNiQtJSJmRzYjJSJ4Ry9GKTsiIiIlKWluZmluaXR5Rw== either both converge or both diverge.Example: The series NiMtJSRzdW1HNiQqJiIiIkYnKiQlIm5HIiIjISIiL0YpO0YnJSlpbmZpbml0eUc= . Since NiMvLSUiZkc2IyUieEcqJiIiIkYpKiRGJyIiIyEiIg== is positive, decreasing and continuous we have to decide whether the improper integral NiMtJSRpbnRHNiQqJiIiIkYnKiQlInhHIiIjISIiL0YpO0YnJSlpbmZpbml0eUc= converges or not.We define the function, the integral and we ask Maple the value of the improper integral.f:=x->1/x^2;integral:=Int(f(x), x=1..infinity);value(%);Since the integral converges, the series converges as well. We can see it by defining the sequence of partial sums, plot it and find its limit.s:=N->sum(f(n), n=1..N);graph:=[seq([k,s(k)], k=1..30)];plot(graph, style=point);limit(s(k), k=infinity);We can also create a table of values of the sequence of partial sums:for N from 1 to 30 do evalf(s(N)); od;evalf(Pi^2/6);As you see the series converges and its sum it NiMqKCIiIkYkIiInISIiJSNQaUciIiM=. This is not the same number as the area represented by the improper integral. To understand a bit better what is going on, we plot the function NiMtJSJmRzYjJSJ4Rw== and its left-hand sum and right-hand sum on the intervals [1, N+1] and [1, N] respectively with subintervals of length 1 . To see a good graph, however, we take N=5.with(student):leftbox(f(x), x=1..6, 5);rightbox(f(x), x=1..5, 4);We see that s(5)=LHS(5)>NiMtJSRpbnRHNiQtJSJmRzYjJSJ4Ry9GKTsiIiIiIic=>NiMtJSRpbnRHNiQtJSJmRzYjJSJ4Ry9GKTsiIiIiIiY=>RHS(4)=s(5)-1. In general s(N)<NiMtJSRpbnRHNiQtJSJmRzYjJSJ4Ry9GKTsiIiIlIk5H+1. Since the improper integral converges, i.e. the area under the curve all the way to infinity is finite, we get that the series converges.Plot the partial sums for the series NiMtJSRzdW1HNiQqJiIiIkYnJSJuRyEiIi9GKDtGJyUpaW5maW5pdHlH. and the series NiMtJSRzdW1HNiQqJiIiIkYnLCYqJCUibkciIiNGJ0YnRichIiIvRio7RiclKWluZmluaXR5Rw==.From this graph it is not clear that the sequence of partial sums converges or diverges. Make a list of values for N=1..10.Even with this table we are not sure, the values we get are rather small. Do a loop, showing every other 10th term up to 200.We see that the sequence of partial sums increases rather slowly. Compare it with Riemann sums of the function NiMvLUkiZkc2IjYjSSJ4R0YmKiYiIiJGKkYoISIi:Repeat the work for the series NiMtJSRzdW1HNiQqJiIiIkYnLCYqJCUibkciIiNGJ0YnRichIiIvRio7RiclKWluZmluaXR5Rw==h:=x->1/(x^2+1);Topic 2: Other tests: Ratio test.The ratio test for the series NiMtSSRzdW1HNiI2JC1JImFHRiU2I0kibkdGJS9GKjsiIiJJKWluZmluaXR5R0kqcHJvdGVjdGVkR0Yv with NiMmJSJhRzYjJSJuRw== positive ask us to compute the limit NiMtJSZsaW1pdEc2JComJiUiYUc2IywmJSJuRyIiIkYsRixGLCZGKDYjRishIiIvRislKWluZmluaXR5Rw== = r. If NiMyJSJyRyIiIg== the series converges, if NiMyIiIiJSJyRw== the series diverges and if NiMvJSJyRyIiIg== the test is inconclusive.Example: Use the ratio test on the series NiMtJSRzdW1HNiQqJiIiIkYnJSJuRyEiIi9GKDtGJyUpaW5maW5pdHlH and on the series NiMtJSRzdW1HNiQqJiIiIkYnLCYqJCUibkciIiNGJ0YnRichIiIvRio7RiclKWluZmluaXR5Rw==. Limit(g(n+1)/g(n), n=infinity);value(%);The test is inconclusive. However, with the integral test we decided that the series diverges.Limit(h(n+1)/h(n), n=infinity);value(%);The test is inconclusive. However, with the integral test we decided that the series converges.Examine the following two series for convergence using the ratio test. NiMtJSRzdW1HNiQqJi0lKmZhY3RvcmlhbEc2IyUibkciIiIpIiIkRiohIiIvRio7RislKWluZmluaXR5Rw== and NiMtJSRzdW1HNiQqJikiIiQlIm5HIiIiLSUqZmFjdG9yaWFsRzYjRikhIiIvRik7RiolKWluZmluaXR5Rw==. Recall the definition of factorials: 0!=1, 1!=1, 2!=NiMqJiIiIkYkIiIjRiQ=, 3!=NiMqKCIiIkYkIiIjRiQiIiRGJA==. And in general n!=NiMqKCIiIkYkIiIjRiQiIiRGJA==...n.