Homework 1.3

Andy Long, Spring, 2024

Section 1.3, pp. 29-30, #2, 4, 6a-c, 9, 12, 19

First we can just motivate that it appears to be linearly convergent (α=1).

a[n_]:=(n+1)/(n-2)
alpha[a_,p_,n_]:=Log[Abs[(a[n+2]-p)/(a[n+1]-p)]]/Log[Abs[(a[n+1]-p)/(a[n+0]-p)]]
TableForm[Table[{n,N[alpha[a,0,n]]},{n,2,20}]]

4. Give an example of a sequence which converges to 0 with order α=10.

a[n_]:=2^(1-10^n)
TableForm[Table[{n,N[alpha[a,0,n]]},{n,2,5}]]

a[n_]:=6/7^n
TableForm[Table[{n,N[alpha[a,0,n]]},{n,1,5}]]

b[n_]:=(11n-2)/(n+3)
TableForm[Table[{n,N[alpha[b,11,n]]},{n,1,20}]]

c[n_]:=Sin[n]/Sqrt[n]
TableForm[Table[{n,N[alpha[c,0,n]]},{n,1,5}]] (* Not enlightening! *)

When will d(n)=12? If α=1, then it all comes down to the log term: The formula is actually


So for α=1, the rule of thumb is that d((Subscript[p, n])) = (Subscript[d, 0]) - n(log[λ|p((|)^(α-1))])

d[n_,lambda_]:=1-n Log10[lambda ]
Solve[d[n,0.8]==12,n]
Solve[d[n,0.5]==12,n]
Solve[d[n,0.1]==12,n]

d[n_,p_,lambda_,alpha_]:=Module[{c=Log10[lambda Abs[p]^(alpha-1)]/(alpha-1)},
(1-c)alpha^n+c
]
lambda=.5; (* To do it right, we'd need a lambda. One is not provided. That means they're using a separate rule of thumb, one in which we simply say that the number of digits will go up by a power of alpha at each iteration. Hence *)

d[alpha_,digits_]:=N[Log10[digits]/Log10[alpha]]
d[1.5,12]
d[2,12]
d[3,13]