Given:

**P:**principal

**a:**1 + (interest rate/12)

**b:**monthly payment

The difference equation for the amount left to pay after

**k**months is:

x(k+1) = ax(k) - b

*Using the initial condition x(0) = P and the Z-transform method, solve for x(k) for k ≥ 0. Express your answer in terms of P, a, and b.*

I did the Z-transform of this, yielding

X(z) - P = aX(z) - bz/(z-1)

Isolating X(z), doing partial fraction expansion on the second term, and then the inverse Z-transform, I get a function that doesn't really make sense.

x(k) = (P + ab/(1-a))*u(k-a) - (b/(1-a))*u(k-1)

Any idea what I'm doing wrong? Thanks.