$\newcommand{\wh}[1]{{\widehat{#1}}} \newcommand{\R}{{\mathbb{R}}} $I am looking for a proof of the inversion formulas for the discrete sine and cosine transforms, i.e. a proof of the fact that these transforms are involutions (up to a constant factor). For concreteness, let us assume the following definitions.
The linear mapping \begin{equation} \mathrm{DST}\colon \R^{N - 1} \longrightarrow \R^{N - 1}\colon f\longmapsto \wh{f} \end{equation} with \begin{equation} \label{eq:defdst} \wh{f}_n = \sum_{j = 1}^{N - 1} f_j \sin\left(\frac{\pi n j}{N}\right) \end{equation} for $n = 1,\ldots,N - 1$ is called the discrete sine transform (DST).
The linear mapping \begin{equation} \mathrm{DCT}\colon \R^{N + 1} \longrightarrow \R^{N + 1}\colon g\longmapsto \wh{g} \end{equation} with \begin{equation} \wh{g}_n = \frac{g_0}{2} + \sum_{j = 1}^{N - 1} g_j \cos\left(\frac{\pi n j}{N}\right) + \frac{(-1)^n g_N}{2}\text{.} \end{equation} for $n = 0,\ldots,N$ is called the discrete cosine transform (DCT).
The inverse transform to the DST is the DST multiplied by $\frac{2}{N}$, and the same holds for the DCT.
The only proof of this fact that I know can be found in C. van Loan. Computational Frameworks for the Fast Fourier Transform. Society for Industrial and Applied Mathematics, 1992 (section 4.4.7 on page 240), but it is rather lengthy and involved.
I am looking for a shorter, more direct proof of these inverse formulas.
I have asked this question before at MSE without any reactions.