From Complex Roots to Real Oscillations
A real recurrence can have complex characteristic roots even though every term of the sequence is real. When the roots are a conjugate pair, their contributions combine into a real expression involving sine and cosine. The resulting sequence may alternate in sign or oscillate in a more gradual pattern, while a factor raised to the index controls its scale.
Consider a real sequence \((x_n)_{n\geq 0}\) satisfying a second-order homogeneous recurrence \(x_{n+2}+a x_{n+1}+b x_n=0\) for every integer \(n\geq 0\), where \(a,b\in\mathbb R\). Two initial values, \(x_0\) and \(x_1\), determine the later terms. The characteristic polynomial of this recurrence is \(p(\lambda)=\lambda^2+a\lambda+b\); its roots are called the characteristic roots. To see why they are relevant, substituting a trial sequence \(x_n=\lambda^n\) gives \(\lambda^{n+2}+a\lambda^{n+1}+b\lambda^n=\lambda^n p(\lambda)\). Thus a root produces a sequence that satisfies the recurrence.
Writing the roots this way separates their shared size \(r\) from their opposite angles. Their sum is \(2r\cos\theta\), and their product is \(r^2\). Consequently, the recurrence with these roots can be written \(x_{n+2}-2r\cos\theta\,x_{n+1}+r^2x_n=0\). This form makes the sine and cosine structure visible.
Proof. The recurrence has the form \(x_{n+2}-2r\cos\theta\,x_{n+1}+r^2x_n=0\), since the sum and product of its characteristic roots are \(2r\cos\theta\) and \(r^2\). The angle-addition identities give \(\cos((n+2)\theta)-2\cos\theta\cos((n+1)\theta)+\cos(n\theta)=0\), and the same identity holds with sine in place of cosine. Multiplying these identities by \(r^{n+2}\) shows that both \(r^n\cos(n\theta)\) and \(r^n\sin(n\theta)\) satisfy the recurrence. Their linear combination with real coefficients \(C,D\) therefore satisfies it as well.
At \(n=0\), that combination equals \(C\), so matching \(x_0\) requires \(C=x_0\). At \(n=1\), it equals \(r(C\cos\theta+D\sin\theta)\). Since \(0<\theta<\pi\) implies \(\sin\theta\ne0\), matching \(x_1\) gives \(D=(x_1/r-C\cos\theta)/\sin\theta\). Thus the displayed formula has the prescribed initial values. Finally, the recurrence determines each next term from the two preceding terms: \(x_{n+2}=2r\cos\theta\,x_{n+1}-r^2x_n\). Any two solutions with the same \(x_0,x_1\) must therefore agree at \(x_2\), then at \(x_3\), and successively at every later index. The formula is the unique solution. \(\square\)
Testing for a Nonreal Root Pair
Proof. The quadratic formula gives the roots \(\lambda=(-a\pm\sqrt{a^2-4b})/2\). If \(a^2-4b<0\), the square root is purely imaginary and the roots are nonreal conjugates. The inequality also gives \(b>a^2/4\geq0\), so \(r=\sqrt b\) is positive. The proposed cosine and sine satisfy \(\cos^2\theta+\sin^2\theta=\dfrac{a^2+4b-a^2}{4b}=1\), and the sine is positive. Hence they specify an angle in \((0,\pi)\), and the two roots are \(r(\cos\theta\pm i\sin\theta)\). Conversely, if the roots are \(\alpha+i\beta\) and \(\alpha-i\beta\) with \(\beta\ne0\), then their sum and product give \(a=-2\alpha\) and \(b=\alpha^2+\beta^2\). It follows that \(a^2-4b=4\alpha^2-4(\alpha^2+\beta^2)=-4\beta^2<0\). This proves both directions. \(\square\)
Worked Example: Finding the Formula from Initial Values
Solve \(x_{n+2}-2x_{n+1}+4x_n=0\) with \(x_0=1\) and \(x_1=2\).
The characteristic polynomial is \(\lambda^2-2\lambda+4\). Its discriminant is \((-2)^2-4(1)(4)=4-16=-12\), so its roots are \(\lambda=(2\pm\sqrt{-12})/2=1\pm i\sqrt3\). Each root has modulus \(r=\sqrt{1^2+(\sqrt3)^2}=2\). For the root with positive imaginary part, \(\cos\theta=1/2\) and \(\sin\theta=\sqrt3/2\), so \(\theta=\pi/3\).
The theorem gives \(C=x_0=1\), and \(D=\dfrac{x_1/r-C\cos\theta}{\sin\theta} =\dfrac{2/2-1/2}{\sqrt3/2} =\dfrac{1/2}{\sqrt3/2} =\dfrac1{\sqrt3}\). Therefore \(x_n=2^n\left(\cos\left(\dfrac{n\pi}{3}\right)+\dfrac1{\sqrt3}\sin\left(\dfrac{n\pi}{3}\right)\right)\).
Check: At \(n=0\), the formula gives \(1\). At \(n=1\), it gives \(2(1/2+1/2)=2\). The recurrence gives \(x_2=2x_1-4x_0=0\) and \(x_3=2x_2-4x_1=-8\). The formula also gives \(x_2=4(-1/2+1/2)=0\) and \(x_3=8(-1+0)=-8\), as required.
Two Further Forms of the Oscillation
The sine-and-cosine expression records the initial conditions directly, but it can also be written as a single shifted cosine. If \(C,D\) are not both zero, set \(R=\sqrt{C^2+D^2}\) and choose an angle \(\phi\) such that \(\cos\phi=C/R\) and \(\sin\phi=D/R\). Then the angle-addition identity gives \(C\cos(n\theta)+D\sin(n\theta)=R\cos(n\theta-\phi)\). Thus the solution is \(x_n=Rr^n\cos(n\theta-\phi)\). If \(C=D=0\), every term is zero, and no phase angle is needed. This form describes an oscillation whose angle advances by \(\theta\) at each step, scaled by \(Rr^n\).
For real coefficients, the discriminant test can often be used before calculating any roots. A negative discriminant means the recurrence has the oscillatory form above; a zero or positive discriminant does not give a nonreal conjugate pair. In particular, a repeated real root is not covered by this formula. The condition \(\sin\theta\ne0\) is essential when solving for \(D\), and is guaranteed here by the roots being nonreal.
Worked Example: A Pure Sine Pattern
Solve \(x_{n+2}+\tfrac14x_n=0\) with \(x_0=3\) and \(x_1=2\).
The characteristic polynomial is \(\lambda^2+\tfrac14\). Its roots satisfy \(\lambda^2=-\tfrac14\), so they are \(i/2\) and \(-i/2\). Hence \(r=1/2\) and \(\theta=\pi/2\). The constants are \(C=3\) and \(D=\dfrac{2/(1/2)-3\cos(\pi/2)}{\sin(\pi/2)}=4\). The solution is \(x_n=(1/2)^n(3\cos(n\pi/2)+4\sin(n\pi/2))\).
Check: The formula gives \(x_0=3\) and \(x_1=(1/2)(4)=2\). The recurrence gives \(x_2=-\tfrac14(3)=-\tfrac34\) and \(x_3=-\tfrac14(2)=-\tfrac12\). The formula gives \(x_2=(1/4)(-3)=-\tfrac34\) and \(x_3=(1/8)(-4)=-\tfrac12\), confirming the terms.
Worked Example: Roots with a Non-special Angle
Solve \(x_{n+2}-2x_{n+1}+5x_n=0\) with \(x_0=0\) and \(x_1=1\).
The characteristic polynomial is \(\lambda^2-2\lambda+5\). Its discriminant is \(4-20=-16\), and its roots are \(1\pm2i\). Their modulus is \(r=\sqrt5\). For the root \(1+2i\), \(\cos\theta=1/\sqrt5\) and \(\sin\theta=2/\sqrt5\); these values define \(\theta\) in \((0,\pi)\). The initial values give \(C=0\) and \(D=\dfrac{1/\sqrt5}{2/\sqrt5}=\tfrac12\). Thus \(x_n=\dfrac12(\sqrt5)^n\sin(n\theta)\), with \(\cos\theta=1/\sqrt5\) and \(\sin\theta=2/\sqrt5\).
Check: The formula gives \(x_0=0\) and \(x_1=\tfrac12\sqrt5(2/\sqrt5)=1\). The recurrence gives \(x_2=2x_1-5x_0=2\) and \(x_3=2x_2-5x_1=-1\). For \(n=2\), \(\sin(2\theta)=2\sin\theta\cos\theta=4/5\), so the formula gives \(x_2=\tfrac12(5)(4/5)=2\). For \(n=3\), \(\sin(3\theta)=3\sin\theta-4\sin^3\theta=-2/(5\sqrt5)\), so it gives \(x_3=\tfrac12(5\sqrt5)(-2/(5\sqrt5))=-1\).
Common Pitfall: Losing the Factor \(r\)
The initial value \(x_1\) is not \(C\cos\theta+D\sin\theta\); the formula has an additional factor \(r\) at index \(1\). For the first worked example, the incorrect calculation \(D=(x_1-C\cos\theta)/\sin\theta\) gives \(D=(2-\tfrac12)/(\sqrt3/2)=\sqrt3\). Substituting this value into the claimed solution gives \(x_1=2(\tfrac12+\sqrt3\cdot\tfrac{\sqrt3}{2})=4\), contradicting the required initial value \(x_1=2\). The correct calculation divides \(x_1\) by \(r\) first: \(D=(x_1/r-C\cos\theta)/\sin\theta=(1-\tfrac12)/(\sqrt3/2)=1/\sqrt3\). Always substitute the proposed constants back into both initial values before using the resulting sequence.
The formula also provides a simple scale bound. Since \(|\cos(n\theta)|\leq1\) and \(|\sin(n\theta)|\leq1\), it follows that \(|x_n|\leq r^n(|C|+|D|)\). This bound does not remove the oscillation; it separates a bound on the size from the changing sine-and-cosine factor. The central procedure is therefore: identify the conjugate roots, write their modulus and angle, use \(x_0,x_1\) to find \(C,D\), and verify the initial terms against the recurrence.
Check Your Understanding
For each problem, identify what the roots imply and check any proposed formula using the recurrence and its initial values.
- For \(x_{n+2}+2x_{n+1}+5x_n=0\), find the characteristic roots, \(r\), and \(\theta\).
- For \(x_{n+2}-x_n=0\), explain why the nonreal-conjugate formula in this tutorial does not apply.
- Find \(C,D\) for roots \(2(\cos(\pi/3)\pm i\sin(\pi/3))\) and initial values \(x_0=0,\ x_1=1\).
- Use the discriminant to decide whether \(x_{n+2}+3x_{n+1}+4x_n=0\) has a nonreal root pair.
- For a solution \(x_n=r^n(C\cos(n\theta)+D\sin(n\theta))\), write \(x_0\) and \(x_1\) in terms of \(r,\theta,C,D\).