I am having trouble on the following exercise and I can't figure out where I am doing something wrong:
Given an LTI system described by the following difference equation: $$y(n)=x(n)+2x(n-2)+y(n-1)$$ find the frequency response $H(e^{i\omega})$ and then find the impulse response $h(n)$ using a DTFT.
My attempt:
The difference equation becomes: $y(n)-y(n-1)=x(n)+2x(n-2)\overset{\mathcal{Z-}\text{transform}}{\Longrightarrow}Y(z)-z^{-1}Y(z)=X(z)+2z^{-2}X(z)$ and because $H(z)=\frac{Y(z)}{X(z)}$, $H(z)=\frac{1+2z^{-2}}{1-z^{-1}}=\frac{z^2+2}{z^2-z}=\frac{z^2+2}{z(z-1)}$ and because (here I am not so sure) the system is causal, it must be that we require $|z|>1$. Even if the ROC wasn't $|z|>1$, $|z|=1$ is a pole so it can't be in the ROC. But, the exercise is asking for a DTFT, which is the $\mathcal{Z-}$transform $z=e^{i\omega}$, so the $\mathcal{Z}-$transform on the unit circle $|z|=1$. The integral for $h(n)$ would then be $$h(n)=\frac{1}{2\pi i}\oint_{|z|=1}{\frac{z^2+2}{z(z-1)}z^{n-1}dz}$$ which obviously diverges because $|z|=1$ is a pole. Am I doing anything wrong? Because it seems to me that the problem is impossible with a DTFT. There is, however, a solution with an inverse $\mathcal{Z}-$transform. Thanks, in advance.