{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 35 "Sequences and Series\nSe ptember 2009" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Sequences" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "We begin with the study of sequences, and we shall illustrate the techni ques for the example " }{XPPEDIT 18 0 "a[n] = (3*n^2+(-1)^n*n*cos(2*n) )/(n^2+1);" "6#/&%\"aG6#%\"nG*&,&*&\"\"$\"\"\"*$F'\"\"#F,F,*(),$F,!\" \"F'F,F'F,-%$cosG6#*&F.F,F'F,F,F,F,,&*$F'F.F,F,F,F2" }{TEXT -1 5 " \+ ." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "We define the sequence as a function with integer in put:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "a := n -> (3*n^2 + (-1)^n*n *cos(2*n))/(n^2+1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "The evalua tion of a particular term is trivial" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "a(1), a(5), a(50);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "The s ame values in decimal representation" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "The limit comma nds can be used as usual: either as" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "limit(a(n),n=infinity);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 " or in two steps (" }{TEXT 256 12 "recommended)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "Limit(a(n),n=infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "Direct plottting of the sequence proves to be d ifficult, since the term " }{XPPEDIT 18 0 "(-1)^n;" "6#),$\"\"\"!\"\" %\"nG" }{TEXT -1 172 " is only defined for integers. The seq command lets us convert the values of the sequence into a set of points, whic h then can be graphed using the plot command. Details:" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 71 "P := seq([n, a(n)], n=1..20): # the first 20 \+ terms, output suppressed " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "The \+ 14th point is" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "P[14];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "plot([P], style=point, view=[0..20, 0..4]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{SECT 1 {PARA 4 "" 0 " " {TEXT -1 19 "Recursive Sequences" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 25 "We will use the example " }{XPPEDIT 18 0 "a[n+1] = 2+1/(2+a[n]); " "6#/&%\"aG6#,&%\"nG\"\"\"F)F),&\"\"#F)*&F)F),&F+F)&F%6#F(F)!\"\"F)" }{TEXT -1 25 " with the initial value " }{XPPEDIT 18 0 "a[1] = 0;" "6 #/&%\"aG6#\"\"\"\"\"!" }{TEXT -1 42 " . First, we compute the first 10 terms" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "a[1] := 0;\nfor k from 1 to 9 do\na[k+1] := 2+1/(2+a[k]); end;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "Now we use " }{TEXT 259 3 "seq" }{TEXT -1 38 " to generat e the points for the graph." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "pts \+ := seq([n,a[n]],n=1..10);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "plot([pts],style=point);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 " The graph shows that the sequence converges to a limit rather quickly. In order to compute the limit we replace both " }{XPPEDIT 18 0 "a[n +1];" "6#&%\"aG6#,&%\"nG\"\"\"F(F(" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "a[n];" "6#&%\"aG6#%\"nG" }{TEXT -1 79 " by L in the recurrence rel ation, and then solve the resulting equation for L." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "eqn := L = 2 + 1/(2+L);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "solve(eqn,L);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Apparently, our sequence converges to the square root of five. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sqrt(5.0);" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 6 "Seri es" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "The sum command can be use to compute the values of finite or inf inite sums. As an example, we compute the first 20 terms of the harmo nic series:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "sum(1/n,n=1..20);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "It is " }{TEXT 266 11 "recommende d" }{TEXT -1 28 " to use a two step procedure" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Sum(1/n,n=1..20);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "The numerical value of this sum is" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Th e harmonic series diverges:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "Sum( 1/n,n=1..infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 260 31 "More Examples with fiunite sums" }{TEXT -1 37 ". \nFirst we calcu late the sum of the" }{TEXT 264 17 " first n integers" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Sum(k,k=1..n); \nval ue(%);factor(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "Now let us fi nd the sum of the " }{TEXT 261 31 "squares of the first n integers" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Sum(k^2,k=1..n); \nvalue(%);factor( %);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "Adding the " }{TEXT 265 11 "powers of 2" }{TEXT -1 7 " yields" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "Sum(2^k,k=0..n);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 258 7 "Series:" }{TEXT -1 74 " For infinite sums we just use infinity \+ as the upper limit of summation. " }}{PARA 0 "" 0 "" {TEXT 262 9 "Exa mples:" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Sum(1/n^2, n=1..infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 263 28 "Al ternating harmonic series:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "Sum(( -1)^(n+1)/n,n=1..infinity);\nvalue(%);evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "The next series must converge by the ratio test. Ma ple computes its value" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Sum( (n-1 )/(n*2^n),n=1..infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "This series converges by the ratio test. Its value is surprisi ngly simple:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "Sum( n^3/2^n,n=1..i nfinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "This alte rnating series must converge" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "Sum ( (-1)^(n-1)*n^2/(n^3+1),n=1..infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "The result is a mess. A floating point approxi mation appears to be more useful." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "Sum( (-1)^(n-1)*n^2/(n^3+1),n=1..infinity);\nevalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 257 21 " The geometric series" }{TEXT -1 21 " fo rmula is built in:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "Sum(r^n,n=0.. infinity);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 19 "A specif ic example:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Sum( (-3/5)^n,n=0..i nfinity);\nvalue(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "This series converges absolutely, but maple can't compute the its value." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "Sum(sin(n)/n^2,n=1..infinity);\nvalue(%);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 75 "Let us compute and plot the first 30 partial sums \+ for this example instead." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "P := s eq([n, sum( sin(k)/k^2,k=1..n) ], n=1..30):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "plot([P],style=point,view=[0..30,0.8..1.1]);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "The limit appears to be slightly l arger than 1." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "3" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }