# Definition of cotan function [duplicate]

Possible Duplicate:
Define additional math operators to be typeset in roman

Is the cotan function defined somewhere? I cannot find it. It is defined as cotan(x)=cos(x)/sin(x). Should it be \newcommand{\cotan}{\mathrm{cotan}}? I'm suspecting somewhere a declareoperator command or something.

-

## marked as duplicate by Martin Scharrer♦May 9 '11 at 10:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

For a function to calculate cotan=cos/sin, \usepackage{fp}... ;-) – Bruno Le Floch Apr 9 '11 at 12:11

## 1 Answer

Check the amsopn.sty file.

and define the the tag

\def\cotan{\qopname\relax o{cotan}}

-
Easier to use \DeclareMathOparator, see tex.stackexchange.com/questions/671/… – Caramdir Apr 9 '11 at 3:03
NB: you can use backticks ` to mark your inline code and if you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – Caramdir Apr 9 '11 at 3:16