Skip to main content

Sequences and Series — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for sequences and series.

UT-1: Telescoping Series with Misidentified Cancellation

Question:

Evaluate the sum:

Sn=r=1n1r(r+1)(r+2)S_n = \sum_{r=1}^{n} \frac{1}{r(r+1)(r+2)}

Express your answer in terms of nn, and hence find limnSn\lim_{n \to \infty} S_n.

[Difficulty: hard. Tests partial fraction decomposition for a telescoping series with three factors in the denominator, where the cancellation pattern is commonly misidentified.]

Solution:

Step 1: Partial fraction decomposition.

We seek constants AA, BB, CC such that:

1r(r+1)(r+2)=Ar+Br+1+Cr+2\frac{1}{r(r+1)(r+2)} = \frac{A}{r} + \frac{B}{r+1} + \frac{C}{r+2}

Multiplying through by r(r+1)(r+2)r(r+1)(r+2):

1=A(r+1)(r+2)+Br(r+2)+Cr(r+1)1 = A(r+1)(r+2) + Br(r+2) + Cr(r+1)

Substituting r=0r = 0: 1=A(1)(2)    A=121 = A(1)(2) \implies A = \frac{1}{2}.

Substituting r=1r = -1: 1=B(1)(1)    B=11 = B(-1)(1) \implies B = -1.

Substituting r=2r = -2: 1=C(2)(1)    C=121 = C(-2)(-1) \implies C = \frac{1}{2}.

Step 2: Verify.

1/2r1r+1+1/2r+2=(r+1)(r+2)2r(r+2)+r(r+1)2r(r+1)(r+2)\frac{1/2}{r} - \frac{1}{r+1} + \frac{1/2}{r+2} = \frac{(r+1)(r+2) - 2r(r+2) + r(r+1)}{2r(r+1)(r+2)}

Numerator: (r2+3r+2)+(2r24r)+(r2+r)=(r22r2+r2)+(3r4r+r)+2=0+0+2=2(r^2 + 3r + 2) + (-2r^2 - 4r) + (r^2 + r) = (r^2 - 2r^2 + r^2) + (3r - 4r + r) + 2 = 0 + 0 + 2 = 2.

So the fraction is 22r(r+1)(r+2)=1r(r+1)(r+2)\frac{2}{2r(r+1)(r+2)} = \frac{1}{r(r+1)(r+2)}. Confirmed.

Step 3: Write out the telescoping sum.

Sn=r=1n(1/2r1r+1+1/2r+2)S_n = \sum_{r=1}^{n}\left(\frac{1/2}{r} - \frac{1}{r+1} + \frac{1/2}{r+2}\right)

=12r=1n1rr=1n1r+1+12r=1n1r+2= \frac{1}{2}\sum_{r=1}^{n}\frac{1}{r} - \sum_{r=1}^{n}\frac{1}{r+1} + \frac{1}{2}\sum_{r=1}^{n}\frac{1}{r+2}

Re-index the sums:

=12r=1n1rr=2n+11r+12r=3n+21r= \frac{1}{2}\sum_{r=1}^{n}\frac{1}{r} - \sum_{r=2}^{n+1}\frac{1}{r} + \frac{1}{2}\sum_{r=3}^{n+2}\frac{1}{r}

=(121+1212+12r=3n1r)(12+r=3n1r+1n+1)+(12r=3n1r+121n+1+121n+2)= \left(\frac{1}{2} \cdot 1 + \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2}\sum_{r=3}^{n}\frac{1}{r}\right) - \left(\frac{1}{2} + \sum_{r=3}^{n}\frac{1}{r} + \frac{1}{n+1}\right) + \left(\frac{1}{2}\sum_{r=3}^{n}\frac{1}{r} + \frac{1}{2}\cdot\frac{1}{n+1} + \frac{1}{2}\cdot\frac{1}{n+2}\right)

Collecting terms involving r=3n1r\sum_{r=3}^{n}\frac{1}{r}: 121+12=0\frac{1}{2} - 1 + \frac{1}{2} = 0. The sums cancel (confirming the telescoping).

Remaining terms:

12+14121n+1+12(n+1)+12(n+2)\frac{1}{2} + \frac{1}{4} - \frac{1}{2} - \frac{1}{n+1} + \frac{1}{2(n+1)} + \frac{1}{2(n+2)}

=1412(n+1)+12(n+1)+12(n+2)= \frac{1}{4} - \frac{1}{2(n+1)} + \frac{1}{2(n+1)} + \frac{1}{2(n+2)}

=14+12(n+2)= \frac{1}{4} + \frac{1}{2(n+2)}

