---
title: "Difference equation with given input sequence"
subject: "Digital Control System"
chapter: 2
key: "semester_6/digital_control_system:difference-equation-given-inputs"
source: https://www.bctengineer.com/q/semester_6/digital_control_system/difference-equation-given-inputs
site: BCT Engineering
---

# Difference equation with given input sequence

Digital Control System · Chapter 2: The Z-Transform

- Asked in: 2078 Chaitra, 6 marks
- Video: [Solution of linear difference equation DSP](https://www.youtube.com/watch?v=LdeOHgcoxT4) — Nitesh thakur sir
- 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-given-inputs
- Whole chapter: https://www.bctengineer.com/md/semester_6/digital_control_system/chapter-2

## Question

Consider the difference equation: x(k+2)-1.3679x(k+1)+0.3679x(k)=0.3679u(k+1)+0.2642u(k), where x(k) is the output and x(k)=0 for k≤ 0, where u(k) is the input and is given by u(k)=0, k<0; u(0)=1; u(1)=0.2142; u(2)=0.2142; u(k)=0, k=3,4,5,6,… Determine the output x(k).

## Short answer

Solve recursively: x(0)=0, x(1)=0.3679, x(2)=0.8463. For k>=3, x(k)=1.4284 - 5.4375(0.3679)^k, settling at 1.4284.

## Answer

The output is found by solving the equation recursively, then confirmed with a closed form from the z-transform.

#### Step 1: Initial values

$x(k) = 0$ for $k \le 0$, so $x(0) = 0$. Put $k = -1$ in the equation, with $x(-1) = 0$, $u(-1) = 0$, $u(0) = 1$:

$$
x(1) - 1.3679x(0) + 0.3679x(-1) = 0.3679u(0) + 0.2642u(-1) \;\Rightarrow\; x(1) = 0.3679
$$

#### Step 2: Pulse transfer function

With zero initial conditions (the $x(1)$ and $u(0)$ terms cancel), taking z-transforms gives:

$$
G(z) = \frac{X(z)}{U(z)} = \frac{0.3679z + 0.2642}{z^2 - 1.3679z + 0.3679} = \frac{0.3679z + 0.2642}{(z-1)(z-0.3679)}
$$

The input is a finite sequence:

$$
U(z) = 1 + 0.2142z^{-1} + 0.2142z^{-2} = \frac{z^2 + 0.2142z + 0.2142}{z^2}
$$

#### Step 3: Recursive solution

$$
x(k+2) = 1.3679x(k+1) - 0.3679x(k) + 0.3679u(k+1) + 0.2642u(k)
$$

| $k$ | Calculation of $x(k+2)$ | $x(k+2)$ |
|---|---|---|
| 0 | $1.3679(0.3679) - 0 + 0.3679(0.2142) + 0.2642(1)$ | 0.8463 |
| 1 | $1.3679(0.8463) - 0.3679(0.3679) + 0.3679(0.2142) + 0.2642(0.2142)$ | 1.1576 |
| 2 | $1.3679(1.1576) - 0.3679(0.8463) + 0 + 0.2642(0.2142)$ | 1.3288 |
| 3 | $1.3679(1.3288) - 0.3679(1.1576)$ | 1.3918 |
| 4 | $1.3679(1.3918) - 0.3679(1.3288)$ | 1.4149 |
| 5 | $1.3679(1.4149) - 0.3679(1.3918)$ | 1.4234 |

#### Step 4: Closed form for $k \ge 3$

$X(z) = G(z)U(z) = \dfrac{(0.3679z+0.2642)(z^2+0.2142z+0.2142)}{z^2(z-1)(z-0.3679)}$. For $k \ge 3$ only the poles at $z = 1$ and $z = 0.3679$ contribute to the residues of $X(z)z^{k-1}$:

$$
\begin{aligned}
\text{Res}_{z=1} &= \frac{(0.6321)(1.4284)}{1\,(0.6321)} = 1.4284 \\
\text{Res}_{z=0.3679} &= \frac{(0.3995)(0.4284)}{(0.3679)^2(-0.6321)}(0.3679)^{k-1} = -5.4375(0.3679)^k
\end{aligned}
$$

$$
x(k) = 1.4284 - 5.4375(0.3679)^k, \quad k \ge 3
$$

Check: $k = 3$ gives $1.4284 - 5.4375(0.04979) = 1.1576$, which matches.

#### Result

| $k$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | $\infty$ |
|---|---|---|---|---|---|---|---|---|
| $x(k)$ | 0 | 0.3679 | 0.8463 | 1.1576 | 1.3288 | 1.3918 | 1.4149 | 1.4284 |

The final value from the theorem is $\lim_{z\to1}(1-z^{-1})X(z) = \dfrac{0.6321(1 + 0.2142 + 0.2142)}{0.6321} = 1.4284$.

**Answer:** $x(0) = 0$, $x(1) = 0.3679$, $x(2) = 0.8463$, and $x(k) = 1.4284 - 5.4375(0.3679)^k$ for $k \ge 3$. The output settles at 1.4284.

(With $u(2) = -0.2142$, the textbook deadbeat case, the output is exactly 1 for all $k \ge 3$.)

## Check yourself

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

1. With x(k)=0 for k<=0, x(1) = ?
   A. 1
   B. 0.2642
   C. 0.3679
   D. 0
   Answer: C. Putting k = -1 gives x(1) = 0.3679 u(0). (Key point: Initial value)

2. Which recursion is used?
   A. with plus 0.3679x(k)
   B. x(k+1) = ...
   C. omits u terms
   D. x(k+2) = 1.3679x(k+1) - 0.3679x(k) + 0.3679u(k+1) + 0.2642u(k)
   Answer: D. Rearrange the given equation. (Key point: Recursion)

3. G(z) = ?
   A. (0.3679z+0.2642)/((z-1)(z-0.3679))
   B. (0.3679z+0.2642)/(z^2+1.3679z+0.3679)
   C. 0.3679/(z-1)
   D. (z-1)(z-0.3679)/(0.3679z+0.2642)
   Answer: A. Characteristic polynomial factors as (z-1)(z-0.3679). (Key point: Pulse transfer function)

## Close variants set in other exams

- [Difference equation with input u(2) = −0.2142](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adifference-equation-given-inputs-neg) — Digital Control System, chapter 2, asked 2×

## Related in Digital Control System

- [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×
- [Difference equation with u(K+1) and u(K) step inputs](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Adifference-equation-two-inputs-step) — Digital Control System, chapter 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×
- [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
