I am working on the following problem:
I have a solution that I am pretty confident is correct as have checked the output in python. However, it is long and the entire time I was answering the question I felt like I am missing an obvious, easier approach. Is there a better way to do this?
Solution:
The approach taken is to split the complex signal into cosine and sine components, and evaluate the DFT at $-w_0$ and $+w_0$. The cosine component can be represented as a vector along the real axis with magnitude $AN\frac{1}{2}$
Discretising the signal with $w_0 = 2 \pi f_0$ and $t = nt_s$:
$$ X(w_0) = \sum_{n=0}^{N-1}\cos(w_0 n t_s / N) e^{-iw_0 n t_s / N} = AN\frac{1}{2}e^{0} $$
For the sine component:
$$ \begin{gather*} m_{sin}(nt_s) = - iA(1+\epsilon)\sin(\omega_0 n t_s+\alpha) \\ \\ = -iA(1 + \epsilon) \dfrac{e^{i(\omega_0 n t_s + i\alpha)} - e^{-i(\omega_0 n t_s + i\alpha)}}{2i} \\ \\ = -\frac{1}{2}A(1 + \epsilon) \left[ e^{i\omega_0 n t_s}e^{ i\alpha} - e^{-i\omega_0 n t_s}e^{ -i\alpha} \right]\\ \\ \mathrm{taking \ the\ DFT} \\ \\ X(w_0) = -\sum_{n=0}^{N-1} \frac{1}{2}A(1 + \epsilon)e^{i\omega_0 n t_s / N}e^{ i\alpha} \cdot e^{-iw_0 n t_s / N} + \sum_{n=0}^{N-1} \frac{1}{2}A(1 + \epsilon)e^{-i\omega_0 n t_s / N}e^{ -i\alpha} \cdot e^{-iw_0 n t_s / N} \\ \\ = -\sum_{n=0}^{N-1} \frac{1}{2}A(1 + \epsilon)e^{ i\alpha} + \sum_{n=0}^{N-1} \frac{1}{2}A(1 + \epsilon)e^{-i2\omega_0 n t_s / N}e^{ -i\alpha} \\ \\ = -N\frac{1}{2}A(1 + \epsilon) e^{ia} + \frac{1}{2} A (1 + \epsilon) e^{-ia} \sum_{n=0}^{N-1} e^{-i2\omega_0 n t_s / N} \\ \\ \mathrm{The \ second \ term \ integrates \ to \ zero} \\ = - \left(N\frac{1}{2}Ae^{ia} + N\frac{1}{2}A \epsilon e^{ia} \right) \\ \\ X(w_0) = -N\frac{1}{2}{e^{ia}(A + A\epsilon}) \\ \\ \\ \mathrm{and \ for } -w_0: \\ \\ X(-w_0) = N\frac{1}{2}A(1+\epsilon)e^{-ia} \end{gather*} $$
The $-ia$ exponent is a rotation of the complex phasor in the negative direction, and will not affect the magnitude of the resulting addition with the cosine vector.
Next we can add these complex vector outputs of the DFT and to determine the magnitude, then take the ratio to determine the error $\dfrac{|X(w_0)|}{|X(-w_0)|}$ as required in the question.
$$ \begin{gather*} |X(w_0)| = \sqrt{ (AN\frac{1}{2} - (A+A\epsilon)N\frac{1}{2}\cos(\alpha))^2 + ((A+A\epsilon)N\frac{1}{2}\sin(a))^2} \\ \\ |X(-w_0)| = \sqrt{ (AN\frac{1}{2} + (A+A\epsilon)N\frac{1}{2}\cos(\alpha))^2 + ((A+A\epsilon)N\frac{1}{2}\sin(a))^2} \end{gather*} $$
If we take the ratio $\dfrac{|X(w_0)|}{|X(-w_0)|}$ to find the error and do some cancelling. The final expression I got is:
$$ \begin{gather*} \mathrm{error} = \sqrt{\dfrac{2 - 2\cos(\alpha)(1+\epsilon) + 2\epsilon + \epsilon^2}{2 + 2\cos(\alpha)(1+\epsilon) + 2\epsilon + \epsilon^2}} \end{gather*} $$
so choose $\alpha$ and $\epsilon$ such that error $< 0.001$.