Step 4: Find the limit.

limnSn=14+0=14\lim_{n \to \infty} S_n = \frac{1}{4} + 0 = \frac{1}{4}


UT-2: Sigma Notation Index Shifting Errors

Question:

Given that r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6}, find the value of:

r=4n+3(r3)2\sum_{r=4}^{n+3} (r-3)^2

in terms of nn.

A common student error is to substitute r3r - 3 into the formula and write (n+3)(n+4)(2n+7)6\frac{(n+3)(n+4)(2n+7)}{6}. Identify the mistake in this approach and give the correct answer.

[Difficulty: hard. Tests the common error of not adjusting the summation limits when performing an index shift.]

Solution:

The student's error: The student substitutes r3r - 3 for rr in the formula but forgets that the upper limit also changes. The formula r=1mr2=m(m+1)(2m+1)6\sum_{r=1}^{m} r^2 = \frac{m(m+1)(2m+1)}{6} requires the sum to start at r=1r = 1 and end at r=mr = m.

Correct approach — Method 1: Index shift.

Let k=r3k = r - 3. When r=4r = 4, k=1k = 1. When r=n+3r = n + 3, k=nk = n.

r=4n+3(r3)2=k=1nk2=n(n+1)(2n+1)6\sum_{r=4}^{n+3} (r-3)^2 = \sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}

Correct approach — Method 2: Subtract sums.

r=4n+3(r3)2=r=1n+3(r3)2r=13(r3)2\sum_{r=4}^{n+3} (r-3)^2 = \sum_{r=1}^{n+3} (r-3)^2 - \sum_{r=1}^{3} (r-3)^2

Note that r=1n+3(r3)2=k=2nk2\sum_{r=1}^{n+3}(r-3)^2 = \sum_{k=-2}^{n} k^2 where k=r3k = r - 3. This is not the standard form. We need to be more careful:

r=4n+3(r3)2=r=1n+3(r3)2r=13(r3)2\sum_{r=4}^{n+3} (r-3)^2 = \sum_{r=1}^{n+3}(r-3)^2 - \sum_{r=1}^{3}(r-3)^2

=k=2nk2[(2)2+(1)2+02]= \sum_{k=-2}^{n} k^2 - [(-2)^2 + (-1)^2 + 0^2]

=k=1nk2+(2)2+(1)2[4+1+0]= \sum_{k=1}^{n} k^2 + (-2)^2 + (-1)^2 - [4 + 1 + 0]

=k=1nk2+4+15=k=1nk2=n(n+1)(2n+1)6= \sum_{k=1}^{n} k^2 + 4 + 1 - 5 = \sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}

The student's answer was (n+3)(n+4)(2n+7)6\frac{(n+3)(n+4)(2n+7)}{6}, which equals r=1n+3r2\sum_{r=1}^{n+3} r^2, not r=4n+3(r3)2\sum_{r=4}^{n+3}(r-3)^2. The student incorrectly treated the sum as starting from r=1r = 1 with upper limit n+3n + 3.


UT-3: Recurrence Relation with Non-Standard Initial Terms

Question:

A sequence is defined by the recurrence relation:

un+2=5un+16un,n1u_{n+2} = 5u_{n+1} - 6u_n, \quad n \geq 1

with u1=1u_1 = 1 and u2=5u_2 = 5.

(a) Find u3u_3, u4u_4, and u5u_5.

(b) Find a closed-form expression for unu_n in terms of nn.

(c) Find the smallest value of nn such that un>10000u_n > 10000.

[Difficulty: hard. Tests solving second-order linear recurrence relations using the characteristic equation method.]

Solution:

(a)

u3=5(5)6(1)=256=19u_3 = 5(5) - 6(1) = 25 - 6 = 19

u4=5(19)6(5)=9530=65u_4 = 5(19) - 6(5) = 95 - 30 = 65

u5=5(65)6(19)=325114=211u_5 = 5(65) - 6(19) = 325 - 114 = 211

(b) The characteristic equation is:

λ25λ+6=0\lambda^2 - 5\lambda + 6 = 0 (λ2)(λ3)=0(\lambda - 2)(\lambda - 3) = 0 λ=2orλ=3\lambda = 2 \quad \text{or} \quad \lambda = 3

The general solution is un=A2n+B3nu_n = A \cdot 2^n + B \cdot 3^n.

Using the initial conditions:

n=1:A2+B3=1n = 1: A \cdot 2 + B \cdot 3 = 1 n=2:A4+B9=5n = 2: A \cdot 4 + B \cdot 9 = 5

From the first equation: A=13B2A = \frac{1 - 3B}{2}.

