  Explaining the mechanism of superconductivity in the high-$T_c$ cuprates
requires an understanding of what causes electrons to form Cooper pairs.
Pairing can be mediated by phonons, the screened Coulomb force, spin or charge
fluctuations, excitons, or by a combination of these. An excitonic pairing
mechanism has been postulated, but experimental evidence for coupling between
conduction electrons and excitons in the cuprates is sporadic. Here we use
resonant inelastic x-ray scattering (RIXS) to monitor the temperature
dependence of the $\underline{d}d$ exciton spectrum of
Bi$_2$Sr$_2$CaCu$_2$O$_{8-x}$ (Bi-2212) crystals with different charge carrier
concentrations. We observe a significant change of the $\underline{d}d$ exciton
spectra when the materials pass from the normal state into the superconductor
state. Our observations show that the $\underline{d}d$ excitons start to shift
up (down) in the overdoped (underdoped) sample when the material enters the
superconducting phase. We attribute the superconductivity-induced effect and
its sign-reversal from underdoped to overdoped to the exchange coupling of the
site of the $\underline{d}d$ exciton to the surrounding copper spins.
