I have considered five signals of different amplitude, frequency and phase components and applied Fourier Transform using the code given below:
Abs[Table[1/\[Pi] \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(-\ \[Pi]\), \(\(\ \
\)\(\[Pi]\)\)]\(\((1.6 Cos[x\ + 0.3] + 3.9\ Cos[3\ x - 1.5] -
2.8\ Cos[7\ x + 1.7] - 80.1\ Cos[5\ x + 2.1] +
5.5\ Cos[9\ x - 2.4])\)
\*SuperscriptBox[\(E\), \(\(\ \)\(\(-\[ImaginaryJ]\)\ \((\[Omega]\ x)\
\)\)\)]\ \ \[DifferentialD]x\)\) , {\[Omega], 1, 10}]]
and the result is:
{1.6, 2.24011*10^-15, 3.9, 4.46075*10^-15, 80.1, 1.07175*10^-14, 2.8,
6.06724*10^-15, 5.5, 7.28752*10^-15}
After that, I got the argument values from
Arg[Table[1/\[Pi] \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(-\ \[Pi]\), \(\(\ \
\)\(\[Pi]\)\)]\(\((1.6 Cos[x\ + 0.3] + 3.9\ Cos[3\ x - 1.5] +
2.8\ Cos[7\ x + 1.7] + 80.1\ Cos[5\ x + 2.1] +
5.5\ Cos[9\ x - 2.4])\)
\*SuperscriptBox[\(E\), \(\(\ \)\(\(-\[ImaginaryJ]\)\ \((\[Omega]\ x)\
\)\)\)]\ \ \[DifferentialD]x\)\) , {\[Omega], 1, 10}]]
and the corresponding result is:
{0.3, 3.04684, -1.5, -3.00265, 2.1, -2.50861, 1.7, 1.45689, -2.4, \
-2.47675}
Clearly, I'm getting some unwanted values for amplitude and phase. Although it's negligible for amplitude values, it's not so for the phases.
Please explain me where I've done wrong and what's the way out.