삼각함수

사인, 코사인, 탄젠트, 역삼각 및 쌍곡선 함수.

LaTeX trigonometry: sin, cos, tan and inverse trig functions

LaTeX trigonometry functions have their own commands: \sin, \cos, \tan, \cot, \sec and \csc, plus the inverses \arcsin, \arccos and \arctan and the hyperbolic \sinh, \cosh and \tanh. Always use the command rather than typing sin, because the command sets the name upright with correct spacing, while plain sin prints three italic variables. Powers go straight after the name, \sin^2 \theta, and degrees are a superscript circle, 30^\circ. The table lists the trigonometric symbols people use most, with the package each one needs; the full list follows below.

Quick reference: trig functions and identities

SymbolCommandUsePackageCopy
sin⁡θ\sin \theta
\sin \thetaSinebuilt in
cos⁡θ\cos \theta
\cos \thetaCosinebuilt in
tan⁡θ\tan \theta
\tan \thetaTangentbuilt in
sec⁡θ\sec \theta
\sec \thetaSecant (\csc cosecant, \cot cotangent)built in
arcsin⁡x\arcsin x
\arcsin xInverse sinebuilt in
arccos⁡x\arccos x
\arccos xInverse cosinebuilt in
arctan⁡x\arctan x
\arctan xInverse tangentbuilt in
sin⁡−1x\sin^{-1} x
\sin^{-1} xInverse sine, power notationbuilt in
sin⁡2θ+cos⁡2θ=1\sin^2 \theta + \cos^2 \theta = 1
\sin^2 \theta + \cos^2 \theta = 1Pythagorean identitybuilt in
sinh⁡x\sinh x
\sinh xHyperbolic sine (\cosh, \tanh)built in
30∘30^\circ
30^\circDegreesbuilt in
arcsec⁡x\operatorname{arcsec} x
\operatorname{arcsec} xInverse secant (not built in)amsmath

Use \left( and \right) around tall arguments, as in \sin\left(\frac{\pi}{2}\right). Greek angle letters such as \theta and \varphi are on the Greek letters page.

Frequently asked questions about trigonometry in LaTeX

How do I write sin, cos and tan in LaTeX?
Use the built-in commands in math mode: $\sin x$, $\cos x$, $\tan x$, and \cot, \sec and \csc for the reciprocals. Typing sin without a backslash prints the italic product s·i·n, which is why the commands exist.
How do I write inverse trig functions like arcsin in LaTeX?
\arcsin, \arccos and \arctan are built in, as are \sinh, \cosh, \tanh and \coth. \arcsec, \arccsc, \arccot, \sech and \csch are not: write \operatorname{arcsec} x, or add \DeclareMathOperator{\arcsec}{arcsec} to the preamble with amsmath. The power notation \sin^{-1} x also works.
How do I write sin squared and degrees in LaTeX?
Put the exponent right after the command: \sin^2 \theta. For degrees use a superscript circle, $30^\circ$, or \ang{30} from siunitx for consistent formatting in text and tables.
sin⁡\sin

Sine

\sin
cos⁡\cos

Cosine

\cos
tan⁡\tan
cot⁡\cot
sec⁡\sec

Secant

\sec
csc⁡\csc
arcsin⁡\arcsin

Arcsine

\arcsin
arccos⁡\arccos

Arccosine

\arccos
arctan⁡\arctan

Arctangent

\arctan
arccot\text{arccot}

Arccotangent

\text{arccot}
arcsec\text{arcsec}

Arcsecant

\text{arcsec}
arccsc\text{arccsc}

Arccosecant

\text{arccsc}
sin⁡−1\sin^{-1}

Inverse Sine

\sin^{-1}
cos⁡−1\cos^{-1}
tan⁡−1\tan^{-1}
sinh⁡\sinh
cosh⁡\cosh
tanh⁡\tanh
arcsinh\text{arcsinh}
π\pi
∘^{\circ}

Degrees

^{\circ}
rad\text{rad}

Radians

\text{rad}
θ\theta
ϕ\phi