cdotter
- 305
- 0
Homework Statement
y[n+2]-y[n+1]-6y[n]=n; y[0]= 0, y[1]= -1
Solve using method of undetermined coefficients and z transforms to verify the answers are the same.
Homework Equations
The Attempt at a Solution
Undetermined coefficients:
Let y=r^n
r^{n+2}-r^{n+1}-6r^n=0
r^n(r^2-r-6)=0 \Rightarrow r=3, r=2
So the homogeneous solution is y_h[n]=c_1 3^n - c^2 2^n.
For the particular solution:
[PLAIN]http://img199.imageshack.us/img199/8694/giflatex.gif
(For some reason it says there's an error in my code when I try to use the embedded Latex system...)
Solving for coefficients c_1 and c_2 with the initial values, I get c_1=-31/36 and c_2=-8/9.
So y[n]=-\frac{31}{36}3^n+\frac{8}{9}2^n-\frac{1}{6}n-\frac{1}{36}.
Z transform
Taking the z transform of both sides of y[n+2]-y[n+1]-6y[n]=n gives
(z^2yz-z^2 \cdot 0 - z \cdot -1)-(z(yz-0))-6(yz)=\frac{z}{(z-1)^2}
yz(z^2-z-6)+z=\frac{z}{(z-1)^2}
y[n]=\frac{z}{(z-1)^2(z+2)(z-3)}-\frac{z}{(z+2)(z-3)}
Taking the inverse z transform in Maple gives me
-\frac{3}{20}3^n-\frac{8}{45}2^n-\frac{1}{6}n-\frac{1}{36}
So where did I go wrong? I've redone this problem a few times now and I keep coming up with the same incorrect answer.
Last edited by a moderator: