DFT Vs DCT - spectrum differences When you are transforming a signal in to a frequency domain using both DFT and DCT, say for a function sin(x), how the spectrum will be? will both frequency values (of DCT and DFT) same? Can anyone explain the values of the frequencies for the function sin(x) (obviously the frequency should be 1/2π)
The DCT for a signal $x(t)$ on $[0,T]$ is roughly the same as the DFT for the function $x(|t|)$ on $[-T,T]$, that is, mirrored at the vertical axis. Since that function is even, all sine coefficients will be zero and can be removed from the result. 

Now $\sin(|t|)$ is different from $\sin(t)=-\sin(-t)$ for negative $t$, so the resulting coefficients will be quite unrelated. If the sampling interval ends at $t=T=2\pi$, the DFT will only exhibit one peak around frequency $f=\frac1{2\pi}$. 

But because of the kink at $t=0$ in $\sin(|t|)$, and a second at the end of the sampling interval, the DCT will exhibit a general background of size $f^{-2}$ in the coefficient for frequencies $f&gt;0$.