Technically FT of a symmetric function yields all real values. It means the cos transform of the function and FT of the function should give the same values. When I test compute FT of an array (scipy.fftpack.fft(b)) and DCT (scipy.fftpack.dct(b)), I get different values. Following is one example:
b=[4,3,2,1,0,1,2,3]
In:scipy.fftpack.fft(b)
Out:array([ 16.00000000 +0.00000000e+00j, 6.82842712 +2.22044605e-16j,
0.00000000 -0.00000000e+00j, 1.17157288 +2.22044605e-16j,
0.00000000 +0.00000000e+00j, 1.17157288 -2.22044605e-16j,
0.00000000 +0.00000000e+00j, 6.82842712 -2.22044605e-16j])
In:scipy.fftpack.dct(b,1)
Out:array([ 25. , 4.49395921, 10.09783468, -1.60387547,
0.61595706, 1.10991626, 1.28620826, -1. ])
What could be the reason for this discrepancy ?