---
title: "Difference equation x(k+2)+3x(k+1)+2x(k)=0"
subject: "Digital Control System"
chapter: 2
key: "semester_6/digital_control_system:difference-equation-x0-0-x1-1"
source: https://www.bctengineer.com/q/semester_6/digital_control_system/difference-equation-x0-0-x1-1
site: BCT Engineering
---

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

Digital Control System · Chapter 2: The Z-Transform

- Asked in: 2082 Chaitra (new course), 4 marks; 2082 Chaitra, 6 marks; 2081 Chaitra, 5 marks; 2076 Bhadra, 4 marks; 2073 Magh, 8 marks (asked 5 times)
- Video: [Applications To Difference Equations Z Transforms -Problem 8](https://www.youtube.com/watch?v=bk_TBQhxLv8) — Btech Maths Hub
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/digital_control_system/difference-equation-x0-0-x1-1
- Whole chapter: https://www.bctengineer.com/md/semester_6/digital_control_system/chapter-2

## Question

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.

## 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.

## Answer

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

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

#### Step 1: Transform

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

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

$$
\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)/z$

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

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

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

#### Step 3: Inverse z-transform

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

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

#### Check

| k | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| $(-1)^k-(-2)^k$ | 0 | 1 | -3 | 7 | -15 | 31 |
| Recursion $x(k+2)=-3x(k+1)-2x(k)$ | 0 | 1 | -3 | 7 | -15 | 31 |

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

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

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Z[x(k+2)] equals:
   A. z^2X(z) - z^2x(0) - zx(1)
   B. z^2X(z)
   C. z^2X(z) - zx(0)
   D. z^2X(z) + z^2x(0) + zx(1)
   Answer: A. Initial conditions are subtracted. (Key point: Shift theorem)

2. With x(0)=0, x(1)=1, X(z) is:
   A. 1/((z+1)(z+2))
   B. z/((z+1)(z+2))
   C. z/((z-1)(z-2))
   D. z^2/((z+1)(z+2))
   Answer: B. (z^2+3z+2)X = z. (Key point: X(z))

3. The solution is:
   A. x(k) = (-1)^k + (-2)^k
   B. x(k) = 2^k - 1
   C. x(k) = (-1)^k - (-2)^k
   D. x(k) = (-2)^k - (-1)^k
   Answer: C. A = 1, B = -1 from partial fractions of X/z. (Key point: Solution)

4. The sequence grows in magnitude because:
   A. The pole z = -1 is inside
   B. There are no poles
   C. x(0) = 0
   D. The pole z = -2 lies outside the unit circle
   Answer: D. Values: 0, 1, -3, 7, -15, ... (Key point: Behaviour)

## Related in Digital Control System

- [Third-order difference equation: limit x(k+2)/x(k+1)](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Athird-order-difference-limit-k1) — Digital Control System, chapter 2
- [Backward difference equation with step input](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adifference-equation-backward-step) — Digital Control System, chapter 2
- [Difference equation with step input, x(1)=0.3679](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adifference-equation-step-0-3679) — Digital Control System, chapter 2, asked 2×
- [Third-order difference equation: limit x(k+2)/x(k)](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Athird-order-difference-limit-k) — Digital Control System, chapter 2, asked 2×
- [Difference equation with step input](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adifference-equation-step-0-25) — Digital Control System, chapter 2, asked 2×
- [Fibonacci difference equation: series to 8 terms](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Afibonacci-series-8-terms) — Digital Control System, chapter 2

## Related in other subjects

- [Difference eq x(k+2)+2x(k+1)+3x(k)=0](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Adifference-eq-2x1-3x-x0-0-x1-2) — Applied Mathematics, chapter 2, asked 5×
- [Difference eq x(k+2)+3x(k+1)+2x(k)=0](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Adifference-eq-3x1-2x-x0-0-x1-1) — Applied Mathematics, chapter 2, asked 3×
- [Difference eq x(k+2)-3x(k+1)+2x(k)=4^k](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Adifference-eq-forced-4k) — Applied Mathematics, chapter 2
- [Difference equation by Z-transform](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Adifference-equation-by-z-transform-two) — Mathematics III, chapter 3, asked 2×
