$30
MATH 152
Python Lab 8
Math 152 – Python Lab 8
Directions: Use Python to solve each problem. (Template link)
1. Given the series X∞
n=1
n
50 50n
n!
:
(a) Compute the first 5 terms of the series. What appears to be happening to the terms?
(b) Apply the Ratio Test to determine if the series converges or not. Show each part of the
computation and make sure to simplify your expression first!
(c) What does your answer to (b) tell you about the terms of the series?
2. Given an = n
8
e
−5n
:
(a) Using the Remainder Estimate for the Integral Test for N terms, plot the upper bound
(function) and the line y = 0.0001 to graphically determine how many terms are needed
to sum Xn
n=1
to within 0.0001.
(b) Use nsolve to confirm your graphical answer in part (a).
(c) Find the sum of the series within 0.0001.
(d) Using the Remainder Estimate for the Alternating Series Test for N terms, plot the upper
bound (function) in the window [0, 0.0001] to determine the fewest number of terms to
sum X∞
n=1
(−1)n
an within 0.0001.
(e) Use nsolve to confirm your graphical answer in part (d).
(f) Find the sum of the series to within 0.0001.
3. Given the power series X∞
n=0
(n!)2
(2n)!x
n
:
(a) Simplify
an+1
an
and find the limit, n → ∞.
(b) State the radius of convergence and the endpoints.
© 2023 TAMU Department of Mathematics MATH 152 Python Lab 8: Page 1 of 2
(c) There is no easy way to test the endpoints by hand. Substitute x = 4 into the series and
sum it up in Python to determine if it converges or not.
(d) Even that doesn’t work for x = −4, but the series is alternating, so we will numerically
estimate the Alternating Series Test limit. Let n = [10, 100, 1000, 10000] and use list
comprehension to evaluate |an| at these values. Based on this answer and your answer to
(c), state the interval of convergence of the series.
(e) Using the power series, plot s1, s3, and s5 on the same axes. Use your interval of convergence as the domain.
© 2023 TAMU Department of Mathematics MATH 152 Python Lab 8: Page 2 of 2