\documentclass{article}
\usepackage{latexml}
\lxDeclare[role=ID]{$a$}%
\lxDeclare[role=ID]{$b$}%
\lxDeclare[role=ID]{$c$}%
\lxDeclare[role=ID]{$d$}%
\lxDeclare[role=ID]{$e$}%
\lxDeclare[role=FUNCTION]{$f$}%
\lxDeclare[role=FUNCTION]{$g$}%
\lxDeclare[role=FUNCTION]{$h$}%
\lxDeclare[role=OPFUNCTION]{$F$}%
\lxDeclare[role=OPFUNCTION]{$G$}%
\lxDeclare[role=OPFUNCTION]{$H$}%
\begin{document}
\section{Basic Functions}
\[ g(a) = g(b) \]
\[ f(a) = g(h(c)) \]
\[ h(c) = \sin a^2 \]
\[ \sin f(a) \]

\section{Trigonometric functions}
\[ \sin a + \tan b \]
\[ \sin a \cos b \neq \sin(a\cos b)\]
% Parses wrong ? but how to clarify?
\[ \sin 2\pi \neq \log 2x^2 \]

\section{Missing arguments}
% Presumably these are products
\[ f g h \]
\[ f g h a \]
\section{Operator-like functions}
% But these are applied!
\[ F G H \]
\[ F G H a \]

\[ f'(a) = a^2 \]
\[ f^2(a) = g^b(2) \]

\section{Scripts}
\[ \ln a = \log_e a = \ln_{+} b\]
\end{document}
