  The characterisation of stellar cores may be accomplished through the
modelling of asteroseismic data from stars exhibiting either gravity-mode or
mixed-mode pulsations, potentially shedding light on the physical processes
responsible for the production, mixing, and segregation of chemical elements.
In this work we validate against model data an analytical expression for the
period spacing that will facilitate the inference of the properties of stellar
cores, including the detection and characterisation of buoyancy glitches
(strong chemical gradients). This asymptotically-based analytical expression is
tested both in models with and without buoyancy glitches. It does not assume
that glitches are small and, consequently, predicts non-sinusoidal
glitch-induced period-spacing variations, as often seen in model and real data.
We show that the glitch position and width inferred from the fitting of the
analytical expression to model data consisting of pure gravity modes are in
close agreement (typically better than 7$\%$ relative difference) with the
properties measured directly from the stellar models. In the case of fitting
mixed-mode model data, the same expression is shown to reproduce well the
numerical results, when the glitch properties are known a priori. In addition,
the fits performed to mixed-mode model data reveal a frequency dependence of
the coupling coefficient, $q$, for a moderate-luminosity red-giant-branch model
star. Finally, we find that fitting the analytical expression to the mixed-mode
period spacings may provide a way to infer the frequencies of the pure acoustic
dipole modes that would exist if no coupling took place between acoustic and
gravity waves.
