I understand that frequency response is nothing but the relationship between the input and the output of the system, in terms of magnitude and phase.

Thus it is very easy to deduce the frequency response of the system if we have the time-series data of the input and the output; the input being a frequency sweep of constant magnitude such that the change in frequency happens only after the completion of one cycle. That is, each frequency is maintained for at least one complete cycle.

However, this seldom happens in practical scenarios. Almost all the practical tools that generate a frequency sweep do not follow this condition, and generate a consistently varying frequency sweep (on a linear/logarithmic scale) such that the frequency changes several times in a single cycle. This poses a challenge in deducing the amplitude and phase information in response to a specific frequency.

It would be really appreciable if someone could guide me through this mathematical challenge.