Exercice : Applications de l'étude de variations

★★ Avancé

Soit $f$ la fonction définie sur $\mathbb{R}$ par :

$$f(x) = -2x^2 + kx - 5$$

où $k$ est un nombre réel strictement positif.

La valeur maximale atteinte par la fonction $f$ sur $\mathbb{R}$ est égale à $3$.

Déterminer la valeur du réel $k$.