Takatani Note

【LaTeX】三角関数・逆三角関数・双曲線関数(sin、cos、tan)

$ \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} }$

詳細記事:【LaTeX】プラスマイナス記号(\pm)

\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$\arcsinarcsine
$\arccos$\arccosarccosine
$\arctan$\arctanarctangent
$\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, \cosh, \tanh)

出力コマンド名称
$\sinh$\sinhhyperbolic sine
$\cosh$\coshhyperbolic cosine
$\tanh$\tanhhyperbolic tangent
$\coth$\cothhyperbolic 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 $