当ブログは記事内にプロモーションを含みます。ご了承ください。

【MathJax-LaTeX】三角関数と双曲線関数の表し方

ここでは、MathJax-LaTeXで三角関数および双曲線関数を表示する方法をまとめています。

三角関数(trigonometric function)

MathJaxでは、以下の三角関数を出力するコマンドが用意されています。

コマンド 出力 コマンド 出力
\( \sin x \) \( \sin x \) \( \csc x \) \( \csc x \)
\( \cos x \) \( \cos x \) \( \sec x \) \( \sec x \)
\( \tan x \) \( \tan x \) \( \cot x \) \( \cot x \)

基本となる正弦関数(sine)、余弦関数(cosine)、正接関数(tangent)はそれぞれ\sin、\cos、\tanコマンドにより出力します。

 

これらの逆数関数である、余割関数(cosecant)、正割関数(secant)、余接関数(cotangent)はそれぞれ\csc、\sec、\cotコマンドにより出力します。

余割関数はcscのみ対応しており、cosecコマンドはありません。

定義式は次のように記述します。

\( \csc \theta = \frac{1}{\sin \theta} \) \( \csc \theta = \frac{1}{\sin \theta} \)
\( \sec \theta = \frac{1}{\cos \theta} \) \( \sec \theta = \frac{1}{\cos \theta} \)
\( \cot \theta = \frac{1}{\tan \theta} = \frac{\cos \theta}{\sin \theta} \) \( \cot \theta = \frac{1}{\tan \theta} = \frac{\cos \theta}{\sin \theta} \)

 

三角関数でよく用いられる公式のサンプルです。

\( \sin^2 \theta + \cos^2 \theta =1 \) \( \sin^2 \theta + \cos^2 \theta =1 \)
\( \sin (\alpha \pm \beta) = \sin \alpha \cos \beta \pm \cos \alpha \sin \beta \) \( \sin (\alpha \pm \beta) = \sin \alpha \cos \beta \pm \cos \alpha \sin \beta \)
\(\displaystyle \tan (x \pm y) =\frac{\tan x \pm \tan y}{1 \mp \tan x \tan y} \) \(\displaystyle \tan (x \pm y) =\frac{\tan x \pm \tan y}{1 \mp \tan x \tan y} \)

ギリシャ文字のページ、分数のページもご参照ください。

 

逆三角関数(inverse trigonometric function)

MathJaxでは、逆三角関数はそれぞれ\arcsin、\arccos、\arctanコマンドにより出力します。

頭文字を大文字表記するコマンドはありません。必要であれば\mathrmコマンドを利用します。

コマンド 出力 コマンド 出力
\( \arcsin x \) \( \arcsin x \) \( \mathrm{Arcsin} x \) \( \mathrm{Arcsin} x \)
\( \arccos x \) \( \arccos x \) \( \mathrm{Arccos} x \) \( \mathrm{Arccos} x \)
\( \arctan x \) \( \arctan x \) \( \mathrm{Arctan} x \) \( \mathrm{Arctan} x \)

csc、sec、cotの逆関数のコマンドはありません。

 

逆三角関数は次のようにも表現します。

\( \arcsin \theta = \sin^{-1} \theta \) \( \arcsin \theta = \sin^{-1} \theta \)
\( \arccos \theta = \cos^{-1} \theta \) \( \arccos \theta = \cos^{-1} \theta \)
\( \arctan \theta = \tan^{-1} \theta \) \( \arctan \theta = \tan^{-1} \theta \)

 

双曲線関数(hyperbolic function)

MathJaxでは、以下の三角関数を出力するコマンドが用意されています。

コマンド 出力 コマンド 出力
\( \sinh x \) \( \sinh x \) \( \cosh x \) \( \cosh x \)
\( \tanh x \) \( \tanh x \) \( \coth x \) \( \coth x \)

これ以外の双曲線関数(csch、sech)のコマンドはありません。

 

定義式は次のように記述します。

\(\displaystyle \sinh x = \frac{e^x - e^{-x}}{2} \) \(\displaystyle \sinh x = \frac{e^x – e^{-x}}{2} \) \(\displaystyle \cosh x = \frac{e^x + e^{-x}}{2} \) \(\displaystyle \cosh x = \frac{e^x + e^{-x}}{2} \)
\(\displaystyle \tanh = \frac{\sinh x}{\cosh x} \) \(\displaystyle \tanh = \frac{\sinh x}{\cosh x} \) \(\displaystyle \coth = \frac{1}{\tanh x} \) \(\displaystyle \coth = \frac{1}{\tanh x} \)

 

逆双曲線関数(inverse hyperbolic function)

逆双曲線関数は次のように記述します。

コマンド 出力
\( \sinh^{-1} x = \ln \left( x + \sqrt{x^2 + 1} \right) \) \( \sinh^{-1} x = \ln \left( x + \sqrt{x^2 + 1} \right) \)
\( \cosh^{-1} x = \ln \left( x \pm \sqrt{x^2 - 1} \right) \) \( \cosh^{-1} x = \ln \left( x \pm \sqrt{x^2 – 1} \right) \)
\(\displaystyle \tanh = \frac{1}{2} \ln \left( \frac{1 + x}{1 - x} \right) \) \(\displaystyle \tanh = \frac{1}{2} \ln \left( \frac{1 + x}{1 – x} \right) \)

対数関数のページもご参照ください。

 

メニュー

MathJaxを使用してわかってきたこと、注意点などを自分用の備忘録も兼ねてまとめていきます。   コマンド例は基本インライン表示にしています。必要に応じてディスプレイ数式モードへの書き換えをしてください。 環境構築[…]

数式アイキャッチ
数式アイキャッチ
最新情報をチェックしよう!