Homework Section 11.1 (Stewart 5th Ed)

11.1.48

Clear[a,b]

We could work this out by hand, but let's extend our knowledge of Mathematica a little instead.

Here, we can use the Mathematica command If to help define our function. Since we haven't used If much, here is what the help has to say:

?If

We can also use some other intrinsic Mathematica functions to help us choose even/odd:

?OddQ

?EvenQ

Now, we can define our sequence in Mathematica!

a[1]:=11
a[n_]:=a[n]=If[OddQ[a[n-1]],3a[n-1]+1,a[n-1]/2]

Notice that I have rewritten it in the form

(Subscript[a, n])={({{(Subscript[a, n-1])/2       if (Subscript[a, n-1]) is even}, {3(Subscript[a, n-1])+1     if (Subscript[a, n-1]) is odd}})

The second sequence starts at a different place, so let's define it as an entirely new sequence, even though the recursion relation is the same:

b[1]:=25
b[n_]:=b[n]=If[OddQ[b[n-1]],3b[n-1]+1,b[n-1]/2]

Now, let's construct a table of the terms in the sequences:

Table[{n,a[n],b[n]},{n,1,40}]
TableForm[%]

The two sequences become the same after the n=22! This isn't surprising, since the only thing that changed was the initial starting point...but then again, it is surprising, since a different starting point you might think would lead to different values later on. The sequence is oscillating, so it does not converge.

There are a number of conjectures you might make based on your findings. My conjecture is that for n sufficiently large, all sequences of this form, regardless of the value of (Subscript[a, 1]), will look like {...,4,2,1,4,2,1,...}. This is just a conjecture, to prove this would require more work!

11.1.59

We can write the sequence we are investigating recursively as follows

(Subscript[a, 1])=(Sqrt[2]), (Subscript[a, n])=(Sqrt[2(Subscript[a, n-1])]),n=2,3,4,...

Notice that the index labelling has switched slightly so we can easily input this form into Mathematica. This is the same as writing

(Subscript[a, 1])=(Sqrt[2]), (Subscript[a, n+1])=(Sqrt[2(Subscript[a, n])]), n=1,2,3,...

We can input this into Mathematica in the following way:

Clear[a]
a[1]:=(Sqrt[2])
a[n_]:=a[n]=(Sqrt[2a[n-1]])

TableForm[Table[{n,a[n],(2^n-1)/2^n},{n,1,10}]]

It looks like the sequence is approaching 2. Let's show the sequence converges.

Show the sequence is increasing

To show the sequence is increasing we shall use mathematical induction (see page 79). We want to show (Subscript[a, n+1])≥(Subscript[a, n])for all n≥1.

Step 1 in induction: Show the result is true for n=1. 
If n=1, we have that (Subscript[a, 2])=(Sqrt[2(Sqrt[2])])=(2^(3/4))=((((2^(1/4))))^3)≥((((2^(1/4))))^2)=(Sqrt[2])=(Subscript[a, 1]). So the result is true for n=1.

Step 2 in induction: Assume the result is true for n=k. 
If n=k, we have that (Subscript[a, k+1])≥(Subscript[a, k]).

Step 3 in induction: Show the result is true for n=k+1. 
We now need to show (Subscript[a, k+2])≥(Subscript[a, k+1])is true.

(Subscript[a, k+1])≥(Subscript[a, k])           (true by step 2)
 2(Subscript[a, k+1])≥2(Subscript[a, k])
 (Sqrt[2(Subscript[a, k+1])])≥(Sqrt[2(Subscript[a, k])])
 (Subscript[a, k+2])≥(Subscript[a, k+1])

So we have shown that  (Subscript[a, k+2])≥(Subscript[a, k+1])is true. Therefore, (Subscript[a, n+1])≥(Subscript[a, n])for all n≥1is true by mathematical induction. The sequence is increasing. The lower bound of the sequence is (Subscript[a, 1])=(Sqrt[2]).

Show the sequence is bounded above

To show the sequence is bounded above we shall use mathematical induction again. We want to show (Subscript[a, n])≤5for all n≥1. I picked 5 out of the air, if it doesn't work, I will try something else.

Step 1 in induction: Show the result is true for n=1. 
If n=1, we have that (Subscript[a, 1])=(Sqrt[2])≤ 5. So the result is true for n=1.

Step 2 in induction: Assume the result is true for n=k. 
If n=k, we have that (Subscript[a, k])≤5.

Step 3 in induction: Show the result is true for n=k+1. 
We now need to show (Subscript[a, k+1])≤3is true.

(Subscript[a, k])≤5           (true by step 2)
 2(Subscript[a, k])≤2(5)
  (Subscript[a, k+1])=(Sqrt[2(Subscript[a, k])])≤(Sqrt[2(5)])=(Sqrt[10])≤5
 (Subscript[a, k+1])≤5

So we have shown that  (Subscript[a, k+1])≤5 is true. Therefore, (Subscript[a, n])≤5for alln≥1is true by mathematical induction. The sequence is bounded above.

Find the limit of the sequence

Since the sequence is monotonic, and bounded, it converges.

Since the sequence converges, then it must be true that

(lim_(n -> ∞))(Subscript[a, n])= (lim_(n -> ∞))(Subscript[a, n-1])=L

Therefore, we have that

(Subscript[a, n])=(Sqrt[2(Subscript[a, n-1])])
 (lim_(n -> ∞))((Subscript[a, n])=(Sqrt[2(Subscript[a, n-1])]))
L=(Sqrt[2L]) 
(L^2)=2L
L=+2,0

We can exclude L=0, since the sequence is increasing, and (Subscript[a, 1])=(Sqrt[2]). Therefore, the limit is 2.

11.1.60

Here is the sequence we are investigating:

(Subscript[a, 1])=(Sqrt[2]), (Subscript[a, n])=(Sqrt[2+(Subscript[a, n-1])]), n=2,3,4,...

Notice that the index labelling has switched slightly so we can easily input this form into Mathematica. This is the same as writing

(Subscript[a, 1])=(Sqrt[2]), (Subscript[a, n+1])=(Sqrt[2+(Subscript[a, n])]), n=1,2,3,...

We can input this into Mathematica in the following way:

Clear[a]
a[1]:=(Sqrt[2.0])
a[n_]:=a[n]=(Sqrt[2+a[n-1]])

TableForm[Table[{n,a[n]},{n,1,10}]]

It looks like the sequence is approaching 2. Let's show the sequence converges.

Show the sequence is increasing

To show the sequence is increasing we shall use mathematical induction (see page 79). We want to show (Subscript[a, n+1])≥(Subscript[a, n])for all n≥1.

Step 1 in induction: Show the result is true for n=1. 
If n=1, we have that (Subscript[a, 2])=(Sqrt[2+(Sqrt[2])])>(Sqrt[2+(Sqrt[1])])=(Sqrt[3])>(Sqrt[2])=(Subscript[a, 1]). So the result is true for n=1.

Step 2 in induction: Assume the result is true for n=k. 
If n=k, we have that (Subscript[a, k+1])≥(Subscript[a, k]).

Step 3 in induction: Show the result is true for n=k+1. 
We now need to show (Subscript[a, k+2])≥(Subscript[a, k+1])is true.

(Subscript[a, k+1])≥(Subscript[a, k])           (true by step 2)
 2+(Subscript[a, k+1])≥2+(Subscript[a, k])
 (Sqrt[2+(Subscript[a, k+1])])≥(Sqrt[2+(Subscript[a, k])])
 (Subscript[a, k+2])≥(Subscript[a, k+1])

So we have shown that  (Subscript[a, k+2])≥(Subscript[a, k+1])is true. Therefore, (Subscript[a, n+1])≥(Subscript[a, n])for all n≥1is true by mathematical induction. The sequence is increasing. The lower bound of the sequence is (Subscript[a, 1])=(Sqrt[2]).

Show the sequence is bounded above

To show the sequence is bounded above we shall use mathematical induction (see page 79). We want to show (Subscript[a, n])≤3for all n≥1 (the question gave us the hint that 3 would work as an upper bound).

Step 1 in induction: Show the result is true for n=1. 
If n=1, we have that (Subscript[a, 1])=(Sqrt[2])≤ 3. So the result is true for n=1.

Step 2 in induction: Assume the result is true for n=k. 
If n=k, we have that (Subscript[a, k])≤3.

Step 3 in induction: Show the result is true for n=k+1. 
We now need to show (Subscript[a, k+1])≤3is true.

(Subscript[a, k])≤3           (true by step 2)
 2+(Subscript[a, k])≤2+3
  (Subscript[a, k+1])=(Sqrt[2+(Subscript[a, k])])≤(Sqrt[2+3])=(Sqrt[5])≤3
 (Subscript[a, k+1])≤3

So we have shown that  (Subscript[a, k+1])≤3is true. Therefore, (Subscript[a, n])≤3for alln≥1is true by mathematical induction. The sequence is bounded above.

Find the limit of the sequence

Since the sequence is monotinic, and bounded, it converges.

Since the sequence converges, then it must be true that

(lim_(n -> ∞))(Subscript[a, n])= (lim_(n -> ∞))(Subscript[a, n-1])=L

Therefore, we have that

(Subscript[a, n])=(Sqrt[2+(Subscript[a, n-1])])
 (lim_(n -> ∞))((Subscript[a, n])=(Sqrt[2+(Subscript[a, n-1])]))
L=(Sqrt[2+L]) 
(L^2)=2+L
L=+2,-1

We can exclude L=-1, since (Subscript[a, n])=+(Sqrt[2+(Subscript[a, n-1])])>0.Therefore, the limit is 2.