# Verifying Difference Equations

Given the first-order difference equation

$y(k) = u(k) + y(k-1)$ for $k = 1, 2, 3, \dots$

with the input signal u(k) = k, and the initial condition y(–1) = 0. I am trying to verify that its solution also satisfies the second-order difference equation

$y(k) = 2y(k-1) - y(k-2) + 1$

with the initial conditions $y(0) = 0$ and $y(–1) = 0$.

Using the method of undetermined coefficients I attained

$y(k) = -(-1)^k + k^2$ (solution for the 1st order difference equation)

I'm having trouble finding a solution to the 2nd order difference equation. How do I solve for its particular solution?

-
Your solution for the first-order equation seems wrong. $-(-1)^k + k^2 \neq -(-1)^{k-1} + (k-1)^2 = k^2 - 2k + 1$. Hint: A solution for the first equation is $\frac{k(k+1)}{2}$, since $y(k) = \sum_{i=0}^k k$ – fgp Oct 21 '12 at 20:20

Hint $\$ Note $\rm\ y(k) - y(k-1) = k\:\Rightarrow\:y(k-1) - y(k-2) = k-1,\:$ hence, subtracting
$$\rm\:y(k)-2y(k-1)+y(k-2) = 1$$
With $\rm\:\nabla f(k) := f(k)-f(k-1)\:$ it's $\rm\ \nabla y = k\:\Rightarrow\: \nabla^2 y = \nabla k = k-(k-1) = 1.$