For my linear systems class, I need to solve the difference equation for a fixed-rate mortgage using the Z-transform. I feel like a total idiot because I'm getting stumped by this. Any input would be appreciated.
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.
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.