# Math 2 Examples of Series 15 Nov 96 # # -------------------------------------------------------------------------------- # First example: > a1 := n -> (n+1)/(3*n+1); n + 1 a1 := n -> ------- 3 n + 1 # Partial sums: > Sn1 := n -> sum(a1(k),k=1..n); n ----- \ Sn1 := n -> ) a1(k) / ----- k = 1 # Plot a1 and Sn1: > A1 := [seq([n,a1(n)],n=1..200)]: B1 := [seq([n,Sn1(n)],n=1..20)]: > plot(A1); > plot(B1,style=point); # We get infinity if we try to find the limit of the partial sums: > Sn1(infinity); infinity -------------------------------------------------------------------------------- # Second example: > a2 := n -> (2*n**2+3)/sqrt(n**7-2*n**3+2); 2 2 n + 3 a2 := n -> ------------------- 7 3 sqrt(n - 2 n + 2) > Sn2 := n -> evalf(sum(a2(k),k=1..n)); n ----- \ Sn2 := n -> evalf( ) a2(k)) / ----- k = 1 # Plot a2 and Sn2: > A2 := [seq([n,a2(n)],n=1..100)]: B2:= [seq([n,Sn2(n)],n=1..100)]: > plot(A2,style=point,color=red); > plot(B2,style=point); # Find the limit of the partial sums: > Sn2(infinity); 8.669926180 -------------------------------------------------------------------------------- # Third example: > a3 := n -> 1/(n*ln(n)); 1 a3 := n -> ------- n ln(n) # Partial sums: > Sn3 := n -> evalf(sum(a3(k),k=2..n)); n ----- \ Sn3 := n -> evalf( ) a3(k)) / ----- k = 2 # Plot a3 and Sn3: > A3 := [seq([n,a3(n)],n=2..200)]: B3 := [seq([n,Sn3(n)],n=2..200)]: > plot(A3,color=red); > plot(B3); # MAPLE is unable to find the limit of the partial sums: > Sn3(infinity); FAIL(3.395407688) -------------------------------------------------------------------------------- # Fourth example: > a4 := n -> cos(n*Pi)/sqrt(n); cos(n Pi) a4 := n -> --------- sqrt(n) # Partial sums: > Sn4 := n -> evalf(sum(a4(k),k=1..n)); n ----- \ Sn4 := n -> evalf( ) a4(k)) / ----- k = 1 # Plot a4 and Sn4: > A4 := [seq([n,a4(n)],n=1..100)]: B4 := [seq([n,Sn4(n)],n=1..100)]: > plot({A4,B4},style=point); # Find the limit of the partial sums: > Sn4(infinity); -.6048986434 -------------------------------------------------------------------------------- # Fifth example: > a5 := n -> 2^(2*n)/n!; (2 n) 2 a5 := n -> ------ n! # Partial sums: > Sn5 := n -> evalf(sum(a5(k),k=1..n)); n ----- \ Sn5 := n -> evalf( ) a5(k)) / ----- k = 1 # Calculate the ratios for the ratio test: > c5 := n -> abs(a5(n+1)/a5(n)); a5(n + 1) c5 := n -> abs(---------) a5(n) # Plot a5, Sn5, and also b5: > A5 := [seq([n,a5(n)],n=1..20)]: B5 := [seq([n,Sn5(n)],n=1..20)]: > C5 := [seq([n,c5(n)],n=1..50)]: > plot(A5,style=point,color=red); > plot(B5,style=point); > plot(C5,style=point); # Find the limit of the partial sums: > Sn5(infinity); 53.59815003 -------------------------------------------------------------------------------- # Final example: > a6 := n -> (-2)^n/((ln(n))^n); n (-2) a6 := n -> ------ n ln(n) # Partial sums: > Sn6 := n -> evalf(sum(a6(k),k=2..n)); n ----- \ Sn6 := n -> evalf( ) a6(k)) / ----- k = 2 # Let c6 be the nth root of a6, which we use in the root test: > c6 := n -> -2/ln(n); 2 c6 := n -> - ----- ln(n) # Plot a6, Sn6, and also the root c6: > A6:=[seq([n,a6(n)],n=2..20)]: B6:=[seq([n,Sn6(n)],n=2..20)]: > C6 := [seq([n,c6(n)],n=2..500)]: > plot(A6,style=point,color=red); > plot(B6,style=point); > plot(C6,color=yellow); # Find the limit of the partial sums: > Sn6(infinity); 4.843496974 -------------------------------------------------------------------------------- >