Cocalc Lab 07 Sequences And Series Ipynb

Leo Migdal
-
cocalc lab 07 sequences and series ipynb

In this lab, we will use SageMath to determine the convergence or divergence of a sequence of numbers and of infinite series. Consider the sequence {cos⁡(nπ)arctan⁡(n)}n=1∞\{\cos(n\pi)\arctan(n)\}_{n=1}^\infty{cos(nπ)arctan(n)}n=1∞​. We start by determining the first 10 terms of this sequence. We can do this in SageMath by letting an=cos⁡(nπ)arctan⁡(n)a_n = \cos(n\pi)\arctan(n)an​=cos(nπ)arctan(n) and then using a for\textbf{for}for loop and the range\textbf{range}range command. We can get a better idea of what these numbers are by using the round\textbf{round}round command. Note that the terms of the sequence do not appear to approach a specific number.

We can better tell what is happening by plotting the first 100 or so terms of the sequence. We can plot a point in SageMath by using the point\textbf{point}point command along with the show\textbf{show}show command. To plot multiple points on the same plot, we will store the points in a list and then show the list. SageMath does not allow us to plug the list directly into the show\textbf{show}show command. Instead, we must input the sum of the elements in the list. From the graph, we see that the odd terms are approaching a specific value, namely −π2-\frac{\pi}{2}−2π​, and the even terms are approaching a specfic value, namely π2.\frac{\pi}{2}.2π​.

However, since these values are different, the sequence diverges. There was an error while loading. Please reload this page. The main sequence types in Python are lists, tuples and range objects. The main differences between these sequence objects are: Lists are mutable and their elements are usually homogeneous (things of the same type making a list of similar objects)

Tuples are immutable and their elements are usually heterogeneous (things of different types making a tuple describing a single structure) Range objects are efficient sequences of integers (commonly used in for loops), use a small amount of memory and yield items only when needed Create a list using square brackets [ ... ] with items separated by commas. For example, create a list of square integers, assign it to a variable and use the built-in function print() to display the list: Sequence of partial sums {sn}n=1∞\{s_n\}_{n=1}^\infty{sn​}n=1∞​ associated with the series ∑n=1∞an\sum_{n=1}^\infty a_n∑n=1∞​an​: sn=a1+a2+⋯+ans_n=a_1+a_2+\dots+a_nsn​=a1​+a2​+⋯+an​ and ∑n=1∞an=lim⁡n→∞sn\sum_{n=1}^\infty a_n=\lim_{n\to\infty}s_n∑n=1∞​an​=limn→∞​sn​.

Does the series converge or diverge? Why? (Calculus II review, for example ppp-series and alternating series test). p-series: ∑n=1∞1np\sum_{n=1}^\infty\frac{1}{n^p}∑n=1∞​np1​ converges for p>1p>1p>1 and diverges otherwise. Check this link for p-series. If ∑n=1∞an=∞\sum_{n=1}^\infty a_n=\infty∑n=1∞​an​=∞, how fast does it blow up (how many terms of the series do we need to add up in order to exceed a certain number)?

The series ∑n=1∞1\sum_{n=1}^\infty 1∑n=1∞​1 blows up like the sequence nnn.

People Also Search

In This Lab, We Will Use SageMath To Determine The

In this lab, we will use SageMath to determine the convergence or divergence of a sequence of numbers and of infinite series. Consider the sequence {cos⁡(nπ)arctan⁡(n)}n=1∞\{\cos(n\pi)\arctan(n)\}_{n=1}^\infty{cos(nπ)arctan(n)}n=1∞​. We start by determining the first 10 terms of this sequence. We can do this in SageMath by letting an=cos⁡(nπ)arctan⁡(n)a_n = \cos(n\pi)\arctan(n)an​=cos(nπ)arctan(n)...

We Can Better Tell What Is Happening By Plotting The

We can better tell what is happening by plotting the first 100 or so terms of the sequence. We can plot a point in SageMath by using the point\textbf{point}point command along with the show\textbf{show}show command. To plot multiple points on the same plot, we will store the points in a list and then show the list. SageMath does not allow us to plug the list directly into the show\textbf{show}show...

However, Since These Values Are Different, The Sequence Diverges. There

However, since these values are different, the sequence diverges. There was an error while loading. Please reload this page. The main sequence types in Python are lists, tuples and range objects. The main differences between these sequence objects are: Lists are mutable and their elements are usually homogeneous (things of the same type making a list of similar objects)

Tuples Are Immutable And Their Elements Are Usually Heterogeneous (things

Tuples are immutable and their elements are usually heterogeneous (things of different types making a tuple describing a single structure) Range objects are efficient sequences of integers (commonly used in for loops), use a small amount of memory and yield items only when needed Create a list using square brackets [ ... ] with items separated by commas. For example, create a list of square intege...

Does The Series Converge Or Diverge? Why? (Calculus II Review,

Does the series converge or diverge? Why? (Calculus II review, for example ppp-series and alternating series test). p-series: ∑n=1∞1np\sum_{n=1}^\infty\frac{1}{n^p}∑n=1∞​np1​ converges for p>1p>1p>1 and diverges otherwise. Check this link for p-series. If ∑n=1∞an=∞\sum_{n=1}^\infty a_n=\infty∑n=1∞​an​=∞, how fast does it blow up (how many terms of the series do we need to add up in order to exceed...