I am having difficulty getting an equivalent answer to the answer key on problem 5.31. Both methods seem reasonable but yield different results.

My Solution First:

$ \quad x[n]=cos(\omega_0n)  $
$ \quad X(\omega)=\pi\delta(\omega-\omega_0)+\pi\delta(\omega+\omega_0)-\pi\leq\omega_0\leq\pi $
$ \quad y[n]=\omega_0cos(\omega_0n) $
$ \quad Y(\omega)=\omega_0\pi\delta(\omega-\omega_0)+\omega_0\pi\delta(\omega+\omega_0)-\pi\leq\omega_0\leq\pi $

$ \quad H(\omega)=\frac{Y(\omega)}{X(\omega)}=\frac{\omega_0\pi(\delta(\omega-\omega_0)+\delta(\omega+\omega_0))}{\pi(\delta(\omega-\omega_0)+\delta(\omega+\omega_0))}=\omega_0 $


Tom's reason this does not work:

The reason that your solution does not work is because you are treating <img alt="tex:\omega_0" style="vertical-align: bottom;"> as a constant. However, $ \omega_0  $is actually $ \omega $ when you want to take the inverse transform and therefore it is a variable and not a constant. So when you write the integral it is of the form $ \int{x e^x}dx $ and not $ \int{c e^x}dx  $ where c is a constant. I made the same mistake myself when I first tried it.
Can anyone explain the solution key's answer though? I do not understand why it is the absolute value of w and why it is restricted from 0 to pi. I would have thought -pi/2 to pi/2 since if it's 0 to pi, then at pi/2 it would be division by zero. I also don't understand why the integral for the inverse transform is taken of -pi to pi when the solution key previously restricted it from 0 to pi.

Ross's Reason This Does Not Work:

The real error is in the problem statement.  The system has no way of determining whether <img alt="tex:\omega_0" /> is positive or negative, because it sees its input as a sum of complex conjugate exponentials.  i.e. <img alt="tex:cos(\omega_0)=cos(-\omega_0)"/> and the system has no way of knowing which of the two was input, positive or negative.  
If we take to problem statement literally, then $  omega_0  $ must be restricted to zero, because:
$ cos(-\omega_0n)\rightarrow-\omega_0cos(-\omega_0n) $
which is equal to:  $ cos(\omega_0n)\rightarrow-\omega_0cos(\omega_0n) $
but:  $ cos(\omega_0n)\rightarrow\omega_0cos(\omega_0n) $
thus: $ \omega_0=-\omega_0  $ and the only way this is true is when $ \omega_0=0 $
To deal with this issue, the solution key solved the problem using the following instead:
$ cos(\omega_0n)\rightarrow\left|\omega_0\right|cos(\omega_0n) $


Answer Key's Solution:

Exactly as it says...
From the given information, it is clear that when the input to the system is a complex exponential of frequency $ \omega_0 $ the output is a complex exponential of the same frequency but scaled by the <img alt="tex:\displaystyle\left|\omega_0\right|"/>.  Therefore, the frequency response of the system is
$ \quad H(\omega)=\left|\omega\right|,for \leq\left|\omega\right|\leq\pi  $
Taking the inverse Fourier transform of the frequency response, we obtain
$ \quad h[n]=\frac{1}{2\pi}\int_{-\pi}^\pi H(\omega)e^{j\omega n}d\omega  $
$ \quad {h[n]}=\frac{1}{2\pi}\int_{-\pi}^0 -\omega e^{j\omega n}d\omega+\frac{1}{2\pi}\int_0^\pi \omega e^{j\omega n}d\omega $
$ \quad {h[n]}=\frac{1}{\pi}\int_0^\pi \omega cos(\omega n)d\omega  $
$ \quad {h[n]}=\frac{1}{\pi}\left(\frac{cos(n\pi)-1}{n^2}\right) $
Theirs seems logically correct to me (except for the absolute value part), but mine seems mathematically correct.  Where is the problem.  

From mireille.boutin.1 Fri Oct 19 14:53:56 -0400 2007 From: mireille.boutin.1 Date: Fri, 19 Oct 2007 14:53:56 -0400 Subject: One problem with your answer Message-ID: <20071019145356-0400@https://engineering.purdue.edu>

Dividing by zero, or by infinity, is not recommended.

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood