[LaTeX] Functions
category: Writing  course: LaTeX Math  difficulty:Any characters you put into a math environment, are automatically displayed in an italic math font. There are functions, however, that are typically written with regular letters or some other typical notation. For these functions, LaTeX provides a command that follows the syntax:
\<function>
Some of these functions have text written underneath them. For example, limits have subscripts that tell us which variable is nearing what value, but these are displayed underneath them, instead of next to it. This typical way of rendering subscripts is common among lots of functions, and is automatically used if you provide a subscript with such commands.
Here are all function commands in a nice table:
Function 
Function 
Function 
Function 
Function 



































Functions with _
behind them use those typical subscripts I explained. You’ll see much more of it next chapter.
$cos(x)^2 + sin(x)^2 = 1$ is wrong, instead use $\cos^2 x + \sin^2 x = 1$ $lim_{x \rightarrow 2}$ is ugly, instead use $\displaystyle \lim_{x \to 2}$
If your favourite function isn’t listed, you can get the same result with
\operatorname{yourOperator}{x}
If you want your operator to use those typical subscripts, use the star variation.
$\operatorname{pandaFunction}{x+y} = 2x + 2y$
Modulo
Modulo operators work mostly the same, but have two variations.
The \bmod expression
command simply adds mod expression, while the \pmod expression
command adds more space and some parentheses around it.
$4 = 9 \bmod 5$ is true, but also $4 = 9 \pmod 5$