A622 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A6 · Lesson 22 · Sequences

Does it settle down?

A digital filter produces one output number per sample. Newton's method produces one better guess per step. A feedback loop in a microcontroller updates once per tick. Each makes a sequence, an endless list of numbers, and the engineering question is always the same: does it settle to a final value, how fast, and does it overshoot on the way? This lesson makes "settles" precise and gives you the standard sequences to compare against.

  • A simple digital filter, yn=ryn−1+(1−r), starts at y0=0 and is fed a constant 1. Its outputs are yn=1−rn.
  • Slide r between 0 and 1. How does the speed of settling change?
  • Now make r negative. What changes? What happens as |r| approaches 1?

Predict

The filter has r=0.9. About how many samples does it take to get within 1% of its final value?

Name it

The limit of a sequence

A sequence a1,a2,a3,… converges to L if its terms get and stay as close to L as you like: for every tolerance ε>0 there's a point N after which every an is within ε of L. We write limn→∞⁡an=L. A sequence that doesn't converge diverges, by growing without bound like n2 or by never settling like (−1)n.

All the limit laws from A5 carry over. For ratios of polynomials, divide top and bottom by the highest power of n.

Standard limits

SequenceLimit
rn0 if |r|<1; 1 if r=1; diverges otherwise
nkan, a>10 (exponentials beat powers)
ln⁡nnp, p>00 (powers beat logarithms)
ann!0 (factorials beat exponentials)
(1+xn)nex
n1/n1

Two tools

Monotone and bounded: a sequence that only increases and never passes some ceiling must converge. That's how you know an iteration settles even before you know where.

Fixed points: if an+1=g(an) converges, its limit L satisfies L=g(L). It converges to L when |g′(L)|<1; the filter above has g(y)=ry+(1−r), so g′=r, which is exactly the condition |r|<1 for a stable filter.

Worked example

Find limn→∞⁡3n2+12n2−n.

Show the solution
  1. Divide top and bottom by n2. 3n2+12n2−n=3+1/n22−1/n
  2. Let n→∞. The small terms vanish, leaving 32.

Answer the limit is 32.

Worked example

Iterate an+1=12(an+2an) from a0=1. Where does it go?

Show the solution
  1. Iterate. a1=1.5a2=1.41667a3=1.414216 and 2=1.414214.
  2. Find the limit. If the limit is L, then L=12(L+2L)soL2=2
  3. Recognize the method. This is Newton's method for 2, and the number of correct digits roughly doubles each step.

Answer it goes to 2=1.414214.

Worked example

What does (1+1n)n approach as n grows? Compute it at n = 100.

Show the solution
  1. Evaluate at n=100. 1.01100=2.7048
  2. Take logs. Since ln⁡(1+x)≈x, nln⁡(1+1/n)→1 so the sequence approaches e1=2.71828.
  3. Interpret. This is compound interest with ever more frequent compounding, and it's one way to define e.

Answer it approaches e=2.71828; at n = 100 it's 2.7048.

Check

Find limn→∞⁡3n2+14n2+n.

Check

The filter yn=0.8yn−1+(1−0.8) starts at 0 with a constant input of 1. What is y5?

Check

For that filter with r = 0.8, how many samples until the output is within 1% of its final value?

Check

The iteration xn+1=2+0.5xn converges. To what?

Check

Find limn→∞⁡(1+3n)n.

Check

Which sequence converges to zero?

Check

Consider (1+2n)n.

(a)

What is it at n = 100?

(b)

What is its limit as n→∞?

Check

Find the limit of (1+kn)n.

Step 1

Take the natural log of the sequence.

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why does the filter yn=ryn−1+(1−r) settle only when |r|<1?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.