# Using the system function $H(z)$ to the solve the output of a DT LTI system

I have a question which asks me to find the magnitude and phase response of

$$H(z) = \frac{1}{1-0.5z^{-1}}$$ for which I solved by doing $$H(e^{j\Omega}) = \frac{1}{1-0.5e^{-j\Omega}} = \frac{1}{1-0.5\cos(\Omega)+j0.5\sin(\Omega)}$$ $$|{H(e^{j\Omega})}| = \frac{1}{\sqrt{(1-0.5\cos(\Omega))^{2}+(0.5\sin(\Omega))^{2}}} = \frac{1}{\sqrt{\frac{5}{4} - \cos(\Omega)}}$$ $$\angle H(e^{j\Omega}) = -\tan^{-1} \left(\frac{\frac{1}{2}\sin(\Omega)}{1-\frac{1}{2}\cos(\Omega)}\right)$$ But, I am unsure how to solve the second part of the problem, which asks me to compute the system response to $$f[k] = A\cos\left(\frac{\pi}{2}k +\frac{\pi}{10}\right)$$

Let's first briefly recall the meaning of $H(z)$. Let $y[n]$ be the output of the LTI system. Given an input $x[n]$, the output can be written $$y[n] = h[n] *x[n] = \sum_{k=-\infty}^\infty h[k]x[n-k]$$ where $h[n]$ is the impulse response of the LTI system en $*$ represents the convolution. Let's now assume that $x[n]$, the input of the LTI system, is of the form $z^n$. In this case, $$y[n] = \sum_{k=-\infty}^\infty h[k]z^{n-k} = z^n\left(\sum_{k=-\infty}^\infty h[k]z^{-k}\right) = z^nH(z)$$ where $H(z)$ denotes the transfer function of the LTI system (the z-transform of the impulse response). It can be seen that that $z^n = e^{j\Omega}$ is an eigenfunction of the system, that is, it is only affected by a complex factor (i.e. $H(z)$, the so-called eigenvalue) at the output of your system.
Now, your input $f[n]$ can be written as $$f[n] = \mathcal{R}\{Ae^{j(\frac{\pi}{2}n + \frac{2\pi}{10})}\} = \mathcal{R}\{Ae^{j\frac{2\pi}{10}}e^{j\frac{\pi}{2}n}\}$$ and $Ae^{j\frac{2\pi}{10}}e^{j\frac{\pi}{2}n}$ matches the form of an eigenfunction (with a complex factor $Ae^{j\frac{2\pi}{10}}$). The output of your system to $Ae^{j\frac{2\pi}{10}}e^{j\frac{\pi}{2}n}$ is then given, using linearity of your system and the polar notation of $H$, by $$y[n] = Ae^{j\frac{2\pi}{10}}H(e^{j\frac{\pi}{2}})e^{j\frac{\pi}{2}n} = Ae^{j\frac{2\pi}{10}}|H(e^{j\frac{\pi}{2}})|e^{\arg\{H(e^{j\frac{\pi}{2}})\}}e^{j\frac{\pi}{2}n}.$$ Finally, again by linearity, the output of your system to $f[n]$ is given by the real part of that.