For any discrete input signal between +1 and -1, what is the theoretical maximum DFT?
If the input is a cosine of $N$ samples with amplitude $A$, the peak spectral magnitude is $A*N/2$. But what about any arbitrary waveform?
A square wave with the same amplitude as the cosine is composed of various sines, the fundamental frequency of which has a greater magnitude than the square wave. Therefore the Fourier transform of a square wave with amplitude also between $1$ and $-1$ is greater than the cosine with amplitude between $+1$ and $-1$.
But generalizing this to any waveform, ie a triangle wave, sawtooth wave, and also non geometrically "nice" waves, all with amplitudes between $+1$ and $-1$, what is the theoretical maximum?
I want to know because I need to represent the output of a DFT with 16 signed bits. However if the magnitude of the DFT is greater than $2^{15}$ I would need to scale. I therefore need to determine if this will ever happen (for any input waveform) and how much the scaling factor should be.
Thank you very much,