# Using z-transforms to solve difference equations.

I am faced with the following question and would appreciate any help you may be able to offer: It is not homework, I know the first and second shift theorems and based on the other examples I have done, I know you start by taking the z-transform of the equation, then factor out X(z) and move the rest of the equation across the equals sign, then you take the inverse z-transform which usually involves partial fractions and it should yield the answer given. Cheers

Use z-transforms to solve:

$$2x[k+1]-x[k]=2^k \,,\quad x[0]=2$$

by definition we have \begin{align*} X(z) &= \sum_{k\ge 0} x[k]z^{-k}\\\ &= 2 + \sum_{k\ge 0} x[k+1]z^{-(k+1)}\\\ &= 2 + (2z)^{-1}\sum_{k \ge 0} \left(2^{k} + x[k]\right)z^{-k}\\\ &= 2 + (2z)^{-1}\sum_{k\ge 0} 2^{k}z^{-k} + (2z)^{-1}X(z)\\\ &= 2 + (2z)^{-1} \frac 1{1 - \frac 2z} + (2z)^{-1} X(z). \end{align*} Now oyu can solve for $X(z)$.