In the book Fundamentals of Music Processing: Audio, Analysis, Algorithms, Applications by Meinard Müller, the coefficients $d_\omega$ and $\phi_\omega$ are defined as
where $\cos_{\omega,\phi}(t) = \sqrt{2}\cos(2\pi(\omega t - \phi))$. Also it's said that "The computation of $d_\omega$ and $\phi_\omega$ feels a bit awkward, since it involves an optimization step. The good news is that there is a simple solution to this optimization
problem, which results from the existence of certain trigonometric identities that
relate phases and amplitudes of certain sinusoidal functions. Using the concept of
complex numbers, these trigonometric identities become simple and lead to an elegant formulation of the Fourier transform."
I don't understand how the Fourier transform itself solves the optimization
problem. Obviously in the defining the Fourier transform we don't consider any optimization but it seems that the author claims the Fourier transform's definition takes into the account $\max_{\phi \in [0 , 1)}$ and $\text{argmax}_{\phi \in [0 , 1)}$.
What am I missing here? Are the optimizations $\max_{\phi \in [0 , 1)}$ and $\text{argmax}_{\phi \in [0 , 1)}$ included in the Fourier transform?