[Tex/LaTex] Trigonometric notation with Initial capital Letter and Italic

capitalizationitalic

How can we make First letter Capital while using trigonometric functions.
eg: \cos (60^\circ) gives simple cos (all in small). What is needed is 'Cos' (with initial capital).
For italics in mactex i used \it but it didn't italicized 'cos' only the number '60'. So how to do that?

Best Answer

I would highly recommend you not do this, but you can use \DeclareMathOperator to change how the operators are typeset:

\DeclareMathOperator{\cos}{Cos}
\DeclareMathOperator{\sin}{Sin}

enter image description here

If you want the operator name in italics you can instead use:

\DeclareMathOperator{\cos}{\mathit{Cos}}
\DeclareMathOperator{\sin}{\mathit{Sin}}

enter image description here

Again, I would advice you to not do this. It is not consistent with the normal conventions.

Notes:

  • The \let were necessary as we are redefining existing macros, so \let the existing definition to \relax eliminates the error message.

Code:

\documentclass{article}
\usepackage{amsmath}

\let\cos\relax
\let\sin\relax
\DeclareMathOperator{\cos}{Cos}
\DeclareMathOperator{\sin}{Sin}

\begin{document}
$\cos^2 \theta + \sin^2 \theta = 1$
\end{document}