This article investigates the performance of a cognitive user in a dynamic fading environment. The cognitive user communicates, using a spectrum-sharing technology, over a channel reserved to a primary user (PU). The transmit power of the cognitive user satisfies the outage probability constraint of the PU. The channels of the primary and cognitive users experience independent and non-identically distributed fading models. Nakagami- $$m$$ m and hyper-Nakagami- $$m$$ m channel fading models are specifically considered. The cognitive user's mean transmit power, channel capacity, and bit error rate are derived for this setup. In addition, numerical results are presented to verify the theoretical analysis and investigate the effects of the parameters of the communication environment on the performance measures of the cognitive user.