  Owing to the discrete frequency spectrum of whispering gallery resonators
(WGRs), the resonance and phase-matching conditions for the interacting waves
in the case of second-harmonic generation (SHG) cannot generally be fulfilled
simultaneously. To account for this, we develop a model describing SHG in WGRs
with non-zero frequency detunings at both the pump and second-harmonic
frequencies. Our model predicts strong distortions of the line shape of pump
and second-harmonic resonances for similar linewidths at both frequencies; for
much larger linewidths at the second-harmonic frequency, this behavior is
absent. Furthermore, it describes the SHG efficiency as a function of detuning.
Experimentally, one can change the WGR eigenfrequencies, and thus the relative
detuning between pump and second-harmonic waves by a number of means, for
example electro-optically and thermally. Using a lithium niobate WGR, we show
an excellent quantitative agreement for the SHG efficiency between our
experimental results and the model. Also, we show the predicted distortions of
the pump and second-harmonic resonances to be absent in the lithium niobate
WGR, but present in a cadmium silicon phosphide WGR, as expected from the
linewidths of the resonances involved.