Substituting into the second:

4(13B2)+9B=54\left(\frac{1-3B}{2}\right) + 9B = 5 26B+9B=52 - 6B + 9B = 5 3B=33B = 3 B=1B = 1

A=132=1A = \frac{1 - 3}{2} = -1

un=3n2nu_n = 3^n - 2^n

Verification: u1=32=1u_1 = 3 - 2 = 1 ✓. u2=94=5u_2 = 9 - 4 = 5 ✓. u3=278=19u_3 = 27 - 8 = 19 ✓.

(c) We need 3n2n>100003^n - 2^n > 10000.

For large nn, 3n3^n dominates 2n2^n. We need 3n100003^n \gtrapprox 10000.

n=8n = 8: 3828=6561256=6305<100003^8 - 2^8 = 6561 - 256 = 6305 < 10000.

n=9n = 9: 3929=19683512=19171>100003^9 - 2^9 = 19683 - 512 = 19171 > 10000.

The smallest value is n=9n = 9.


Integration Tests

Tests synthesis of sequences and series with other topics. Requires combining concepts from multiple units.

IT-1: Integral as a Limit of Partial Sums (with Integration)

Question:

(a) Show that r=1nrn2=n(n+1)2n2\sum_{r=1}^{n} \frac{r}{n^2} = \frac{n(n+1)}{2n^2}.

(b) Hence evaluate limnr=1nrn2\lim_{n \to \infty} \sum_{r=1}^{n} \frac{r}{n^2}.

(c) By interpreting the limit in part (b) as a Riemann sum, identify the corresponding definite integral and verify your answer by direct integration.

(d) Use a similar approach to evaluate limnr=1nr2n3\lim_{n \to \infty} \sum_{r=1}^{n} \frac{r^2}{n^3}.

[Difficulty: hard. Connects summation to integration through Riemann sums, testing understanding of the Fundamental Theorem of Calculus.]

Solution:

(a) r=1nrn2=1n2r=1nr=1n2n(n+1)2=n(n+1)2n2\sum_{r=1}^{n} \frac{r}{n^2} = \frac{1}{n^2}\sum_{r=1}^{n} r = \frac{1}{n^2} \cdot \frac{n(n+1)}{2} = \frac{n(n+1)}{2n^2}.

(b) limnn(n+1)2n2=limnn+12n=limn1+1/n2=12\lim_{n \to \infty} \frac{n(n+1)}{2n^2} = \lim_{n \to \infty} \frac{n+1}{2n} = \lim_{n \to \infty} \frac{1 + 1/n}{2} = \frac{1}{2}.

(c) The sum r=1nrn2=r=1nrn1n\sum_{r=1}^{n} \frac{r}{n^2} = \sum_{r=1}^{n} \frac{r}{n} \cdot \frac{1}{n} is a Riemann sum for 01xdx\int_0^1 x \, dx with nn subdivisions, using right-endpoint evaluation (since xr=r/nx_r = r/n).

Verification: 01xdx=[x22]01=12\int_0^1 x \, dx = \left[\frac{x^2}{2}\right]_0^1 = \frac{1}{2}. Confirmed.

(d) r=1nr2n3=r=1n(rn)21n\sum_{r=1}^{n} \frac{r^2}{n^3} = \sum_{r=1}^{n} \left(\frac{r}{n}\right)^2 \cdot \frac{1}{n}.

This is a Riemann sum for 01x2dx\int_0^1 x^2 \, dx.

01x2dx=[x33]01=13\int_0^1 x^2 \, dx = \left[\frac{x^3}{3}\right]_0^1 = \frac{1}{3}

Algebraic verification: 1n3n(n+1)(2n+1)6=(n+1)(2n+1)6n2\frac{1}{n^3} \cdot \frac{n(n+1)(2n+1)}{6} = \frac{(n+1)(2n+1)}{6n^2}.

limn(n+1)(2n+1)6n2=limn2n2+3n+16n2=26=13\lim_{n \to \infty} \frac{(n+1)(2n+1)}{6n^2} = \lim_{n \to \infty} \frac{2n^2 + 3n + 1}{6n^2} = \frac{2}{6} = \frac{1}{3}

Confirmed.


IT-2: Iteration Converging to a Fixed Point (with Functions)

Question:

The function ff is defined by f(x)=cosxf(x) = \cos x where xx is in radians.

A sequence is defined by x0=1x_0 = 1 and xn+1=f(xn)=cos(xn)x_{n+1} = f(x_n) = \cos(x_n) for n0n \geq 0.

(a) Find x1x_1, x2x_2, x3x_3, and x4x_4 to 6 decimal places.

