I would like to use \mathsmaller in a section title but it is incompatible with hyperref. Here is a MWE:
\documentclass{book}
\usepackage{amsmath} %automatically loads ansbsy which gives \boldsymbol
\usepackage{relsize}
\usepackage{hyperref}
\begin{document}
$\mathcal{SQUARING}^{+}$%compiles
$\mathsmaller{SQUARING^{+}}$%compiles
$\mathsmaller{\mathcal{SQUARING}^{+}}$%compiles
\section{$\mathcal{SQUARING}^{+}$ }%compiles
%\section{Function $\mathsmaller{SQUARING}^{+}$ }%does NOT compile with hyperref
%\section{Function $\mathsmaller{\mathcal{SQUARING}^{+}}$}%does NOT compiles with hyperref
\end{document}


