## 2019年3月29日金曜日

### 数学 - Python - 解析学 - 数 - 複素数(除算の絶対値と絶対値の除算、共役)

1. $\begin{array}{}\alpha =a+bi\\ \beta =c+di\\ a,b,c,d\in \text{ℝ}\end{array}$

とおく。

このとき、

$\begin{array}{}\left|\frac{\alpha }{\beta }\right|\\ =\left|\frac{\alpha \stackrel{-}{\beta }}{\beta \stackrel{-}{\beta }}\right|\\ =\frac{\left|\alpha \stackrel{-}{\beta }\right|}{{\left|\beta \right|}^{2}}\\ =\frac{\left|\left(a+bi\right)\left(c-di\right)\right|}{{\left|\beta \right|}^{2}}\\ =\frac{\left|\left(ac+bd\right)-\left(ad-bc\right)i\right|}{{\left|\beta \right|}^{2}}\\ =\frac{\sqrt{{\left(ac+bd\right)}^{2}+{\left(ad-bc\right)}^{2}}}{{\left|\beta \right|}^{2}}\\ =\frac{\sqrt{{a}^{2}{c}^{2}+{b}^{2}{d}^{2}+{a}^{2}{d}^{2}+{b}^{2}{c}^{2}}}{{\left|\beta \right|}^{2}}\end{array}$

また、

$\begin{array}{}\frac{\left|\alpha \right|}{\left|\beta \right|}\\ =\frac{\left|\alpha \right|\left|\beta \right|}{{\left|\beta \right|}^{2}}\\ =\frac{\sqrt{{a}^{2}+{b}^{2}}\sqrt{{c}^{2}+{d}^{2}}}{{\left|\beta \right|}^{2}}\\ =\frac{\sqrt{{a}^{2}{c}^{2}+{a}^{2}{d}^{2}+{b}^{2}{c}^{2}+{b}^{2}{d}^{2}}}{{\left|\beta \right|}^{2}}\end{array}$

よって、

$\left|\frac{\alpha }{\beta }\right|=\frac{\left|\alpha \right|}{\left|B\right|}$

（証明終）

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols

print('2.')

a = symbols('a', imag=True)
b = symbols('b', imag=True, nonzero=True)

l = abs(a / b)
r = abs(a) / abs(b)

for o in [l, r, l == r]:
pprint(o)
print()


C:\Users\...>py -3 sample2.py
2.
│a│
───
│b│

│a│
───
│b│

True

C:\Users\...>