Skip to main content

Difference equation x(k+2)+3x(k+1)+2x(k)=0

Short answer

Take Z-transform: (z²+3z+2)X(z)=z, so X(z)=z/((z+1)(z+2)). Partial fractions give X(z)=z/(z+1) – z/(z+2). Inverse transform yields x(k) = (-1)^k – (-2)^k.

Solve the following difference equation by use of Z-transform method: x(k+2)+3x(k+1)+2x(k)=0, given that x(0)=0, x(1)=1.

Take the z-transform of both sides using the shifting theorems:

Z[x(k+1)]=zX(z)−zx(0)\mathcal{Z}[x(k+1)] = zX(z) - zx(0), Z[x(k+2)]=z2X(z)−z2x(0)−zx(1)\quad\mathcal{Z}[x(k+2)] = z^2X(z) - z^2x(0) - zx(1)

Step 1: Transform

[z2X(z)−z2x(0)−zx(1)]+3[zX(z)−zx(0)]+2X(z)=0[z^2X(z) - z^2x(0) - zx(1)] + 3[zX(z) - zx(0)] + 2X(z) = 0

Substituting x(0)=0x(0)=0, x(1)=1x(1)=1:

z2X(z)−z+3zX(z)+2X(z)=0(z2+3z+2)X(z)=zX(z)=z(z+1)(z+2)\begin{aligned} z^2X(z) - z + 3zX(z) + 2X(z) &= 0 \\ (z^2+3z+2)X(z) &= z \\ X(z) &= \frac{z}{(z+1)(z+2)} \end{aligned}

Step 2: Partial fractions of X(z)/zX(z)/z

X(z)z=1(z+1)(z+2)=Az+1+Bz+2\frac{X(z)}{z} = \frac{1}{(z+1)(z+2)} = \frac{A}{z+1} + \frac{B}{z+2}

A=1z+2∣z=−1=1A = \left.\frac{1}{z+2}\right|_{z=-1} = 1, B=1z+1∣z=−2=−1\quad B = \left.\frac{1}{z+1}\right|_{z=-2} = -1

X(z)=zz+1−zz+2X(z) = \frac{z}{z+1} - \frac{z}{z+2}

Step 3: Inverse z-transform

Using Z−1[zz−a]=ak\mathcal{Z}^{-1}\left[\frac{z}{z-a}\right] = a^k:

x(k)=(−1)k−(−2)k,k=0,1,2,…x(k) = (-1)^k - (-2)^k, \quad k = 0, 1, 2, \dots

Check

k012345
(−1)k−(−2)k(-1)^k-(-2)^k01-37-1531
Recursion x(k+2)=−3x(k+1)−2x(k)x(k+2)=-3x(k+1)-2x(k)01-37-1531

Both agree, and the initial conditions are satisfied. The pole at z=−2z=-2 lies outside the unit circle, so the sequence grows in magnitude with alternating sign.

Answer: x(k)=(−1)k−(−2)kx(k) = (-1)^k - (-2)^k, i.e. x(k)=0,1,−3,7,−15,31,…x(k) = 0, 1, -3, 7, -15, 31, \dots

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Control System chapter 2 questions →