今日の計算!

POINT

  • 計算をした日にはメモをしようという試み.
  • 走り書きならぬ「走りTeX」.
  • 増えたら何かしらの分類を考える予定.

2021/03/31:min,maxの合成関数

$\max, \min$の合成
  1. $\textcolor{red}{\max}\bigl(a, \textcolor{red}{\max}(b,c)\bigr) = \textcolor{red}{\max}(a,b,c)$
  2. $\textcolor{blue}{\min}\bigl(a, \textcolor{blue}{\min}(b,c)\bigr) = \textcolor{blue}{\min}(a,b,c)$
  3. $\textcolor{red}{\max}\bigl(a, \textcolor{blue}{\min}(b,c)\bigr)=\textcolor{blue}{\min} \bigl(\textcolor{red}{\max}\bigl(a, b\bigr), \textcolor{red}{\max}\bigl(a, c\bigr) \bigr)$
  4. $\textcolor{blue}{\min}\bigl(a, \textcolor{red}{\max}(b,c)\bigr)=\textcolor{red}{\max} \bigl(\textcolor{blue}{\min}\bigl(a, b\bigr), \textcolor{blue}{\min}\bigl(a, c\bigr) \bigr)$
【解説】
最初の2つは簡単なので,残りの2つを示します.内側から順に考えれば良いです.
【3. の証明】
\begin{aligned}
&\max\bigl(a, \min(b,c)\bigr) \\
&=
\begin{cases}
\, \max\bigl(a, b\bigr) & (b\leq c) \\
\, \max\bigl(a, c\bigr) & (c < b)
\end{cases} \\
&=\min \bigl(\max\bigl(a, b\bigr), \max\bigl(a, c\bigr) \bigr)
\end{aligned}

【4. の証明】

\begin{aligned}
&\min\bigl(a, \max(b,c)\bigr) \\
&=
\begin{cases}
\, \min\bigl(a, b\bigr) & (b\geq c) \\
\, \min\bigl(a, c\bigr) & (c > b)
\end{cases} \\
&=\max \bigl(\min\bigl(a, b\bigr), \min\bigl(a, c\bigr) \bigr)
\end{aligned}


2021/03/20

$y=\sum_{k=1}^{N} w_{k} e^{ix_{k}}\,(w_{k}\in\mathbb{R})$に対して
\begin{aligned}
|y|^{2}
&=\sum_{k,l=1}^{N} w_{k} w_{l}\cos(x_{k} - x_{l}) \\
&=\sum_{k=1}^{N} w_{k}^{2} + 2 \sum_{1\leq k < l\leq N} w_{k} w_{l}\cos(x_{k} - x_{l})
\end{aligned}
例えば,三角関数の合成と一般化 - Notes_JPで使っています.

【方法1】
\begin{aligned}
|y|^{2}
&=y\bar{y} \\
&=\sum_{k,l=1}^{N} w_{k} w_{l} e^{i(x_{k} - x_{l})} \\
&=\sum_{k,l=1}^{N} w_{k} w_{l} \Bigl[\cos(x_{k} - x_{l}) + i\sin(x_{k} - x_{l}) \Bigr]
\end{aligned}
の両辺の実部をとれば
\begin{aligned}
|y|^{2}
&=\sum_{k,l=1}^{N} w_{k} w_{l}\cos(x_{k} - x_{l}) \\
&=\sum_{k=1}^{N} w_{k}^{2} + 2 \sum_{1\leq k < l\leq N} w_{k} w_{l}\cos(x_{k} - x_{l})
\end{aligned}
となる.//

【方法2】

\begin{aligned}
|y|^{2}
&=y\bar{y} \\
&=\sum_{k,l=1}^{N} w_{k} w_{l} e^{i(x_{k} - x_{l})} \\
&=\sum_{k=1}^{N} w_{k}^{2} +
\sum_{1\leq k < l\leq N} w_{k} w_{l}
\underbrace{ \Bigl( e^{i(x_{k} - x_{l})} + e^{-i(x_{k} - x_{l})} \Bigr)}_{2 \cos(x_{k} - x_{l})}
\end{aligned}

2020/05/09

物理とグリーン関数 (物理数学シリーズ 4)$\S 3.4$
\begin{aligned}
I=
&\int_{-\infty}^{\infty} \frac{1}{4\pi}\frac{1}{\sqrt{\rho^2+z^2}} \delta\Biggl(t-\frac{\sqrt{\rho^2+z^2}}{c}\Biggr)\,\mathrm{d}z \\
&=\frac{c}{2\pi}\frac{1}{\sqrt{c^2t^2-\rho^2}}\theta(ct-\rho)
\end{aligned}


