I wanted to prove to myself why the DCT is better than the DFT and heres a brief of what I understand so far.
The DTFT works with a finite sampled input signal, but the frequency response obtained is continuous and periodic. The DFT samples the DTFT since it is still not practical for real world applications. The DFT inherits this periodicity and X[k] can be shown to repeat from the definition itself. Taking the IDFT of the periodic spectrum, results in a periodic waveform, and this is why the DFT assumes x[n] is periodic. Now the reason the DCT is better because its periodicity is even and that eliminates any discontinuity.
Why does the DCT assume that x[n] is mirrored? Is this established in the derivation of the DCT beforehand? Furthermore we say that x[n] doesn't have any discontinuity because X[k] is mirrored for X[k+N], and taking the IDFT of that would result in a periodic x[n] mirrored with no discontinuity. Any answer is appreciated whether its descriptive or mathematically.