(b) Prove that the sequence (xn)(x_n) is convergent.

(c) The limit LL satisfies L=cosLL = \cos L. By considering the function g(x)=xcosxg(x) = x - \cos x, show that LL is the unique solution to this equation in [0,π/2][0, \pi/2].

(d) Use the Newton-Raphson method with starting value x0=1x_0 = 1 to find LL to 8 decimal places.

[Difficulty: hard. Combines fixed-point iteration, convergence proofs, and the Newton-Raphson method.]

Solution:

(a) Using a calculator (radians):

x1=cos(1)=0.540302x_1 = \cos(1) = 0.540302 x2=cos(0.540302)=0.857553x_2 = \cos(0.540302) = 0.857553 x3=cos(0.857553)=0.654290x_3 = \cos(0.857553) = 0.654290 x4=cos(0.654290)=0.793480x_4 = \cos(0.654290) = 0.793480

(b) To prove convergence, we use the contraction mapping theorem. We need f(x)<1|f'(x)| < 1 on the relevant interval.

f(x)=sinxf'(x) = -\sin x, so f(x)=sinxsin(1)0.841<1|f'(x)| = |\sin x| \leq \sin(1) \approx 0.841 < 1 for all x[0,1]x \in [0, 1].

Since x0=1[0,1]x_0 = 1 \in [0, 1] and ff maps [0,1][0, 1] into itself (because cos(0)=11\cos(0) = 1 \leq 1 and cos(1)0.540\cos(1) \approx 0.54 \geq 0), and f(x)k<1|f'(x)| \leq k < 1 for all x[0,1]x \in [0, 1] where k=sin1k = \sin 1, the sequence converges by the Banach fixed-point theorem.

(c) g(x)=xcosxg(x) = x - \cos x. Then g(0)=01=1<0g(0) = 0 - 1 = -1 < 0 and g(π/2)=π/20=π/2>0g(\pi/2) = \pi/2 - 0 = \pi/2 > 0.

By the intermediate value theorem, there exists L(0,π/2)L \in (0, \pi/2) with g(L)=0g(L) = 0.

For uniqueness: g(x)=1+sinx>0g'(x) = 1 + \sin x > 0 for all x[0,π/2]x \in [0, \pi/2] (since sinx0\sin x \geq 0 in this interval). Therefore gg is strictly increasing on [0,π/2][0, \pi/2], so g(x)=0g(x) = 0 has at most one solution in this interval.

Combined: there is exactly one solution L(0,π/2)L \in (0, \pi/2).

