$ \def\arr#1{\begin{array}{l} #1 \end{array}} $
この記事では、LaTeXで三角関数・逆三角関数・双曲線関数を出力する方法を紹介します。
最初に、主要なコマンドを表にまとめておきます。
表示 | コマンド | 表示 | コマンド | 表示 | コマンド |
---|---|---|---|---|---|
$\sin$ | \sin | $\arcsin$ | \arcsin | $\sinh$ | \sinh |
$\cos$ | \cos | $\arccos$ | \arccos | $\cosh$ | \cosh |
$\tan$ | \tan | $\arctan$ | \arctan | $\tanh$ | \tanh |
$\csc$ | \csc | $\mathrm{arccsc}$ | \mathrm{arccsc} | $\mathrm{csch}$ | \mathrm{csch} |
$\sec$ | \sec | $\mathrm{arcsec}$ | \mathrm{arcsec} | $\mathrm{sech}$ | \mathrm{sech} |
$\cot$ | \cot | $\mathrm{arccot}$ | \mathrm{arccot} | $\coth$ | \coth |
以下、詳しく説明していきます。
\sin, \cos, \tan
)出力 | コマンド | 名称 |
---|---|---|
$\sin$ | \sin | 正弦(sine、サイン) |
$\cos$ | \cos | 余弦(cosine、コサイン) |
$\tan$ | \tan | 正接(tangent、タンジェント) |
$\csc$ | \csc | 余割(cosecant、コセカント) |
$\sec$ | \sec | 正割(secant、セカント) |
$\cot$ | \cot | 余接(cotangent、コタンジェント) |
下記のようにsin
と入力すると $sin$ のようにイタリック体になります。
これを回避するために\sin
のように"\"
をつけます.
sin
\sin
$\ds sin\ \ \ \sin $
\sin \theta
\sin \pi
\sin 180^\circ
$\ds \sin \theta\ \ \ \sin \pi\ \ \ \sin 180^\circ $
\sin^2 \theta + \cos^2 \theta = 1
\tan \theta = \frac{\sin \theta}{\cos \theta}
e^{i\theta} = \cos \theta + i\sin \theta
$\arr{ \sin^2 \theta + \cos^2 \theta = 1 \\[3pt] \ds \tan \theta = \frac{\sin \theta}{\cos \theta} \\[3pt] e^{i\theta} = \cos \theta + i\sin \theta }$
詳細記事:【LaTeX】分数(\frac)
\sin(x \pm y)=\sin x\cos y \pm \cos x\sin y
\cos(x \pm y)=\cos x\cos y \mp \sin x\sin y
\tan(x \pm y)=\frac{\tan x \pm \tan y}{1 \mp \tan x \tan y}
$\arr{ \sin(x \pm y) =\sin x\cos y \pm \cos x\sin y \\[5pt] \cos(x \pm y) =\cos x\cos y \mp \sin x\sin y \\[3pt]\ds \tan(x \pm y) =\frac{\tan x \pm \tan y}{1 \mp \tan x \tan y} }$
\csc \theta = \frac{1}{\sin \theta}
\sec \theta = \frac{1}{\cos \theta}
\cot \theta = \frac{1}{\tan \theta}
$\arr{ \ds \csc \theta = \frac{1}{\sin \theta} \\ \ds \sec \theta = \frac{1}{\cos \theta} \\ \ds \cot \theta = \frac{1}{\tan \theta} }$
\arcsin,\arccos,\arctan
)出力 | コマンド | 名称 |
---|---|---|
$\arcsin$ | \arcsin | arcsine |
$\arccos$ | \arccos | arccosine |
$\arctan$ | \arctan | arctangent |
$\mathrm{arccsc}$ | \mathrm{arccsc} | arccosecant |
$\mathrm{arcsec}$ | \mathrm{arcsec} | arcsecant |
$\mathrm{arccot}$ | \mathrm{arccot} | arccotangent |
上表のとおり、arccos,arcsin,arctanにはコマンドが用意されています。
一方で、\arcsec, \arccot, \arccsc
というコマンドはありません。
amsmath,amssymb,amsthmなどの主要なパッケージにもありません。
もし、これら3つを頻繁に用いるのならば、次のようにマクロを作っておくと便利です。
\newcommand{\arcsec}{\mathrm{arcsec}\ }
\newcommand{\arccot}{\mathrm{arcot}\ }
\newcommand{\arcsec}{\mathrm{arccsc}\ }
出力 | コマンド | 名称 |
---|---|---|
$\sinh$ | \sinh | hyperbolic sine |
$\cosh$ | \cosh | hyperbolic cosine |
$\tanh$ | \tanh | hyperbolic tangent |
$\coth$ | \coth | hyperbolic cotangent |
$\mathrm{csch}$ | \mathrm{csch} | hyperbolic cosecant |
$\mathrm{sech}$ | \mathrm{sech} | hyperbolic secant |
\sinh x = \frac{e^x - e^{-x}}{2}
\cosh x = \frac{e^x + e^{-x}}{2}
\tanh x = \frac{\sinh x}{\cosh x}
$\arr{ \ds \sinh x = \frac{e^x - e^{-x}}{2} \\[3pt] \ds \cosh x = \frac{e^x + e^{-x}}{2} \\[3pt] \ds \tanh x = \frac{\sinh x}{\cosh x} }$
$\ds $