# Horizontal spacing with $\circ$ and $\cos$

I need to write

$\sin\circ \theta \cos\circ \theta$


with correct horizontal spacing (here \theta denotes a real-valued function). How can I do that? Can you please explain me briefly why my code does not work fine?

Here is what I get

• \circ is a binary relation, which of course has consequences on spacing (see this answer). But I'm not sure about what spacing you are expecting. – campa Jan 25 '18 at 10:30
• Welcome to TeX SX! Just code \sin{\circ]\theta\cos{\circ}\theta so that \circ be considered as anordinary math atom. However shouldn't it be typeset as^{\circ}, or better, as \sin\textdegree\theta? – Bernard Jan 25 '18 at 10:31
• @Bernard There is no difference between \sin\circ and \sin{\circ}, since a Bin atom (\circ) is anyway converted to Ord if preceded by an Op atom. – campa Jan 25 '18 at 10:34

You should make \sin into an ordinary, for this case, so \circ will be surrounded by items compatible with its nature of binary operation.

Your code has the sequence Op Bin Ord and, by rule, the Bin (that is, \circ) becomes Ord.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\fsin}{\mathord{\sin}}
\newcommand{\fcos}{\mathord{\cos}}

\begin{document}

$\fsin\circ \theta \qquad \fcos\circ \theta$

\end{document}


• I need to have them as terms of a multiplication, but with your solution removing \qquad still gives a problem – MK7 Jan 25 '18 at 11:17
• @MK7 It's no different from a\circ b c\circ d; I believe that (\fsin\circ\theta)(\fcos\circ\theta) would make your intentions clearer. Otherwise, add \, in between: \fsin\circ\theta\,\fcos\circ\theta. – egreg Jan 25 '18 at 11:28