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Introduction:restart;Handling infinite sequences and series in Maple is not always easy, but it does offer some tools. If we have the explicit formula for a sequence, testing convergenge is easy by taking a limit. Here, we define a function for the LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEibkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJw==th coefficient, then use limit.a := n-> (n^2+1)/n^2;limit(a(n), n = infinity);Creating a finite list of the first few terms of a sequence is easy if we have an explicit formula, thanks to the seq command.l := seq(a(n), n = 1 .. 15);Looking at the floating-point form of the sequence members can sometimes give a strong clue as to what the sequence is converging to.evalf(%);To visualize the sequence, we can create a list of points...pointlist := [ seq([n,a(n)], n = 1..10) ];...then use a special syntax of plot:plot(pointlist,style=point);This graph produces visual confirmation of the limiting value. Maple sometimes gives an unexpected result for the limit of a divergent sequence. Here is an example.b := n -> (-1)^n*(n+1)/n;pointlist := [ seq([n, b(n)], n = 1..15) ];plot(pointlist, style=point);As the graph suggests, this sequence diverges. But when we tell Maple to calculate the limit, we get the following:limit(b(n), n=infinity);Maple is trying to tell us that the sequence eventually takes values that are arbitrarily close to the interval [-1,1], which is a broader notion of convergence than we use in the course.A useful feature of Maple is the ability to solve certain recurrence relations. For example, the Fibonacci sequence is defined by two starting values and a recurrence equation.f:= n -> f(n-1)+f(n-2);f(0):= 1; f(1):= 1;seq( f(n), n=0..15 );Maple can "solve" the recurrence, which gives us an explicit formula for the nth term, using rsolve:rsolve( c(n) = c(n-1)+c(n-2), c(n));With just the defining recurrence equation, the result depends on the two starting values LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYjLUkjbW5HRiQ2JFEiMEYnL0YzUSdub3JtYWxGJ0Y+ and LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYjLUkjbW5HRiQ2JFEiMUYnL0YzUSdub3JtYWxGJ0Y+. We can get more specific results by subs or eval, or by giving rsolve a complete set of defining equations.recur:= { c(n) = c(n-1)+c(n-2), c(0)=1, c(1)=1 };rsolve( recur, c(n) );We can use this output to define a function for the nth term of a sequence:fibo := unapply(%, n);evalf( seq(fibo(n),n=0..15) );Whenever you see results like these in floating point, you should immediately wonder whether the results are supposed to be exactly integers that got rounded off a bit incorrectly--as is the case here.One advantage of the formula is that we can now take the limit.limit( fibo(n), n = infinity );We can also see that the sequence consists of an exponentially decaying part and and exponentially growing part. evalf( fibo(n) );Graphically, this becomes a straight line if we take the log of the terms.fibolist := [ seq( [n,ln(fibo(n))], n=0..15 ) ]:plot( fibolist, style = point );Sometimes, rsolve gives us solutions that are so complex that it is hard to interpret them just by looking at them. For example:rsolve( {c(n) = 7*c(n-1)-2*c(n-2)+n, c(0) = 2, c(1) = 3}, c(n) );f := unapply(%, n):We can still use evalf to get a feel for the numbers of the sequence.evalf( seq(f(n),n=1..15) );evalf( f(n) );Hence, this sequence also has exponential divergence to infinity. It's worth noting that Maple gets this wrong!limit( f(n), n=infinity );This is further confirmation that Maple is a supplement, not a replacement, for your brain.print();Exercises:restart;Instructions: The following exercises are all working with the Fibonacci recurrence relation,c(n) = c(n-1)+c(n-2); Question 1. For the starting values c(0) = 3; c(1) = -2;do the following:(1) Use rsolve to solve the recurrence with the given starting values.(2) Calculate and plot the first 10 values of the sequence. Give both exact and floating-point expressions for the nth term. (3) Determine the convergence/divergence of the sequence. Question 2. Find a pair of starting values LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYjLUkjbW5HRiQ2JFEiMEYnL0YzUSdub3JtYWxGJ0Y+, LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYjLUkjbW5HRiQ2JFEiMUYnL0YzUSdub3JtYWxGJ0Y+ such that the Fibonacci sequence converges to zero. (Hint: What term in equation is responsible for the exponential divergence? Make it go away.) LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn