# Output of system given input and frequency response

Given the signal: $$x(t) = −4\cos(2\pi 4t) + 3\cos \left(\pi t − \frac{\pi}{3}\right)$$

By sampling theorem $$Fs = 2 Maxf = 8 Hz$$

The question ask what is the output of system y[n] when the signal x[n] is the input and the frequency response is: $$H(e^{jω}) = 2 + 2e^{j2ω}$$

I try to do this, but i don't undestand how to separate magnitude and phase from this result:

Euler's formula is you friend :) $$e^{j\theta} = \cos(\theta) + j\sin(\theta)$$ After applying it, you will have $$H(e^{j\omega}) = \Re\{H(e^{j\omega})\} + j\Im\{H(e^{j\omega})\}$$ and then it's easy to find magnitude $$|H(e^{j\omega})|=\sqrt{\Re^2\{H(e^{j\omega})\} + \Im^2\{H(e^{j\omega})\}}$$ and phase $$\angle H(e^{j\omega}) = \tan^{-1}\frac{\Im\{H(e^{j\omega})\}}{\Re\{H(e^{j\omega})\}}$$

• i propose a solution, it's correct? Jan 16 '20 at 13:12
• Partly. It is correct that $H(e^{j\omega})\Big|_{\omega = \pi} = 4$, and thus its magnitue is $4$ and its phase is zero. However, you have to try again for $H(e^{j\omega})\Big|_{\omega=\pi/8}$ (magnitude part only).
– GKH
Jan 16 '20 at 14:07
• I just try for $\omega = \pi/8$ in the second line. Why only for magnitude? Jan 16 '20 at 14:25
• I mean, your phase is OK ($\pi/8$) but your magnitude is wrong.
– GKH
Jan 16 '20 at 14:31
• Ahh ok, i made a mistake. The magnitude is $2sqrt(2+sqrt(2))$, right? But it's correct to compute y[n] in the way of my solution? Jan 16 '20 at 15:24

with $$2+2e^{j2\pi}$$ = $$2+2\cos(2\pi) + 2j\sin(2\pi) = 4$$ so phase is equal to $$0$$?

and with $$2+2e^{j\pi/4}$$ = $$2 + 2\cos(\pi/4) + 2j\sin(\pi/4)$$ = $$2 +\sqrt{2}+ j\sqrt2$$ here magnitude is $$2\sqrt{2}$$ and phase is $$\pi/8$$

finally $$y[n] = -4 * 4\cos(\pi n) + 2\sqrt{2} *3\cos (\pi n/8 - \pi/3 + \pi/8)$$

It's correct?