【方法1】
\begin{aligned}
\frac{\mathrm{d}}{\mathrm{d}x}\theta\bigl(g(x)\bigr)
&=\theta^\prime\bigl(g(x)\bigr) g^\prime(x) \\
&=\delta\bigl(g(x)\bigr) g^\prime(x)
\end{aligned}
なので,
\begin{aligned}
&\frac{\mathrm{d}}{\mathrm{d}x} \bigl[f(x)\theta\bigl(g(x)\bigr)\bigr] \\
&=f^\prime(x) \theta\bigl(g(x)\bigr) + f(x)\delta\bigl(g(x)\bigr) g^\prime(x).
\end{aligned}
ここで
\begin{aligned}
f(z)=-\frac{c}{4\pi}\frac{1}{z} ,\quad
g(z)=t-\frac{\sqrt{\rho^2+z^2}}{c}
\end{aligned}
とすると
\begin{aligned}
g^\prime(z)&=-\frac{1}{c}\frac{z}{\sqrt{\rho^2+z^2}}
\end{aligned}
なので
\begin{aligned}
I&=\int_{-\infty}^{\infty} f(z)g^\prime(z)\delta\bigl(g(z)\bigr) \,\mathrm{d}z \\
&=\cancel{\bigl[f(z)\theta\bigl(g(z)\bigr)\bigr]_{-\infty}^{\infty}}
-\int_{-\infty}^{\infty} f^\prime(z)\theta\bigl(g(z)\bigr) \,\mathrm{d}z \\
&=-\theta(ct-\rho) \int_{-\sqrt{c^2t^2-\rho^2}}^{\sqrt{c^2t^2-\rho^2}} f^\prime(z) \mathrm{d}z \\
&=-\theta(ct-\rho) \bigl[f(z)\bigr]_{-\sqrt{c^2t^2-\rho^2}}^{\sqrt{c^2t^2-\rho^2}} \\
&=\frac{c}{2\pi}\frac{1}{\sqrt{c^2t^2-\rho^2}} \theta(ct-\rho)
\end{aligned}
となる.ここで
\begin{aligned}
&\bigl\{z\in(-\infty,\infty)\,|\, g(z) > 0\bigr\} \\
&=
\begin{cases}
\,\emptyset &(ct \leq \rho) \\
\, -\sqrt{c^2t^2-\rho^2} < z < \sqrt{c^2t^2-\rho^2}& (ct > \rho)
\end{cases}
\end{aligned}
を用いた.


【方法2:$ct = \rho$の場合が不完全な方法(1解微分0の場合に公式を拡張する必要があるが,未検討)】

\begin{aligned}
g(z)=t-\frac{\sqrt{\rho^2+z^2}}{c}
\end{aligned}
とすると
\begin{aligned}
g^{-1}(0)
&=\begin{cases}
\, \{z_\pm=\pm\sqrt{c^2t^2-\rho^2} \}& (ct > \rho)\\
\, \{0\} & (ct = \rho)\\
\, \{z^\prime_\pm=\pm i\sqrt{\rho^2 - c^2t^2}\} & (ct < \rho)
\end{cases} \\
g^\prime(z)&=-\frac{1}{c}\frac{z}{\sqrt{\rho^2+z^2}}
\end{aligned}
なので,デルタ関数の公式から
\begin{aligned}
I&=\int_{-\infty}^{\infty}
\frac{1}{4\pi}\frac{1}{\sqrt{\rho^2+z^2}} \sum_{i=\pm}\frac{1}{|g^\prime(z_i)|} \delta(z-z_i)\,\mathrm{d}z \\
&\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
\times\theta(ct-\rho) \\
&=\frac{1}{4\pi} \sum_{i=\pm}
\int_{-\infty}^{\infty}\frac{1}{\sqrt{\rho^2+z^2}}
\frac{c \sqrt{\rho^2+z_i^2}}{|z_i|} \delta(z-z_i)
\,\mathrm{d}z \\
&\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad
\times\theta(ct-\rho) \\
&=\frac{c}{2\pi}\frac{1}{\sqrt{c^2t^2-\rho^2}} \theta(ct-\rho)
\end{aligned}



2020/02/12

関数
\begin{aligned}
f(x)=\frac{e^{-\alpha x}}{2+\cos x}
\end{aligned}
の極値点を求める($\cos x$で振動するので,極値は存在するはず).
(背景:Wolfram Alphaの提示してきた解($\alpha=1/10$)を計算により確認した)

$g(x)=2+\cos x$とおく.導関数は
\begin{aligned}
f^\prime (x)
&=-\alpha f(x)+e^{-\alpha x}\Biggl[- \frac{1}{g^2}\frac{\mathrm{d} g}{\mathrm{d}x}(x) \Biggr] \\
&=-\Biggl(\alpha + \frac{1}{g}\frac{\mathrm{d} g}{\mathrm{d}x} \Biggr) f(x)
\end{aligned}
となる.$f(x)\neq 0$より,$(\cdots)=0$が極値点の条件である.
\begin{aligned}
\frac{1}{g}\frac{\mathrm{d} g}{\mathrm{d}x}
=\frac{-\sin x}{2+\cos x}
\end{aligned}
から,
\begin{aligned}
&-\sin x + \alpha \cos x + 2\alpha =0 .
\end{aligned}
ここで,$\theta = x/2$とすれば,
\begin{aligned}
-2\sin\theta \cos\theta + \alpha (\cos^2\theta - \sin^2\theta) + 2\alpha = 0 .
\end{aligned}
$1/\cos^2\theta = 1+\tan^2\theta$を使えば,
\begin{aligned}
&\Leftrightarrow -2\tan\theta + \alpha (1-\tan^2\theta) + 2\alpha (1+\tan^2\theta) = 0 \\
&\Leftrightarrow \alpha \tan^2\theta -2\tan\theta + 3\alpha = 0
\end{aligned}
となる.2次方程式の解の公式から,
\begin{aligned}
\tan\theta = \frac{1\pm\sqrt{1-3\alpha^2}}{\alpha}
\end{aligned}
と求まる.//