• 検索結果がありません。

数式 組 合 簡単 例 紹介 .

\newcommand*\niji[3][]{% [a]{b}{c}

\ensuremath{#1x^2+#2x+#3=0}}

\newcommand*\Niji[3][]{% [a]{b}{c}

\ensuremath{x=\frac{-#2\pm%

\sqrt{#2^2-4#1#3}}{2#1}}}

二次方程式\niji[a]{b}{c} 一般解

\begin{displaymath}

\Niji[a]{b}{c}

\end{displaymath}

\niji{6}{5} 場合

\niji{6}{5} $x=1,5$

二次方程式ax2+bx+c= 0 一般解 x=−b±√

b24ac 2a

x2+ 6x+ 5 = 0 場合 x2+ 6x+ 5 = 0 x= 1,5

不定積分 表現 定積分 表現 次 場合 考 .

\usepackage{txfonts}

\[ \int f(x)dx + \int g(y)dy +

\iint h(x,y)dx\,dy \]

Z

f(x)dx+ Z

g(y)dy+ ZZ

h(x, y)dx dy 場合 新規 \intx \iintxy 定義 手間 省 .

\newcommand\intx[1]{\int#1dx}

\newcommand\inty[1]{\int#1dy}

\newcommand\iintxy[1]{\iint#1dx\,dy}

\[ \intx{f(x)} + \inty{g(y)} +

\iintxy{h(x,y)} \]

Z

f(x)dx+ Z

g(y)dy+ ZZ

h(x, y)dx dy

複雑 数式 書 直接書 良 知 .

線形微分方程式dy/dx+P(x)y=Q(x) 一般解 表現

\[ y=e^{-\int P(x)dx}\left\{

\int{Q(x)e^{\int P(x)dx}dx +

\mathrm{c}} \right\} \]

y=e

RP(x)dxZ Q(x)e

RP(x)dx

dx+ c ff

何回 書 無駄 ,公式通 新規 命令 作 汎用的 P(x) Q(x) 書 事 .

\newcommand{\my}{%

\ensuremath{dy/dx+P(x)y=Q(x)}}

\newcommand{\mypq}[2]{\ensuremath{%

e^{\int{#1}dx}\left\{\int{{#2}%

e^{\int{#1}dx}dx+\mathrm{c}}%

\right\}}}

$P(x)=x^2+\pi$ $Q(x)=e^x$

{\my} 一般解 $y$ \[

\mypq{(x^2+\pi)}{e^x}\]

P(x) =x2+π Q(x) =ex dy/dx+P(x)y=Q(x) 一般解y

e

R(x2+π)dxZ exe

R(x2+π)dx

dx+ c ff

何 数式 公式 確立 場合 作成 便

利 . 展開 展開 毎回書 面倒 次 使

方 良 .

偏微分記号 多 出 数式 考 .

\[\frac{\partial f}{\partial x}+

\frac{\partial^2f}{\partial x^2}+

\frac{\partial^3f}{\partial x^3}\]

∂f

∂x+2f

∂x2 +3f

∂x3

毎回 記述 疲 次 作成 用 .

\newcommand{\pdif}[3][]{\frac{%

\partial^{#1}{#2}}{\partial{#3}^{#1}}}

\[ \pdif{f}{x}+\pdif[2]{f}{x} \]

∂ f

∂x +2f

∂x2

良 ,変数 二 以上 場合 手動 対処 .

\newcommand{\pdif}[3][]{\frac{%

\partial^{#1}{#2}}{\partial{#3}^{#1}}}

\[ \pdif[2]{f}{x} + \pdif{\sp2f}{xy} +

\pdif[2]{f}{y} \]

2f

∂x2 +2f

∂xy +2f

∂y2

\partial \frac 書 .

作成中 文書 分野 考 公式 一部分 作成 有

効 知 .

5

H 5.9.1 記号 積 重

‘=’ ‘def’ ‘def=’ 記号 出 .

\stackrel 命令 使 .一 目 引数 二 目 引数 載

関係子 作 .

\stackrel{h上 記号i}{h下 記号i}

\newcommand{\defeq}{%

\stackrel{\mathrm{def}}{=}}

\( x \defeq p(t)+q(t)+r(t) \)

xdef= p(t) +q(t) +r(t)

記号 積 重 少 違 ,次 数式 出力

. 例 \substack amsmath 含 命令 使

\begin{displaymath}

\sum^l_{i=1} \sum^m_{j=1} \sum^n_{k=1}

p_i q_j r_k \neq \sum_{

\substack{i\le 1\le l \\ j\le 1 \le m

\\ k\le 1 \le n}} p_i q_j r_k

\end{displaymath}

Xl i=1

Xm j=1

Xn k=1

piqjrk6= X

i1l j1m k1n

piqjrk

H 5.9.2 記号 重 合

二 記号 重 合 新 記号 作 .\ooalign

\crcr命令 組 合 .

{\ooalign{h一 目i\crcrh二 目i}}

二 記号 内 横幅 広 幅 優先 .二 記号 中心 重 合 \hss 空白 挿入 命令 使 . 文字列 \not

使 演算子 否定 次 定義 良

\newcommand{\cnot}[1]{\ooalign{\crcr{\hss{#1}\hss}}}

全角 使 .

\newcommand{\pile}[2]{%

{\ooalign{#1\crcr#2}}}

\newcommand{\cpile}[2]{{\ooalign{{%

\hss#1\hss}\crcr{\hss#2\hss}}}}

\newcommand{\cnot}[1]{%

\ooalign{\crcr{\hss{#1}\hss}}}

特 性 数$\pile Y=$ 定 数$\cpile Y=$

云々

\cnot{A} \pile/A 別物

特性数Y= 定数Y= 云々 ,/A /A

別物

H 5.9.3 数式 太字

何 理由 数式 一部 , 数式全体 太字 事 . 方法

• \mathbf命令 使 .

• \boldmath \unboldmath 使 太字 切 替 .

• amsmath 含 amsbsy \boldsymbol命令 使 .

• bm \bm命令 使 .

. 使用 数式書体 使 事 .

txfonts pxfonts 使 問題 出力 .一 目 \boldmath

\unboldmath 数式 中 使 事

\(\mathbf{\int^a_b f(x)dx} \neq\)

\boldmath \(\int^a_b f(x)dx \neq\)

\unboldmath\(\int^a_b f(x)dx \)

Ra

bf(x)dx6=Ra

b f(x)dx6=Ra b f(x)dx

\mathbf 場合 文字 特定 記号 太字

体 体 . 少 局所的 使 場合 amsbsy

\boldsymbol 使 .

\(\mathbf{\int^a_b f(x)dx} \neq

\boldsymbol{\int^a_b f(x)dx}\neq

\int^a_b f(x)dx \)

Ra

bf(x)dx6=RRRa

bf(x)dx6=Ra b f(x)dx

現在 amsbsy 使 bm \bm命令 使 良 .

5

\(\mathbf{\int^a_b f(x)dx} \neq

\bm{\int^a_b f(x)dx} \neq

\int^a_b f(x)dx \)

Ra

bf(x)dx6=RRRa

bf(x)dx6=Ra b f(x)dx

H 5.9.4 幅 揃

記号 使 高 揃 見栄 悪

. 数式中 高 揃 \mathstrut命令 使 .

\[ \overline{\sqrt a + \sqrt b

\neq \sqrt{\mathstrut a}+

\sqrt{\mathstrut b}} \]

√a+ b6=p

a+p b

分 実 高 ,深 \mathstrut 自動的

調整 .

少 高度 命令 \phantom,\vphantom,\hphantom 三 用意

.\phantom命令 引数 与 要素 高 幅 深 持 空白

作成 .\vhpantom 引数 与 要素 高 同 目 見 箱 作成

.\hphantom 横方向 .

\[ \sqrt{\int f(x)dx}+\sqrt{g}

\neq \sqrt{\int f(x)dx}+\sqrt {\vphantom{\int f(x)dx} g} \]

sZ

f(x)dx+ g6=sZ

f(x)dx+ s

g

一 \smash 命令 , 引数 与 要素 高 深 0

魔法 .\smash \vphantom 組 合 要素 幅

高 深 0 \vphantom 指定 高 深 見 箱

作成 ,高 使 .

\[\underbrace{a+b}+\underbrace{i+j}

\neq \underbrace{\smash{a+b}

\vphantom{i+j}} + \underbrace{i+j}\]

a+b

| {z }+i+j

| {z }6=a+b

| {z }+i+j

| {z }

.例題5.10 高 ,幅,深 擬似的 模倣 \phantom命令 ,次 整列 可能 .

\newcommand\PN[1]{\phantom{\mbox{}#1}}

\begin{eqnarray*}

a_{11}x_1 +a_{12}x_1 \PN{+a_{23}x_3}

&=& b_1\\

a_{21}x_1 +a_{22}x_2 + a_{23}x_3

&=& b_2\\

a_{31}x_1 \PN{+a_{22}x_2}+ a_{33}x_3

&=& b_3

\end{eqnarray*}

a11x1+a12x1 =b1

a21x1+a22x2+a23x3=b2

a31x1 +a33x3=b3

, ‘+’ 前 何 要素 ,適切 空白 挿入

,\mbox命令 補 .

H 5.9.5 分数 書 方

文中数式中 分数 出力 \frac命令 使 ab . 分数 書 方 .a/b 書 一般的 文中 分数

\[ \frac{\frac{a}{b}}{c}\neq

\frac{a/b}{c} \]

a b

c 6= a/b c

分数 別行数式 当 .別行数式 分数

記述 , 分母・分子上 分数 書 ,連分数 記述 場合

‘/’ 表記 . 表記

宜丸括弧 補

\begin{displaymath}

\frac{\frac{a-b}{c}}{d} \neq

\frac{a-b/c}{d} \neq \frac{(a-b)/c}{d}

\end{displaymath}

ab c

d 6=a−b/c

d 6=(a−b)/c d

\begin{displaymath}

(a+f(x))/(a-g(x)) \neq

\bigl(a+f(x)\bigr)\big/

\bigl(a-g(x)\bigr)

\end{displaymath}

(a+f(x))/(a−g(x))6=`

a+f(x)´‹`

a−g(x)´

5 .例題5.11 次 入力例 \frac 使 書 直 .

定理 $f=\frac{1}{ef + ev}$

$g=\frac{f + e - v}{2}$

定義

定理 f =ef+ev1 g=

f+e−v

2 定義

括弧 補 ,次 .

定理 $f=1/(ef + ev)$

$g=(f + e - v)/2$

定義

定理 f= 1/(ef+ev) g= (f+e−v)/2 定義

H 5.9.6 場合分

一 式 解 複数 場合分 場合 \cases命令 使 amsmath

cases環境 行 .

\begin{cases}

h要素1i\\h要素2i\\. . . \\h要素ni

\end{cases}

\( f(x) = \begin{cases}

\,x & \quad(x>0)\\

\,0 & \quad(x=0)\\

\,-x & \quad(x<0)

\end{cases} \)

f(x) = 8>

><

>>

:

x (x >0) 0 (x= 0)

−x (x <0)

他 \choose 要素 縦 並 括弧 付 命令 .

\choose (丸括弧付 ) \brack (角括弧付 )

\brace (波括弧付 ) \atop (括弧 )

\choose 全体 波括弧 括 正 出力 .

\[ {a + b \brack x + y} \neq {a + b \brace x + y} \neq {a + b \atop x + y} \]

"

a+b x+y

# 6=

( a+b x+y )

6= a+b x+y

\begin{displaymath}

\frac{a+b}{x+y} \neq \binom{a+b}{x+y}

\end{displaymath}

a+b

x+y 6= a+b x+y

!

H 5.9.7 数式 中 空白 書体

数式用 環境 自動的 要素 前後 記号 種類 空白 調節 意図 結果 異 場合 .

\emph{fool} \(fool\)

\[ fool \neq \mathit{fool}. \]

fool f ool

f ool6=fool.

‘fool’ 文字 全 数式中 変数 解釈 , LATEX 適切 思

空白 挿入 . 分 数式 中 明示

的 空白 調節 良 場合 .

$5,000\times10=50,000$ \par

$5{,}000\times10=50{,}000$

5,000×10 = 50,000 5,000×10 = 50,000

上記 例 ‘,’ 恐 何 区切 解釈 ,意図 広 .同 感嘆符‘!’ 逆 空白 挿入

. \,命令 若干 空 挿入 .

\[ \frac{(p - 1)! (q - 1)!}

{p! q! r!} \neq

\frac{(p - 1)!\,(q - 1)!}

{p!\,q!\,r!} \]

(p1)!(q1)!

p!q!r! 6= (p1)! (q1)!

p!q!r!

感嘆符‘!’ 例 見 分 数式 中 斜体 . 数式 中 斜体 記号 .\textit 記号

体 数式中 \mathit 使 記号 斜体

,空白制御 行 .

\usepackage{amsmath}

\newcommand*\temptxt{Is this text mode?!}

\textit{\temptxt}\\

\(\mathit{\temptxt}\)\\

\(\temptxt\)\\

\(\mathit{Is\ this\ text\

mode?!}\)

Is this text mode?!

Isthistextmode?!

Isthistextmode?!

Is this text mode?!

5

場合 疑問符‘?’ 体 . 数式中

明示的 体 書体 変更 命令 使 体 記号

H 5.9.8 行列 省略点

例 ,連立方程式 列挙 .

\begin{eqnarray}

a_{11}x_1 + a_{12}x_2 + \dots + a_{1k}x_k & = & b_1 \nonumber \\

a_{21}x_1 + a_{12}x_2 + \dots + a_{1k}x_k & = & b_2 \nonumber \\

\vdots & = & \vdots \nonumber\\

a_{n1}x_1 + a_{n2}x_2 + \dots + a_{nk}x_k & = & b_n \nonumber

\end{eqnarray}

a11x1+a12x2+· · ·+a1kxk=b1

a21x1+a12x2+· · ·+a1kxk=b2

...=... an1x1+an2x2+· · ·+ankxk=bn

, 適切 空白 挿入 ,正統 入出力 言

. 次 修正 .

\begin{displaymath}

\begin{array}{*{2}{c@{\:+\:}}%

@{\cdots\:+\:}c@{\;=\;}c}

a_{11}x_1 & a_{12}x_2 & a_{1k}x_k

& b_1\\

a_{21}x_1 & a_{12}x_2 & a_{1k}x_k

& b_2\\

\vdots & \vdots & \vdots

& \vdots\\

a_{n1}x_1 & a_{n2}x_2 & a_{nk}x_k

& b_n\\

\end{array}

\end{displaymath}

a11x1+a12x2+· · · +a1kxk=b1

a21x1+a12x2+· · · +a1kxk=b2

... + .

.. +· · · + . .. = .

..

an1x1+an2x2+· · · +ankxk=bn

, 3行目 影響 及 ,意図 結果 .

\multicolumn命令 用 次 修正 .

\begin{displaymath}

\begin{array}{*{2}{c@{\:+\:}}%

@{\cdots\:+\:}c@{\;=\;}c}

a_{11}x_1 & a_{12}x_2 & a_{1k}x_k

& b_1\\

a_{21}x_1 & a_{12}x_2 & a_{1k}x_k

& b_2\\

\multicolumn{4}{c}{\dotfill} \\

a_{n1}x_1 & a_{n2}x_2 & a_{nk}x_k

& b_n\\

\end{array}

\end{displaymath}

a11x1+a12x2+· · ·+a1kxk =b1

a21x1+a12x2+· · ·+a1kxk =b2

. . . . an1x1+an2x2+· · ·+ankxk=bn

, 場合 省略点 間隔 不揃 ,完全 言 .