(d) Newton-Raphson: xn+1=xng(xn)g(xn)=xnLBxncosxnRB◆◆LB1+sinxnRBx_{n+1} = x_n - \frac{g(x_n)}{g'(x_n)} = x_n - \frac◆LB◆x_n - \cos x_n◆RB◆◆LB◆1 + \sin x_n◆RB◆.

Starting with x0=1x_0 = 1:

x1=1LB1cos1RB◆◆LB1+sin1RB=110.5403021+0.841471=10.4596981.841471=10.249649=0.750351x_1 = 1 - \frac◆LB◆1 - \cos 1◆RB◆◆LB◆1 + \sin 1◆RB◆ = 1 - \frac{1 - 0.540302}{1 + 0.841471} = 1 - \frac{0.459698}{1.841471} = 1 - 0.249649 = 0.750351

x2=0.750351LB0.750351cos(0.750351)RB◆◆LB1+sin(0.750351)RB=0.7503510.7503510.7311251+0.681676=0.7503510.0192261.681676x_2 = 0.750351 - \frac◆LB◆0.750351 - \cos(0.750351)◆RB◆◆LB◆1 + \sin(0.750351)◆RB◆ = 0.750351 - \frac{0.750351 - 0.731125}{1 + 0.681676} = 0.750351 - \frac{0.019226}{1.681676}

=0.7503510.011434=0.738917= 0.750351 - 0.011434 = 0.738917

x3=0.7389170.7389170.7390671+0.673717=0.7389170.0001501.673717=0.738917+0.000090=0.739007x_3 = 0.738917 - \frac{0.738917 - 0.739067}{1 + 0.673717} = 0.738917 - \frac{-0.000150}{1.673717} = 0.738917 + 0.000090 = 0.739007

x4=0.7390070.7390070.7390851+0.673812=0.7390070.0000781.673812=0.739007+0.000047=0.739054x_4 = 0.739007 - \frac{0.739007 - 0.739085}{1 + 0.673812} = 0.739007 - \frac{-0.000078}{1.673812} = 0.739007 + 0.000047 = 0.739054

x5=0.7390540.7390540.7390851.673812=0.739054+0.000019=0.739073x_5 = 0.739054 - \frac{0.739054 - 0.739085}{1.673812} = 0.739054 + 0.000019 = 0.739073

x6=0.7390730.7390730.7390851.673813=0.739073+0.000007=0.739080x_6 = 0.739073 - \frac{0.739073 - 0.739085}{1.673813} = 0.739073 + 0.000007 = 0.739080

x7=0.7390800.7390800.7390851.673813=0.739080+0.000003=0.739083x_7 = 0.739080 - \frac{0.739080 - 0.739085}{1.673813} = 0.739080 + 0.000003 = 0.739083

x8=0.7390830.7390830.7390851.673813=0.739083+0.000001=0.739084x_8 = 0.739083 - \frac{0.739083 - 0.739085}{1.673813} = 0.739083 + 0.000001 = 0.739084

To 8 decimal places: L=0.73908513L = 0.73908513.

This is the Dottie number, the unique fixed point of the cosine function.


IT-3: Binomial Identity Used to Sum a Series (with Binomial Expansion)

Question:

(a) Use the binomial theorem to expand (1+1)n(1 + 1)^n and hence show that:

r=0n(nr)=2n\sum_{r=0}^{n} \binom{n}{r} = 2^n

(b) By differentiating the binomial expansion of (1+x)n(1 + x)^n and setting x=1x = 1, show that:

r=1nr(nr)=n2n1\sum_{r=1}^{n} r\binom{n}{r} = n \cdot 2^{n-1}

(c) Hence evaluate:

r=1nr2(nr)\sum_{r=1}^{n} r^2 \binom{n}{r}

[Difficulty: hard. Tests generating function techniques applied to combinatorial sums through differentiation of the binomial expansion.]

Solution:

(a) By the binomial theorem:

(1+1)n=r=0n(nr)1nr1r=r=0n(nr)(1 + 1)^n = \sum_{r=0}^{n} \binom{n}{r} 1^{n-r} \cdot 1^r = \sum_{r=0}^{n} \binom{n}{r}

But (1+1)n=2n(1+1)^n = 2^n. Therefore r=0n(nr)=2n\sum_{r=0}^{n} \binom{n}{r} = 2^n.

(b) Start with (1+x)n=r=0n(nr)xr(1 + x)^n = \sum_{r=0}^{n} \binom{n}{r} x^r.

Differentiating both sides with respect to xx:

n(1+x)n1=r=0nr(nr)xr1=r=1nr(nr)xr1n(1+x)^{n-1} = \sum_{r=0}^{n} r\binom{n}{r} x^{r-1} = \sum_{r=1}^{n} r\binom{n}{r} x^{r-1}

(Note: the r=0r = 0 term vanishes.)

Setting x=1x = 1:

n2n1=r=1nr(nr)n \cdot 2^{n-1} = \sum_{r=1}^{n} r\binom{n}{r}

(c) Start with n(1+x)n1=r=1nr(nr)xr1n(1+x)^{n-1} = \sum_{r=1}^{n} r\binom{n}{r} x^{r-1}.

Multiply both sides by xx:

nx(1+x)n1=r=1nr(nr)xrnx(1+x)^{n-1} = \sum_{r=1}^{n} r\binom{n}{r} x^r

Differentiate with respect to xx:

n(1+x)n1+nx(n1)(1+x)n2=r=1nr2(nr)xr1n(1+x)^{n-1} + nx(n-1)(1+x)^{n-2} = \sum_{r=1}^{n} r^2\binom{n}{r} x^{r-1}

Factor the left side:

n(1+x)n2[(1+x)+x(n1)]=n(1+x)n2(1+x+nxx)=n(1+x)n2(1+nx)n(1+x)^{n-2}[(1+x) + x(n-1)] = n(1+x)^{n-2}(1 + x + nx - x) = n(1+x)^{n-2}(1 + nx)

Setting x=1x = 1:

n2n2(1+n)=r=1nr2(nr)n \cdot 2^{n-2}(1 + n) = \sum_{r=1}^{n} r^2\binom{n}{r}

r=1nr2(nr)=n(n+1)2n2\sum_{r=1}^{n} r^2\binom{n}{r} = n(n+1) \cdot 2^{n-2}

Verification for n=3n = 3: LHS =13+43+91=3+12+9=24= 1 \cdot 3 + 4 \cdot 3 + 9 \cdot 1 = 3 + 12 + 9 = 24. RHS =342=24= 3 \cdot 4 \cdot 2 = 24. Confirmed.