02. 볡μμ (Complex Numbers)
02. 볡μμ (Complex Numbers)¶
Boas Chapter 2 β 물리과νμμ 볡μμλ λ¨μν μνμ λꡬλ₯Ό λμ΄, νλ νμ, κ΅λ₯ νλ‘, μμμν λ± ν΅μ¬ 물리νμ μΈμ΄μ λλ€.
νμ΅ λͺ©ν¶
μ΄ λ μ¨μ μλ£νλ©΄ λ€μμ ν μ μμ΅λλ€:
- 볡μμμ λμμ , κΈ°ννμ ννμ μμ μμ¬λ‘ λ³νν μ μλ€ (μ§κ΅μ’ν, κ·Ήμ’ν, μ§μ νμ)
- μ€μΌλ¬ 곡μκ³Ό λλͺ¨μλΈλ₯΄ μ 리λ₯Ό μ΄μ©νμ¬ μΌκ°ν¨μ νλ±μμ μ λνκ³ κ±°λμ κ³±κ·Όμ ꡬν μ μλ€
- 볡μ ν¨μ(μ§μ, μΌκ°, μ곑, λ‘κ·Έ)μ μ±μ§μ μ΄ν΄νκ³ κ³μ°ν μ μλ€
- 물리ν μμ©: κ΅λ₯ νλ‘μ μνΌλμ€ κ³μ°, νλμ 볡μ νν, μμμνμ νλν¨μλ₯Ό λ€λ£° μ μλ€
- 볡μμλ₯Ό μ΄μ©ν 2D λ³νμ κΈ°ννμ μλ―Έλ₯Ό νμ νκ³ , λ±κ°μ¬μ(conformal mapping)μ κΈ°λ³Έ μ리λ₯Ό μ΄ν΄νλ€
1. 볡μμμ κΈ°λ³Έ¶
1.1 νμ λ¨μμ 볡μμ μ μ¶
μ€μ(real number)λ§μΌλ‘λ $x^2 + 1 = 0$κ³Ό κ°μ λ°©μ μμ ν μ μμ΅λλ€. νμ λ¨μ(imaginary unit) $i$λ₯Ό λ€μκ³Ό κ°μ΄ μ μν©λλ€:
$$ i^2 = -1, \quad i = \sqrt{-1} $$
볡μμ(complex number) $z$λ λ μ€μ $a$, $b$λ‘ κ΅¬μ±λ©λλ€:
$$ z = a + bi $$
- $a = \text{Re}(z)$: μ€μλΆ(real part)
- $b = \text{Im}(z)$: νμλΆ(imaginary part)
μ°Έκ³ : 곡νμμλ μ λ₯ $i$μμ νΌλμ νΌνκΈ° μν΄ νμ λ¨μλ₯Ό $j$λ‘ νκΈ°ν©λλ€. Pythonλ
jλ₯Ό μ¬μ©ν©λλ€.
볡μ μΌ€λ (complex conjugate):
$$ \bar{z} = z^* = a - bi $$
μ λκ°(modulus, absolute value):
$$ |z| = \sqrt{a^2 + b^2} = \sqrt{z \cdot \bar{z}} $$
import numpy as np
# 볡μμ κΈ°λ³Έ μ°μ°
z1 = 3 + 4j
z2 = 1 - 2j
print(f"z1 = {z1}")
print(f"μ€μλΆ: {z1.real}, νμλΆ: {z1.imag}")
print(f"μΌ€λ : {z1.conjugate()}")
print(f"|z1| = {abs(z1):.4f}") # sqrt(9 + 16) = 5.0
# μ μ©ν μ±μ§
print(f"\nz1 * conj(z1) = {z1 * z1.conjugate()}") # |z1|^2 = 25
print(f"|z1|^2 = {abs(z1)**2}")
1.2 볡μ νλ©΄ (μλ₯΄κ° λ€μ΄μ΄κ·Έλ¨)¶
볡μμ $z = a + bi$λ 2μ°¨μ νλ©΄ μμ μ $(a, b)$λ‘ ννλ©λλ€. μ΄ νλ©΄μ 볡μ νλ©΄(complex plane) λλ μλ₯΄κ° λ€μ΄μ΄κ·Έλ¨(Argand diagram)μ΄λΌ ν©λλ€.
- κ°λ‘μΆ: μ€μμΆ (real axis)
- μΈλ‘μΆ: νμμΆ (imaginary axis)
- μ $z$κΉμ§μ 거리: $|z|$ (μμ μΌλ‘λΆν°μ 거리)
- μ€μμΆκ³Όμ κ°λ: $\theta = \arg(z)$ (νΈκ°, argument)
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1, 1, figsize=(8, 8))
# 볡μμ λ°°μ΄
points = {
r'$3+4i$': 3+4j,
r'$-2+3i$': -2+3j,
r'$-1-2i$': -1-2j,
r'$4-i$': 4-1j,
r'$2i$': 2j,
r'$-3$': -3+0j,
}
colors = ['#e74c3c', '#3498db', '#2ecc71', '#f39c12', '#9b59b6', '#1abc9c']
for (label, z), color in zip(points.items(), colors):
# μ νμ
ax.plot(z.real, z.imag, 'o', color=color, markersize=10, zorder=5)
ax.annotate(label, (z.real, z.imag), textcoords="offset points",
xytext=(10, 10), fontsize=12, color=color)
# μμ μμ νμ΄ν
ax.annotate('', xy=(z.real, z.imag), xytext=(0, 0),
arrowprops=dict(arrowstyle='->', color=color, lw=1.5))
# μΆ μ€μ
ax.axhline(y=0, color='k', linewidth=0.8)
ax.axvline(x=0, color='k', linewidth=0.8)
ax.set_xlim(-5, 6)
ax.set_ylim(-4, 6)
ax.set_xlabel('Re(z)', fontsize=13)
ax.set_ylabel('Im(z)', fontsize=13)
ax.set_title('볡μ νλ©΄ (Argand Diagram)', fontsize=15)
ax.set_aspect('equal')
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('complex_plane.png', dpi=150, bbox_inches='tight')
plt.show()
1.3 볡μμμ μ¬μΉμ°μ°¶
λ 볡μμ $z_1 = a + bi$, $z_2 = c + di$μ λν΄:
λ§μ /λΊμ : μ€μλΆμ νμλΆλ₯Ό κ°κ° μ°μ°
$$ z_1 \pm z_2 = (a \pm c) + (b \pm d)i $$
κ³±μ : $i^2 = -1$μ μ΄μ©νμ¬ μ κ°
$$ z_1 \cdot z_2 = (ac - bd) + (ad + bc)i $$
λλμ : λΆλͺ¨λ₯Ό μΌ€λ λ‘ μ 리ν(rationalization)
$$ \frac{z_1}{z_2} = \frac{z_1 \cdot \bar{z_2}}{|z_2|^2} = \frac{(ac + bd) + (bc - ad)i}{c^2 + d^2} $$
import numpy as np
z1 = 3 + 4j
z2 = 1 - 2j
print("=== 볡μμ μ¬μΉμ°μ° ===")
print(f"z1 + z2 = {z1 + z2}") # (4+2j)
print(f"z1 - z2 = {z1 - z2}") # (2+6j)
print(f"z1 * z2 = {z1 * z2}") # (11-2j) = (3+8)+(4-6)i
print(f"z1 / z2 = {z1 / z2}") # (-1+2j)
# λλμ
κ²μ¦: μλ κ³μ°
numerator = z1 * z2.conjugate()
denominator = abs(z2)**2
print(f"\nλλμ
μλ κ²μ¦:")
print(f" z1 * conj(z2) = {numerator}")
print(f" |z2|^2 = {denominator}")
print(f" κ²°κ³Ό = {numerator / denominator}")
2. κ·Ήμ’ν ννκ³Ό μ§μ νν¶
2.1 κ·Ήμ’ν νμ (r, $\theta$)¶
볡μμ $z = a + bi$λ₯Ό κ·Ήμ’νλ‘ νννλ©΄:
$$ z = r(\cos\theta + i\sin\theta) $$
μ¬κΈ°μ: - $r = |z| = \sqrt{a^2 + b^2}$ : μ λκ° (modulus) - $\theta = \arg(z) = \arctan\left(\frac{b}{a}\right)$ : νΈκ° (argument)
μλ³ν:
$$ a = r\cos\theta, \quad b = r\sin\theta $$
μ£Όμ: $\arctan(b/a)$λ§μΌλ‘λ μ¬λΆλ©΄μ ꡬλ³ν μ μμΌλ―λ‘, νλ‘κ·Έλλ°μμλ
np.arctan2(b, a)λλnp.angle(z)λ₯Ό μ¬μ©ν©λλ€.
2.2 μ€μΌλ¬ 곡μ (Euler's Formula)¶
μνμμ κ°μ₯ μλ¦λ€μ΄ 곡μ μ€ νλμΈ μ€μΌλ¬ 곡μ:
$$ e^{i\theta} = \cos\theta + i\sin\theta $$
μ΄λ₯Ό μ΄μ©νλ©΄ 볡μμλ₯Ό μ§μ νμ(exponential form)μΌλ‘ ννν μ μμ΅λλ€:
$$ z = re^{i\theta} $$
μ€μΌλ¬ λ±μ ($\theta = \pi$ λμ ):
$$ e^{i\pi} + 1 = 0 $$
μ΄ λ±μμ μνμ λ€μ― κ°μ§ κΈ°λ³Έ μμ($e$, $i$, $\pi$, $1$, $0$)λ₯Ό νλμ μμΌλ‘ μ°κ²°ν©λλ€.
μ¦λͺ (ν μΌλ¬ κΈμ μ΄μ©):
$$ e^{i\theta} = \sum_{n=0}^{\infty} \frac{(i\theta)^n}{n!} = \underbrace{\left(1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots\right)}_{\cos\theta} + i\underbrace{\left(\theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \cdots\right)}_{\sin\theta} $$
import numpy as np
import matplotlib.pyplot as plt
# μ€μΌλ¬ 곡μ μκ°ν: e^{i*theta}λ λ¨μμ μμ μ
theta = np.linspace(0, 2*np.pi, 300)
z = np.exp(1j * theta)
fig, axes = plt.subplots(1, 2, figsize=(14, 6))
# (a) λ¨μμ μμ e^{i*theta}
ax = axes[0]
ax.plot(z.real, z.imag, 'b-', linewidth=2)
# νΉλ³ν κ°λ νμ
special_angles = [0, np.pi/6, np.pi/4, np.pi/3, np.pi/2, np.pi,
3*np.pi/2]
labels = [r'$1$', r'$e^{i\pi/6}$', r'$e^{i\pi/4}$', r'$e^{i\pi/3}$',
r'$e^{i\pi/2}=i$', r'$e^{i\pi}=-1$', r'$e^{i3\pi/2}=-i$']
for angle, label in zip(special_angles, labels):
w = np.exp(1j * angle)
ax.plot(w.real, w.imag, 'ro', markersize=8, zorder=5)
offset = (15 * np.cos(angle), 15 * np.sin(angle))
ax.annotate(label, (w.real, w.imag), textcoords="offset points",
xytext=offset, fontsize=10, ha='center')
ax.axhline(y=0, color='k', linewidth=0.5)
ax.axvline(x=0, color='k', linewidth=0.5)
ax.set_xlim(-1.6, 1.6)
ax.set_ylim(-1.6, 1.6)
ax.set_aspect('equal')
ax.set_title(r'$e^{i\theta}$: λ¨μμ μμ 볡μμ', fontsize=14)
ax.set_xlabel('Re', fontsize=12)
ax.set_ylabel('Im', fontsize=12)
ax.grid(True, alpha=0.3)
# (b) μ€μΌλ¬ 곡μμ ν
μΌλ¬ κΈμ μλ ΄
ax2 = axes[1]
theta_val = np.pi / 3 # 60λ
n_terms_list = range(1, 12)
partial_real = []
partial_imag = []
cumsum = 0 + 0j
for n in range(20):
cumsum += (1j * theta_val)**n / np.math.factorial(n)
if n + 1 <= 11:
partial_real.append(cumsum.real)
partial_imag.append(cumsum.imag)
exact = np.exp(1j * theta_val)
ax2.axhline(y=exact.real, color='blue', linestyle='--', alpha=0.5,
label=f'cos(pi/3) = {exact.real:.4f}')
ax2.axhline(y=exact.imag, color='red', linestyle='--', alpha=0.5,
label=f'sin(pi/3) = {exact.imag:.4f}')
ax2.plot(range(1, 12), partial_real, 'bo-', label='λΆλΆν© μ€μλΆ')
ax2.plot(range(1, 12), partial_imag, 'rs-', label='λΆλΆν© νμλΆ')
ax2.set_xlabel('νμ μ', fontsize=12)
ax2.set_ylabel('κ°', fontsize=12)
ax2.set_title(r'$e^{i\pi/3}$ ν
μΌλ¬ κΈμμ μλ ΄', fontsize=14)
ax2.legend(fontsize=10)
ax2.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('euler_formula.png', dpi=150, bbox_inches='tight')
plt.show()
2.3 μ§μ νμκ³Ό κ³±μ /λλμ ¶
μ§μ νμμ κ³±μ κ³Ό λλμ μ κ·Ήλλ‘ κ°λ¨νκ² λ§λλλ€.
$z_1 = r_1 e^{i\theta_1}$, $z_2 = r_2 e^{i\theta_2}$ μΌ λ:
κ³±μ : μ λκ°μ κ³±νκ³ , νΈκ°μ λνλ€
$$ z_1 \cdot z_2 = r_1 r_2 \, e^{i(\theta_1 + \theta_2)} $$
λλμ : μ λκ°μ λλκ³ , νΈκ°μ λΊλ€
$$ \frac{z_1}{z_2} = \frac{r_1}{r_2} \, e^{i(\theta_1 - \theta_2)} $$
κ±°λμ κ³±: μ λκ°μ κ±°λμ κ³±, νΈκ°μ λ°°μ
$$ z^n = r^n e^{in\theta} $$
import numpy as np
# κ·Ήμ’ν/μ§μ νμ λ³ν
z = 1 + 1j * np.sqrt(3) # = 2 * e^{i*pi/3}
r = abs(z)
theta = np.angle(z) # λΌλμ
print(f"z = {z}")
print(f"|z| = {r:.4f}")
print(f"arg(z) = {theta:.4f} rad = {np.degrees(theta):.1f}Β°")
print(f"μ§μ νμ: {r:.4f} * exp(i * {theta:.4f})")
# κ³±μ
μμ
z1 = 2 * np.exp(1j * np.pi/4) # r=2, theta=45Β°
z2 = 3 * np.exp(1j * np.pi/6) # r=3, theta=30Β°
z_product = z1 * z2
print(f"\n=== κ³±μ
===")
print(f"z1 = 2*exp(i*pi/4), z2 = 3*exp(i*pi/6)")
print(f"z1*z2 = {z_product:.4f}")
print(f"|z1*z2| = {abs(z_product):.4f} (= 2*3 = 6)")
print(f"arg(z1*z2) = {np.degrees(np.angle(z_product)):.1f}Β° (= 45+30 = 75Β°)")
3. λλͺ¨μλΈλ₯΄ μ 리μ κ±°λμ κ³±κ·Ό¶
3.1 λλͺ¨μλΈλ₯΄ μ 리 (De Moivre's Theorem)¶
μ€μΌλ¬ 곡μμμ μ§μ μ λλλ μ€μν μ 리μ λλ€:
$$ (\cos\theta + i\sin\theta)^n = \cos(n\theta) + i\sin(n\theta) $$
μ΄ μ 리λ λ€μκ³Ό κ°μ κ°λ ₯ν μμ©μ κ°μ§λλ€: - λ€μ€κ° 곡μ(multiple angle formulas) μ λ - μΌκ°ν¨μ νλ±μ μ¦λͺ - κ±°λμ κ³±κ·Ό κ³μ°
μμ: $\cos(3\theta)$λ₯Ό $\cos\theta$λ‘ νν
λλͺ¨μλΈλ₯΄ μ 리μμ $n = 3$:
$$ \cos(3\theta) + i\sin(3\theta) = (\cos\theta + i\sin\theta)^3 $$
μ°λ³μ μ΄νμ λ¦¬λ‘ μ κ°νκ³ μ€μλΆλ₯Ό λΉκ΅νλ©΄:
$$ \cos(3\theta) = \cos^3\theta - 3\cos\theta\sin^2\theta = 4\cos^3\theta - 3\cos\theta $$
import sympy as sp
# SymPyλ‘ λλͺ¨μλΈλ₯΄ μ 리λ₯Ό μ΄μ©ν λ€μ€κ° 곡μ μ λ
theta = sp.Symbol('theta', real=True)
# (cos(theta) + i*sin(theta))^n μ μ κ°νμ¬ cos(n*theta), sin(n*theta) μ λ
for n in [2, 3, 4]:
expr = sp.expand((sp.cos(theta) + sp.I * sp.sin(theta))**n)
real_part = sp.re(expr)
imag_part = sp.im(expr)
# sin^2 = 1 - cos^2 μΌλ‘ μΉννμ¬ cosλ§μΌλ‘ νν
real_simplified = sp.simplify(
real_part.rewrite(sp.cos).expand(trig=True)
)
imag_simplified = sp.simplify(
imag_part.rewrite(sp.sin).expand(trig=True)
)
print(f"=== n = {n} ===")
print(f" cos({n}*theta) = {sp.trigsimp(real_part)}")
print(f" sin({n}*theta) = {sp.trigsimp(imag_part)}")
print()
# μμΉ κ²μ¦
import numpy as np
t = np.pi / 7
for n in [2, 3, 4]:
lhs = np.cos(n * t)
rhs = (np.exp(1j * t)**n).real
print(f"cos({n}*pi/7): μ§μ κ³μ°={lhs:.10f}, λλͺ¨μλΈλ₯΄={rhs:.10f}, μ°¨μ΄={abs(lhs-rhs):.2e}")
3.2 nμ κ³±κ·Ό¶
볡μμ $w$μ $n$μ κ³±κ·Ό, μ¦ $z^n = w$λ₯Ό λ§μ‘±νλ $z$λ₯Ό ꡬν©λλ€.
$w = Re^{i\Phi}$λ‘ λμΌλ©΄ ($R = |w|$, $\Phi = \arg(w)$):
$$ z_k = R^{1/n} \exp\left(i\frac{\Phi + 2\pi k}{n}\right), \quad k = 0, 1, 2, \ldots, n-1 $$
ν΅μ¬: $n$κ°μ μλ‘ λ€λ₯Έ κ·Όμ΄ μ‘΄μ¬νλ©°, μ΄λ€μ λ°μ§λ¦ $R^{1/n}$μΈ μ μμ κ· λ± λ°°μΉλ©λλ€.
import numpy as np
import matplotlib.pyplot as plt
def nth_roots(w, n):
"""볡μμ wμ nμ κ³±κ·Όμ λͺ¨λ ꡬνλ€."""
R = abs(w)
Phi = np.angle(w)
roots = []
for k in range(n):
z_k = R**(1/n) * np.exp(1j * (Phi + 2*np.pi*k) / n)
roots.append(z_k)
return np.array(roots)
# μμ: (1+i)μ μΈμ κ³±κ·Ό
w = 1 + 1j
n = 3
roots = nth_roots(w, n)
print(f"w = {w} μ {n}μ κ³±κ·Ό:")
for k, root in enumerate(roots):
print(f" z_{k} = {root:.6f}")
print(f" = {abs(root):.4f} * exp(i * {np.degrees(np.angle(root)):.2f}Β°)")
# κ²μ¦
print(f" κ²μ¦: z_{k}^{n} = {root**n:.6f}")
print()
# μκ°ν
fig, axes = plt.subplots(1, 3, figsize=(18, 6))
test_cases = [
(8+0j, 3, r'$\sqrt[3]{8}$'),
(1+1j, 4, r'$\sqrt[4]{1+i}$'),
(-1+0j, 5, r'$\sqrt[5]{-1}$'),
]
for ax, (w, n, title) in zip(axes, test_cases):
roots = nth_roots(w, n)
R = abs(w)**(1/n)
# μ 그리기
circle_theta = np.linspace(0, 2*np.pi, 200)
ax.plot(R*np.cos(circle_theta), R*np.sin(circle_theta),
'b--', alpha=0.3, linewidth=1)
# κ·Ό νμ
for k, z_k in enumerate(roots):
ax.plot(z_k.real, z_k.imag, 'ro', markersize=10, zorder=5)
ax.annotate(f'$z_{k}$', (z_k.real, z_k.imag),
textcoords="offset points", xytext=(8, 8), fontsize=11)
# μ λ€κ°ν μ°κ²°μ
polygon = np.append(roots, roots[0])
ax.plot(polygon.real, polygon.imag, 'r-', alpha=0.4, linewidth=1)
ax.axhline(y=0, color='k', linewidth=0.5)
ax.axvline(x=0, color='k', linewidth=0.5)
ax.set_aspect('equal')
ax.set_title(title, fontsize=14)
ax.grid(True, alpha=0.3)
plt.suptitle('볡μμμ nμ κ³±κ·Ό: μ μμ κ· λ± λ°°μΉ', fontsize=16, y=1.02)
plt.tight_layout()
plt.savefig('nth_roots.png', dpi=150, bbox_inches='tight')
plt.show()
3.3 1μ nμ κ³±κ·Ό (Roots of Unity)¶
$w = 1$μΈ νΉμν κ²½μ°: $z^n = 1$μ κ·Όμ 1μ nμ κ³±κ·Ό(n-th roots of unity)μ΄λΌ ν©λλ€.
$$ \omega_k = e^{2\pi i k / n}, \quad k = 0, 1, \ldots, n-1 $$
μμ nμ κ³±κ·Ό(primitive root): $\omega = e^{2\pi i / n}$μΌλ‘ λμΌλ©΄
$$ \omega_k = \omega^k, \quad k = 0, 1, \ldots, n-1 $$
ν΅μ¬ μ±μ§:
- $\omega^n = 1$
- $1 + \omega + \omega^2 + \cdots + \omega^{n-1} = 0$ (κ·Όμ ν©μ 0)
- $\omega_j \cdot \omega_k = \omega_{(j+k) \bmod n}$ (ꡰ ꡬ쑰)
μμ©: 1μ nμ κ³±κ·Όμ μ΄μ° νΈλ¦¬μ λ³ν(DFT)μ ν΅μ¬μ΄λ©°, μ νΈ μ²λ¦¬μμ νμμ μ λλ€.
import numpy as np
# 1μ nμ κ³±κ·Όμ μ±μ§ κ²μ¦
for n in [3, 4, 6, 8]:
omega = np.exp(2j * np.pi / n)
roots = np.array([omega**k for k in range(n)])
print(f"=== 1μ {n}μ κ³±κ·Ό ===")
print(f" μμκ·Ό omega = exp(2*pi*i/{n}) = {omega:.6f}")
print(f" omega^{n} = {omega**n:.6f} (= 1 κ²μ¦)")
print(f" κ·Όμ ν© = {roots.sum():.6f} (= 0 κ²μ¦)")
print(f" κ·Όμ κ³± = {np.prod(roots):.6f}")
print()
4. 볡μ ν¨μ¶
4.1 볡μ μ§μν¨μ¶
볡μμ $z = x + iy$μ λν΄ λ³΅μ μ§μν¨μλ:
$$ e^z = e^{x+iy} = e^x(\cos y + i\sin y) $$
μ£Όμ μ±μ§: - $|e^z| = e^x = e^{\text{Re}(z)}$ (μ λκ°μ μ€μλΆμλ§ μμ‘΄) - $\arg(e^z) = y = \text{Im}(z)$ - $e^z$λ μ£ΌκΈ° $2\pi i$: $e^{z + 2\pi i} = e^z$
import numpy as np
import matplotlib.pyplot as plt
# 볡μ μ§μν¨μ μκ°ν: e^zμ μ (image)
fig, axes = plt.subplots(1, 2, figsize=(14, 6))
# (a) μ§μ x = const μ μ: μμ μ€μ¬ μ
ax = axes[0]
y = np.linspace(0, 2*np.pi, 200)
for x_val in [-1, -0.5, 0, 0.5, 1]:
w = np.exp(x_val + 1j*y)
ax.plot(w.real, w.imag, label=f'x={x_val}')
ax.set_aspect('equal')
ax.set_title(r'$e^{x+iy}$: μμ§μ $x=\mathrm{const}$ μ μ', fontsize=13)
ax.set_xlabel('Re', fontsize=12)
ax.set_ylabel('Im', fontsize=12)
ax.legend(fontsize=10)
ax.grid(True, alpha=0.3)
# (b) μ§μ y = const μ μ: μμ μμ λ»μ΄λκ°λ λ°μ§μ
ax2 = axes[1]
x = np.linspace(-2, 2, 200)
for y_val in np.linspace(0, 2*np.pi, 9)[:-1]:
w = np.exp(x + 1j*y_val)
ax2.plot(w.real, w.imag, label=f'y={y_val:.2f}')
ax2.set_xlim(-8, 8)
ax2.set_ylim(-8, 8)
ax2.set_aspect('equal')
ax2.set_title(r'$e^{x+iy}$: μνμ $y=\mathrm{const}$ μ μ', fontsize=13)
ax2.set_xlabel('Re', fontsize=12)
ax2.set_ylabel('Im', fontsize=12)
ax2.legend(fontsize=9, ncol=2)
ax2.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('complex_exp.png', dpi=150, bbox_inches='tight')
plt.show()
4.2 볡μ μΌκ°ν¨μμ μ곑ν¨μ¶
μ€μΌλ¬ 곡μμ μ΄μ©νλ©΄ μΌκ°ν¨μμ μ곑ν¨μλ₯Ό μ§μν¨μλ‘ μ μν μ μμ΅λλ€.
볡μ μΌκ°ν¨μ:
$$ \cos z = \frac{e^{iz} + e^{-iz}}{2}, \quad \sin z = \frac{e^{iz} - e^{-iz}}{2i} $$
볡μ μ곑ν¨μ (hyperbolic functions):
$$ \cosh z = \frac{e^z + e^{-z}}{2}, \quad \sinh z = \frac{e^z - e^{-z}}{2} $$
μΌκ°ν¨μμ μ곑ν¨μμ κ΄κ³:
$$ \cos(iz) = \cosh z, \quad \sin(iz) = i\sinh z $$
$$ \cosh(iz) = \cos z, \quad \sinh(iz) = i\sin z $$
μ€μ: μ€μμμλ $|\sin x| \leq 1$, $|\cos x| \leq 1$μ΄μ§λ§, 볡μμμμλ μ΄ μ νμ΄ μ¬λΌμ§λλ€. μλ₯Ό λ€μ΄ $\cos(i) = \cosh(1) \approx 1.543$μ λλ€.
import numpy as np
# 볡μ μΌκ°ν¨μ/μ곑ν¨μμ κ΄κ³ κ²μ¦
z_values = [1+1j, 2-0.5j, 0+2j, np.pi/4+0j]
print("=== 볡μ μΌκ°ν¨μ ===")
for z in z_values:
# cos(z)λ₯Ό μ§μ μ μλ‘ μ§μ κ³μ°
cos_euler = (np.exp(1j*z) + np.exp(-1j*z)) / 2
cos_numpy = np.cos(z)
print(f"z = {z:.4f}")
print(f" cos(z) [μ€μΌλ¬] = {cos_euler:.6f}")
print(f" cos(z) [NumPy] = {cos_numpy:.6f}")
print(f" μ°¨μ΄ = {abs(cos_euler - cos_numpy):.2e}")
print()
# cos(iz) = cosh(z) κ²μ¦
z = 1.5 + 0.7j
print("=== κ΄κ³μ κ²μ¦ ===")
print(f"cos(iz) = {np.cos(1j*z):.8f}")
print(f"cosh(z) = {np.cosh(z):.8f}")
print(f"sin(iz) = {np.sin(1j*z):.8f}")
print(f"i*sinh(z) = {1j*np.sinh(z):.8f}")
4.3 볡μ λ‘κ·Έν¨μ¶
볡μμ $z = re^{i\theta}$μ λ‘κ·Έ:
$$ \ln z = \ln r + i\theta = \ln|z| + i\arg(z) $$
λ€κ°ν¨μ (multi-valued function): νΈκ° $\theta$λ $2\pi$μ μ μλ°°λ§νΌ μμ λκ° μμΌλ―λ‘:
$$ \text{Ln}(z) = \ln|z| + i(\theta + 2n\pi), \quad n \in \mathbb{Z} $$
- μ£Όκ°(principal value): $-\pi < \theta \leq \pi$λ‘ μ νν κ°μ $\text{Log}(z)$λ‘ νκΈ°ν©λλ€.
- λΆμ§(branch): λ€κ°ν¨μλ₯Ό λ¨κ°ν¨μλ‘ λ§λ€κΈ° μν΄ νΈκ°μ λ²μλ₯Ό μ ννλ κ²
- λΆμ§μ (branch point): $z = 0$ (λ‘κ·Έκ° μ μλμ§ μλ μ )
- λΆμ§ μ λ¨(branch cut): ν΅μμ μΌλ‘ μμ μ€μμΆ
import numpy as np
# 볡μ λ‘κ·Έμ λ€κ°μ±
z = -1 + 0j
print("=== ln(-1)μ λ€κ°μ± ===")
print(f"μ£Όκ°: Log(-1) = {np.log(-1+0j)}") # i*pi
for n in range(-2, 3):
val = np.log(abs(z)) + 1j * (np.pi + 2*np.pi*n)
# κ²μ¦: e^val = z?
check = np.exp(val)
print(f" n={n:+d}: ln(-1) = {val:.6f}, exp(ln(-1)) = {check:.6f}")
# 볡μ λ‘κ·Έμ μ±μ§ κ²μ¦
z1 = 2 + 3j
z2 = 1 - 1j
print(f"\n=== λ‘κ·Έ μ±μ§ (μ£Όκ° κΈ°μ€) ===")
print(f"Log(z1*z2) = {np.log(z1*z2):.6f}")
print(f"Log(z1) + Log(z2) = {np.log(z1) + np.log(z2):.6f}")
print("μ£Όμ: μ£Όκ°μμλ Log(z1*z2) != Log(z1) + Log(z2)μΌ μ μμ")
print(f"μ°¨μ΄ = {abs(np.log(z1*z2) - np.log(z1) - np.log(z2)):.6e}")
5. 물리νμμμ μμ©¶
5.1 κ΅λ₯ νλ‘ (μνΌλμ€)¶
κ΅λ₯(AC) νλ‘ ν΄μμμ 볡μμλ νμμ μ λλ€. μ μ/μ λ₯λ₯Ό 볡μ μ§μλ‘ νννλ©΄ λ―ΈλΆλ°©μ μμ΄ λμ λ°©μ μμΌλ‘ λ³νλ©λλ€.
볡μ μνΌλμ€(impedance) $Z$:
| μμ | μνΌλμ€ | μμ |
|---|---|---|
| μ ν $R$ | $Z_R = R$ | $0$ |
| μΈλν° $L$ | $Z_L = i\omega L$ | $+90Β°$ |
| 컀ν¨μν° $C$ | $Z_C = \frac{1}{i\omega C} = -\frac{i}{\omega C}$ | $-90Β°$ |
RLC μ§λ ¬ νλ‘μ μ΄ μνΌλμ€:
$$ Z = R + i\left(\omega L - \frac{1}{\omega C}\right) $$
- $|Z|$: μνΌλμ€μ ν¬κΈ° (μ μ μ§ν / μ λ₯ μ§ν)
- $\arg(Z)$: μ μκ³Ό μ λ₯ μ¬μ΄μ μμμ°¨
- κ³΅μ§ (resonance): $\omega L = 1/(\omega C)$μΌ λ, $Z = R$ (μμ μ ν)
$$ \omega_0 = \frac{1}{\sqrt{LC}} \quad \text{(κ³΅μ§ μ£Όνμ)} $$
import numpy as np
import matplotlib.pyplot as plt
# RLC μ§λ ¬ νλ‘μ μνΌλμ€ λΆμ
R = 100 # Ohm
L = 0.1 # Henry
C = 1e-6 # Farad
omega_0 = 1 / np.sqrt(L * C) # κ³΅μ§ κ°μ£Όνμ
f_0 = omega_0 / (2 * np.pi) # κ³΅μ§ μ£Όνμ
print(f"κ³΅μ§ μ£Όνμ: f_0 = {f_0:.1f} Hz")
print(f"κ³΅μ§ κ°μ£Όνμ: omega_0 = {omega_0:.1f} rad/s")
# μ£Όνμ λ²μ
omega = np.linspace(100, 20000, 2000)
Z = R + 1j * (omega * L - 1/(omega * C))
fig, axes = plt.subplots(2, 2, figsize=(14, 10))
# (a) |Z| vs omega
ax = axes[0, 0]
ax.semilogy(omega, np.abs(Z), 'b-', linewidth=2)
ax.axvline(x=omega_0, color='r', linestyle='--', alpha=0.7,
label=f'$\\omega_0$ = {omega_0:.0f} rad/s')
ax.set_xlabel(r'$\omega$ (rad/s)', fontsize=12)
ax.set_ylabel(r'$|Z|$ ($\Omega$)', fontsize=12)
ax.set_title('μνΌλμ€ ν¬κΈ°', fontsize=13)
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
# (b) arg(Z) vs omega
ax = axes[0, 1]
ax.plot(omega, np.degrees(np.angle(Z)), 'g-', linewidth=2)
ax.axvline(x=omega_0, color='r', linestyle='--', alpha=0.7)
ax.axhline(y=0, color='k', linestyle='-', alpha=0.3)
ax.set_xlabel(r'$\omega$ (rad/s)', fontsize=12)
ax.set_ylabel(r'$\arg(Z)$ (degrees)', fontsize=12)
ax.set_title('μμκ°', fontsize=13)
ax.grid(True, alpha=0.3)
# (c) μ λ₯ μλ΅ (V_0 = 1V)
V0 = 1.0 # μ μ μ§ν
I = V0 / Z
ax = axes[1, 0]
ax.plot(omega, np.abs(I) * 1000, 'm-', linewidth=2)
ax.axvline(x=omega_0, color='r', linestyle='--', alpha=0.7,
label=f'곡μ§: I_max = {1000*V0/R:.1f} mA')
ax.set_xlabel(r'$\omega$ (rad/s)', fontsize=12)
ax.set_ylabel(r'$|I|$ (mA)', fontsize=12)
ax.set_title('μ λ₯ μλ΅ (κ³΅μ§ κ³‘μ )', fontsize=13)
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
# (d) μνΌλμ€μ 볡μ νλ©΄ κΆ€μ
ax = axes[1, 1]
ax.plot(Z.real, Z.imag, 'b-', linewidth=2)
ax.plot(R, 0, 'ro', markersize=10, zorder=5, label=f'곡μ§μ ($\\omega_0$)')
ax.set_xlabel(r'Re$(Z)$ ($\Omega$)', fontsize=12)
ax.set_ylabel(r'Im$(Z)$ ($\Omega$)', fontsize=12)
ax.set_title('μνΌλμ€ κΆ€μ (Nyquist plot)', fontsize=13)
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
ax.set_aspect('equal')
plt.suptitle(f'RLC μ§λ ¬ νλ‘ (R={R}Ξ©, L={L*1000}mH, C={C*1e6}ΞΌF)',
fontsize=15, y=1.01)
plt.tight_layout()
plt.savefig('rlc_circuit.png', dpi=150, bbox_inches='tight')
plt.show()
5.2 νλμ 볡μ νν¶
μΌμ°¨μ μ§νν(traveling wave)λ 볡μμλ‘ κ°κ²°νκ² ννλ©λλ€:
$$ \psi(x, t) = A e^{i(kx - \omega t)} $$
μ¬κΈ°μ: - $A$: 볡μ μ§ν (ν¬κΈ°μ μ΄κΈ° μμμ ν¬ν¨) - $k$: νμ (wave number), $k = 2\pi/\lambda$ - $\omega$: κ°μ§λμ, $\omega = 2\pi f$
μ€μ 물리λμ μ€μλΆμ λλ€:
$$ \text{Re}[\psi] = |A| \cos(kx - \omega t + \phi) $$
μ¬κΈ°μ $\phi = \arg(A)$.
볡μ ννμ μ₯μ : 1. λ―ΈλΆμ΄ κ°λ¨: $\frac{\partial \psi}{\partial t} = -i\omega\psi$ 2. μ€μ²©(superposition)κ³Ό κ°μ(interference) κ³μ°μ΄ μ©μ΄ 3. μμ κ΄κ³κ° λͺ ν
import numpy as np
import matplotlib.pyplot as plt
# λ νλμ μ€μ²© (κ°μ)
x = np.linspace(0, 10, 500)
t = 0
# νλ 1: A1 = 1, k1 = 2, omega1 = 3
A1, k1, omega1 = 1.0, 2.0, 3.0
psi1 = A1 * np.exp(1j * (k1*x - omega1*t))
# νλ 2: A2 = 0.8, k2 = 2.2, omega2 = 3.1 (μ½κ° λ€λ₯Έ νμ/μ§λμ)
A2, k2, omega2 = 0.8, 2.2, 3.1
psi2 = A2 * np.exp(1j * (k2*x - omega2*t))
# μ€μ²©
psi_total = psi1 + psi2
fig, axes = plt.subplots(3, 1, figsize=(12, 8), sharex=True)
axes[0].plot(x, psi1.real, 'b-', linewidth=1.5, label='νλ 1')
axes[0].plot(x, np.abs(psi1)*np.ones_like(x), 'b--', alpha=0.3)
axes[0].set_ylabel('Re(Οβ)', fontsize=12)
axes[0].legend(fontsize=11)
axes[0].grid(True, alpha=0.3)
axes[1].plot(x, psi2.real, 'r-', linewidth=1.5, label='νλ 2')
axes[1].plot(x, np.abs(psi2)*np.ones_like(x), 'r--', alpha=0.3)
axes[1].set_ylabel('Re(Οβ)', fontsize=12)
axes[1].legend(fontsize=11)
axes[1].grid(True, alpha=0.3)
axes[2].plot(x, psi_total.real, 'purple', linewidth=1.5, label='μ€μ²© (Οβ + Οβ)')
axes[2].plot(x, np.abs(psi_total), 'k--', alpha=0.5, label='ν¬λ½μ |Ο|')
axes[2].plot(x, -np.abs(psi_total), 'k--', alpha=0.5)
axes[2].set_ylabel('Re(Οβ + Οβ)', fontsize=12)
axes[2].set_xlabel('x', fontsize=12)
axes[2].legend(fontsize=11)
axes[2].grid(True, alpha=0.3)
plt.suptitle('νλμ 볡μ ννκ³Ό λ§₯λμ΄(Beat) νμ', fontsize=14)
plt.tight_layout()
plt.savefig('wave_superposition.png', dpi=150, bbox_inches='tight')
plt.show()
5.3 μμμνμ νλν¨μ¶
μμμνμμ μ μμ μνλ 볡μ νλν¨μ $\Psi(x, t)$λ‘ κΈ°μ λ©λλ€.
μμ μ μμ νλν¨μ:
$$ \Psi(x, t) = A \exp\left[i\left(kx - \frac{\hbar k^2}{2m}t\right)\right] $$
νλ₯ λ°λ: $|\Psi(x,t)|^2 = \Psi^* \Psi$ (κ΄μΈ‘ κ°λ₯ν 물리λμ νμ μ€μ)
μλ’°λ©κ±° λ°©μ μ:
$$ i\hbar \frac{\partial \Psi}{\partial t} = -\frac{\hbar^2}{2m}\frac{\partial^2 \Psi}{\partial x^2} + V(x)\Psi $$
λ³Έμ§μ 볡μμ±: μλ’°λ©κ±° λ°©μ μμλ $i$κ° λͺ μμ μΌλ‘ λνλ©λλ€. μμμνμμ 볡μμλ λ¨μν νΈμκ° μλλΌ λ¬Όλ¦¬μ λ³Έμ§μ λλ€.
import numpy as np
import matplotlib.pyplot as plt
# κ°μ°μμ νλ ν¨ν·μ μκ° μ§ν
hbar = 1.0 # μμ° λ¨μκ³
m = 1.0
sigma_0 = 1.0 # μ΄κΈ° νλ ν¨ν· ν
k_0 = 5.0 # νκ· νμ (μ΄λλ)
x = np.linspace(-10, 20, 1000)
def gaussian_wavepacket(x, t, sigma_0, k_0, m, hbar):
"""κ°μ°μμ νλ ν¨ν·μ ν΄μμ ν΄."""
sigma_t = sigma_0 * np.sqrt(1 + (hbar*t/(2*m*sigma_0**2))**2)
phase_factor = hbar * t / (2 * m * sigma_0**2)
psi = (2*np.pi*sigma_0**2)**(-0.25) * (sigma_0 / sigma_t) * np.exp(
-(x - hbar*k_0*t/m)**2 / (4*sigma_0*sigma_t) *
(sigma_0/sigma_t) *
np.exp(-1j * np.arctan(phase_factor)/2)
) * np.exp(1j * (k_0*x - hbar*k_0**2*t/(2*m)))
# μ κ·ν
norm = np.sqrt(np.trapz(np.abs(psi)**2, x))
return psi / norm if norm > 0 else psi
fig, axes = plt.subplots(2, 1, figsize=(12, 8), sharex=True)
times = [0, 1, 2, 3, 4]
colors = plt.cm.viridis(np.linspace(0, 0.9, len(times)))
for t, color in zip(times, colors):
psi = gaussian_wavepacket(x, t, sigma_0, k_0, m, hbar)
prob = np.abs(psi)**2
axes[0].plot(x, psi.real, color=color, linewidth=1.5,
label=f't = {t}', alpha=0.8)
axes[1].plot(x, prob, color=color, linewidth=1.5,
label=f't = {t}', alpha=0.8)
axes[0].set_ylabel(r'Re($\Psi$)', fontsize=13)
axes[0].set_title('κ°μ°μμ νλ ν¨ν·μ μκ° μ§ν', fontsize=14)
axes[0].legend(fontsize=10)
axes[0].grid(True, alpha=0.3)
axes[1].set_xlabel('x', fontsize=13)
axes[1].set_ylabel(r'$|\Psi|^2$', fontsize=13)
axes[1].set_title('νλ₯ λ°λ (νλ ν¨ν· νΌμ§)', fontsize=14)
axes[1].legend(fontsize=10)
axes[1].grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('wavepacket.png', dpi=150, bbox_inches='tight')
plt.show()
5.4 μΌκ°ν¨μ νλ±μμ μ λ¶
μ€μΌλ¬ 곡μμ μ΄μ©νλ©΄ 볡μ‘ν μΌκ°ν¨μ νλ±μμ 체κ³μ μΌλ‘ μ λν μ μμ΅λλ€.
λ°©λ²: $e^{i\theta} = \cos\theta + i\sin\theta$λ₯Ό μ΄μ©νμ¬ μ§μλ²μΉμΌλ‘ μ κ°ν λ€, μ€μλΆμ νμλΆλ₯Ό λΉκ΅ν©λλ€.
μμ 1: λ§μ μ 리
$$ e^{i(\alpha + \beta)} = e^{i\alpha} \cdot e^{i\beta} $$
μ’λ³: $\cos(\alpha+\beta) + i\sin(\alpha+\beta)$
μ°λ³: $(\cos\alpha + i\sin\alpha)(\cos\beta + i\sin\beta)$
μ€μλΆ λΉκ΅: $\cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta$
νμλΆ λΉκ΅: $\sin(\alpha+\beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta$
μμ 2: $\cos^n\theta$λ₯Ό λ€μ€κ°μ μ½μ¬μΈμΌλ‘ νν
$$ \cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2} $$
μ΄λ―λ‘:
$$ \cos^n\theta = \frac{1}{2^n}(e^{i\theta} + e^{-i\theta})^n $$
μ΄νμ λ¦¬λ‘ μ κ°νλ©΄ λ€μ€κ° 곡μμ μ»μ΅λλ€.
import sympy as sp
theta, alpha, beta = sp.symbols('theta alpha beta', real=True)
# μ€μΌλ¬ 곡μμ μ΄μ©ν μΌκ°ν¨μ νλ±μ μ λ
print("=== λ§μ
μ 리 μ λ ===")
lhs = sp.exp(sp.I * (alpha + beta))
rhs = sp.exp(sp.I * alpha) * sp.exp(sp.I * beta)
# rhsλ₯Ό μ κ°
rhs_expanded = sp.expand(rhs, complex=True)
rhs_trig = sp.expand((sp.cos(alpha) + sp.I*sp.sin(alpha)) *
(sp.cos(beta) + sp.I*sp.sin(beta)))
print(f"μ€μλΆ: cos(a+b) = {sp.re(rhs_trig)}")
print(f"νμλΆ: sin(a+b) = {sp.im(rhs_trig)}")
# cos^n(theta)λ₯Ό λ€μ€κ°μΌλ‘ νν
print("\n=== cos^n(theta) μ κ° ===")
for n in [2, 3, 4]:
# cos(theta) = (e^{it} + e^{-it}) / 2
t = sp.Symbol('t')
expr = ((sp.exp(sp.I*t) + sp.exp(-sp.I*t)) / 2)**n
expanded = sp.expand(expr)
# e^{ikt} + e^{-ikt} = 2*cos(kt) μ΄μ©
result = sp.simplify(sp.trigsimp(expanded.rewrite(sp.cos)))
print(f" cos^{n}(theta) = {result.subs(t, theta)}")
# μμΉ κ²μ¦
import numpy as np
theta_val = np.pi / 5
print(f"\n=== μμΉ κ²μ¦ (theta = pi/5) ===")
print(f"cos^3(theta) = {np.cos(theta_val)**3:.8f}")
print(f"(3*cos(theta) + cos(3*theta))/4 = "
f"{(3*np.cos(theta_val) + np.cos(3*theta_val))/4:.8f}")
6. 볡μμμ 2D λ³ν¶
6.1 νμ κ³Ό μ€μΌμΌλ§¶
볡μμμ κ³±μ μ κΈ°ννμ μΌλ‘ νμ (rotation)κ³Ό μ€μΌμΌλ§(scaling)μ λμν©λλ€.
$w = e^{i\phi}$λ₯Ό κ³±νλ©΄ κ°λ $\phi$λ§νΌ λ°μκ³ λ°©ν₯ νμ :
$$ z' = e^{i\phi} z $$
μΌλ°μ μΌλ‘ $w = re^{i\phi}$λ₯Ό κ³±νλ©΄: - $r$λ°° μ€μΌμΌλ§ - $\phi$λ§νΌ νμ
λ±κ°μ¬μ(conformal mapping): 볡μ ν΄μν¨μμ μν λ³νμ κ°λλ₯Ό 보쑴ν©λλ€. μ΄ μ±μ§μ΄ μ 체μν, μ μκΈ°νμμ ν΅μ¬μ μ λλ€.
import numpy as np
import matplotlib.pyplot as plt
# 볡μμ κ³±μ
μ μν νμ κ³Ό μ€μΌμΌλ§
fig, axes = plt.subplots(1, 3, figsize=(18, 6))
# μλ λν: μΌκ°ν
triangle = np.array([1+0j, 0+1j, -0.5-0.5j, 1+0j])
# (a) μμ νμ : e^{i*pi/4} κ³±
angle = np.pi / 4
w_rotate = np.exp(1j * angle)
ax = axes[0]
ax.plot(triangle.real, triangle.imag, 'b-o', linewidth=2,
markersize=8, label='μλ³Έ')
rotated = w_rotate * triangle
ax.plot(rotated.real, rotated.imag, 'r-o', linewidth=2,
markersize=8, label=f'νμ ({np.degrees(angle):.0f}Β°)')
ax.set_title(r'νμ : $z \mapsto e^{i\pi/4} z$', fontsize=13)
ax.set_aspect('equal')
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
ax.set_xlim(-2, 2)
ax.set_ylim(-1.5, 2)
# (b) μ€μΌμΌλ§ + νμ : (1+i)*z = sqrt(2)*e^{i*pi/4}*z
w_scale_rotate = 1 + 1j
ax = axes[1]
ax.plot(triangle.real, triangle.imag, 'b-o', linewidth=2,
markersize=8, label='μλ³Έ')
transformed = w_scale_rotate * triangle
ax.plot(transformed.real, transformed.imag, 'r-o', linewidth=2,
markersize=8, label=r'$(1+i) \cdot z$')
ax.set_title(r'μ€μΌμΌλ§+νμ : $z \mapsto (1+i)z$', fontsize=13)
ax.set_aspect('equal')
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
ax.set_xlim(-3, 3)
ax.set_ylim(-2, 3)
# (c) z^2 λ³ν (λΉμ ν, λ±κ°)
theta = np.linspace(0, 2*np.pi, 200)
r_vals = [0.5, 0.75, 1.0]
ax = axes[2]
for r in r_vals:
z_circle = r * np.exp(1j * theta)
w_mapped = z_circle**2
ax.plot(z_circle.real, z_circle.imag, 'b-', alpha=0.5, linewidth=1)
ax.plot(w_mapped.real, w_mapped.imag, 'r-', alpha=0.7, linewidth=1.5)
ax.plot([], [], 'b-', label='μλ³Έ (μ)', linewidth=2)
ax.plot([], [], 'r-', label=r'$z^2$ λ³ν', linewidth=2)
ax.set_title(r'λΉμ ν λ±κ°μ¬μ: $z \mapsto z^2$', fontsize=13)
ax.set_aspect('equal')
ax.legend(fontsize=11)
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('complex_transformations.png', dpi=150, bbox_inches='tight')
plt.show()
6.2 μ£Όμ½νμ€ν€ λ³ν (ν곡μν)¶
μ£Όμ½νμ€ν€ λ³ν(Joukowski/Zhukovsky transform)μ ν곡μνμμ λ κ° λ¨λ©΄(airfoil)μ μ λμ λΆμνλ λ° μ¬μ©λλ λνμ μΈ λ±κ°μ¬μμ λλ€:
$$ w = z + \frac{c^2}{z} $$
- μ( $z$-νλ©΄)μ λ κ°ν λ¨λ©΄($w$-νλ©΄)μΌλ‘ λ³ν
- μμ μ€μ¬μ μ½κ° μ΄λμν€λ©΄ λ€μν λ κ° νμμ μμ±
- μ 체μ μλμ₯κ³Ό μλ ₯ λΆν¬λ₯Ό ν΄μμ μΌλ‘ κ³μ° κ°λ₯
import numpy as np
import matplotlib.pyplot as plt
def joukowski(z, c=1.0):
"""μ£Όμ½νμ€ν€ λ³ν: w = z + c^2/z"""
return z + c**2 / z
fig, axes = plt.subplots(1, 3, figsize=(18, 6))
theta = np.linspace(0, 2*np.pi, 500)
c = 1.0
# λ€μν μμ μ€μ¬ μ΄λμ λ°λ₯Έ λ κ°ν λ³ν
offsets = [
(0.0, 0.0, 'μ (μ€μ¬ μμ )'), # μλ²½ν μ -> μ§μ
(-0.1, 0.1, 'μ½κ° μ΄λν μ'), # λΉλμΉ λ κ°ν
(-0.15, 0.15, 'λ μ΄λν μ'), # λκΊΌμ΄ λ κ°ν
]
for ax, (dx, dy, title) in zip(axes, offsets):
# z-νλ©΄: μ΄λλ μ
R = np.sqrt((c - dx)**2 + dy**2) + 0.02 # cλ₯Ό ν¬ν¨νλ μ
z = (dx + dy*1j) + R * np.exp(1j * theta)
# w-νλ©΄: μ£Όμ½νμ€ν€ λ³ν
w = joukowski(z, c)
# z-νλ©΄κ³Ό w-νλ©΄μ ν¨κ» νμ
ax.plot(z.real, z.imag, 'b-', linewidth=1.5, alpha=0.5,
label=r'$z$-νλ©΄ (μ)')
ax.plot(w.real, w.imag, 'r-', linewidth=2.5,
label=r'$w$-νλ©΄ (λ κ°ν)')
# νΉμ΄μ νμ
ax.plot(c, 0, 'ko', markersize=6)
ax.plot(-c, 0, 'ko', markersize=6)
ax.set_title(title, fontsize=13)
ax.set_aspect('equal')
ax.legend(fontsize=10, loc='upper left')
ax.grid(True, alpha=0.3)
ax.set_xlim(-3.5, 3.5)
ax.set_ylim(-2.5, 2.5)
plt.suptitle(r'μ£Όμ½νμ€ν€ λ³ν: $w = z + c^2/z$ (ν곡μν μμ©)',
fontsize=15, y=1.02)
plt.tight_layout()
plt.savefig('joukowski.png', dpi=150, bbox_inches='tight')
plt.show()
μ λμ₯ μκ°ν (streamlines):
import numpy as np
import matplotlib.pyplot as plt
# μ£Όμ½νμ€ν€ λ κ° μ£Όμμ μ λμ₯
c = 1.0
dx, dy = -0.1, 0.08
R = np.sqrt((c - dx)**2 + dy**2) + 0.01
center = dx + dy*1j
# 볡μ ν¬ν
μ
: μΌμλ₯ + μκΈ°λ₯ μ£Όμ μ λ + μν
U_inf = 1.0 # μμ λ₯ μλ
Gamma = 4 * np.pi * U_inf * R * np.sin(
np.arctan2(dy, c - dx) + np.arcsin(Gamma_approx := 0.1)
) if False else 2.5 # μΏ ν 쑰건μ μν μν
# 격μ μμ± (z-νλ©΄)
x_grid = np.linspace(-3, 4, 400)
y_grid = np.linspace(-3, 3, 400)
X, Y = np.meshgrid(x_grid, y_grid)
z_grid = X + 1j*Y
# μ λ΄λΆ λ§μ€νΉ
mask = np.abs(z_grid - center) < R
# 볡μ μλ (z-νλ©΄μμ)
# w(z) = U*(z - center) + U*R^2/(z - center) + i*Gamma/(2*pi)*log(z - center)
zeta = z_grid - center
F = U_inf * zeta + U_inf * R**2 / zeta - 1j*Gamma/(2*np.pi)*np.log(zeta)
# μ μ = Im(F) = const
psi = F.imag
psi[mask] = np.nan
# w-νλ©΄μΌλ‘ λ³ν
w_grid = joukowski(z_grid, c)
w_grid[mask] = np.nan
fig, axes = plt.subplots(1, 2, figsize=(16, 7))
# z-νλ©΄ μ λ
ax = axes[0]
levels = np.linspace(-4, 4, 40)
ax.contour(X, Y, psi, levels=levels, colors='steelblue', linewidths=0.7)
circle_plot = center + R * np.exp(1j * np.linspace(0, 2*np.pi, 200))
ax.fill(circle_plot.real, circle_plot.imag, color='lightgray', zorder=3)
ax.plot(circle_plot.real, circle_plot.imag, 'k-', linewidth=2, zorder=4)
ax.set_title('z-νλ©΄: μκΈ°λ₯ μ£Όμ μ λ', fontsize=13)
ax.set_aspect('equal')
ax.set_xlim(-3, 4)
ax.set_ylim(-3, 3)
# w-νλ©΄ μ λ (λ κ° μ£Όμ)
ax = axes[1]
# λ κ°ν κ²½κ³
theta_wing = np.linspace(0, 2*np.pi, 500)
z_wing = center + R * np.exp(1j * theta_wing)
w_wing = joukowski(z_wing, c)
ax.contour(w_grid.real, w_grid.imag, psi, levels=levels,
colors='steelblue', linewidths=0.7)
ax.fill(w_wing.real, w_wing.imag, color='lightgray', zorder=3)
ax.plot(w_wing.real, w_wing.imag, 'k-', linewidth=2, zorder=4)
ax.set_title('w-νλ©΄: λ κ°ν μ£Όμ μ λ (μ£Όμ½νμ€ν€ λ³ν)', fontsize=13)
ax.set_aspect('equal')
ax.set_xlim(-3.5, 4.5)
ax.set_ylim(-3, 3)
plt.tight_layout()
plt.savefig('joukowski_flow.png', dpi=150, bbox_inches='tight')
plt.show()
μ°μ΅ λ¬Έμ ¶
λ¬Έμ 1: κ·Ήμ’ν λ³ν¶
λ€μ 볡μμλ₯Ό κ·Ήμ’ν νμ $re^{i\theta}$λ‘ νννμμ€ ($-\pi < \theta \leq \pi$):
(a) $z = -1 + i$ (b) $z = -3 - 3\sqrt{3}\,i$ (c) $z = 5i$
λ¬Έμ 2: λλͺ¨μλΈλ₯΄ μ 리 μμ©¶
λλͺ¨μλΈλ₯΄ μ 리λ₯Ό μ΄μ©νμ¬ $\sin(4\theta)$λ₯Ό $\sin\theta$μ $\cos\theta$λ‘ νννμμ€.
λ¬Έμ 3: κ±°λμ κ³±κ·Ό¶
$z^4 = -16$μ λͺ¨λ κ·Όμ ꡬνμμ€. 볡μ νλ©΄μ λμνκ³ , κ²°κ³Όλ₯Ό $a + bi$ ννλ‘ νννμμ€.
λ¬Έμ 4: 볡μ λ‘κ·Έ¶
λ€μμ κ³μ°νμμ€ (μ£Όκ°):
(a) $\ln(-e)$ (b) $\ln(1 + i)$ (c) $i^i = e^{i \ln i}$
λ¬Έμ 5: κ΅λ₯ νλ‘ λΆμ¶
$R = 50\,\Omega$, $L = 20\,\text{mH}$, $C = 10\,\mu\text{F}$μΈ RLC μ§λ ¬ νλ‘μ $V(t) = 10\cos(\omega t)$ (V)κ° μΈκ°λ λ:
(a) κ³΅μ§ μ£Όνμ $f_0$λ₯Ό ꡬνμμ€. (b) $f = 500\,\text{Hz}$μμμ μνΌλμ€ $Z$μ ν¬κΈ°μ μμμ ꡬνμμ€. (c) κ³΅μ§ μ μ λ₯μ μ΅λκ°μ ꡬνμμ€.
λ¬Έμ 6: λ±κ°μ¬μ¶
μ£Όμ½νμ€ν€ λ³ν $w = z + 1/z$μμ:
(a) $|z| = 2$μΈ μμ΄ $w$-νλ©΄μμ μ΄λ€ 곑μ μΌλ‘ λ³νλλμ§ λ§€κ°λ³μ ννμ ꡬνμμ€. (b) μ΄ κ³‘μ μ΄ νμμμ 보μ΄κ³ , μ₯μΆκ³Ό λ¨μΆμ κΈΈμ΄λ₯Ό ꡬνμμ€.
μ°μ΅ λ¬Έμ νμ΄ (ν΄λ¦νμ¬ νΌμΉκΈ°)
import numpy as np
# === λ¬Έμ 1 νμ΄ ===
print("=== λ¬Έμ 1: κ·Ήμ’ν λ³ν ===\n")
problems_1 = {
'(a) -1 + i': -1 + 1j,
'(b) -3 - 3*sqrt(3)*i': -3 - 3*np.sqrt(3)*1j,
'(c) 5i': 5j,
}
for label, z in problems_1.items():
r = abs(z)
theta = np.angle(z)
print(f"{label}")
print(f" z = {z}")
print(f" r = {r:.6f}, theta = {theta:.6f} rad = {np.degrees(theta):.2f}Β°")
print(f" κ·Ήμ’ν: {r:.4f} * exp(i * {theta:.4f})")
print()
# === λ¬Έμ 3 νμ΄ ===
print("=== λ¬Έμ 3: z^4 = -16 ===\n")
w = -16 + 0j
n = 4
R = abs(w)**(1/n) # 16^(1/4) = 2
Phi = np.angle(w) # pi
for k in range(n):
z_k = R * np.exp(1j * (Phi + 2*np.pi*k) / n)
print(f"z_{k} = {z_k.real:+.6f} {z_k.imag:+.6f}i")
print(f" = {R:.4f} * exp(i * {np.degrees((Phi + 2*np.pi*k)/n):.1f}Β°)")
print(f" κ²μ¦: z^4 = {z_k**4:.6f}")
print()
# === λ¬Έμ 4 νμ΄ ===
print("=== λ¬Έμ 4: 볡μ λ‘κ·Έ ===\n")
# (a) ln(-e)
z_a = -np.e + 0j
print(f"(a) ln(-e) = {np.log(z_a):.6f}")
print(f" = ln(e) + i*pi = 1 + i*pi = {1 + 1j*np.pi:.6f}\n")
# (b) ln(1+i)
z_b = 1 + 1j
print(f"(b) ln(1+i) = {np.log(z_b):.6f}")
print(f" = ln(sqrt(2)) + i*pi/4 = {np.log(np.sqrt(2)) + 1j*np.pi/4:.6f}\n")
# (c) i^i
z_c = 1j ** 1j
print(f"(c) i^i = {z_c:.10f}")
print(f" = exp(i * ln(i)) = exp(i * i*pi/2) = exp(-pi/2)")
print(f" = {np.exp(-np.pi/2):.10f}")
# === λ¬Έμ 5 νμ΄ ===
print("\n=== λ¬Έμ 5: RLC νλ‘ ===\n")
R = 50
L = 20e-3
C = 10e-6
# (a)
f_0 = 1 / (2*np.pi*np.sqrt(L*C))
print(f"(a) κ³΅μ§ μ£Όνμ: f_0 = {f_0:.2f} Hz")
# (b)
f = 500
omega = 2 * np.pi * f
Z = R + 1j*(omega*L - 1/(omega*C))
print(f"(b) f = {f} Hzμμ:")
print(f" Z = {Z:.4f}")
print(f" |Z| = {abs(Z):.4f} Ohm")
print(f" arg(Z) = {np.degrees(np.angle(Z)):.2f}Β°")
# (c)
V0 = 10
I_max = V0 / R
print(f"(c) κ³΅μ§ μ I_max = V0/R = {I_max:.4f} A = {I_max*1000:.1f} mA")
μ°Έκ³ μλ£¶
κ΅μ¬¶
- Boas, M. L. (2005). Mathematical Methods in the Physical Sciences, 3rd ed., Chapter 2. Wiley.
- Arfken, G. B., Weber, H. J., & Harris, F. E. (2012). Mathematical Methods for Physicists, 7th ed., Chapter 6. Academic Press.
- Needham, T. (1997). Visual Complex Analysis. Oxford University Press. β 볡μμμ κΈ°ννμ μ΄ν΄μ νμν κ΅μ¬
μ¨λΌμΈ μλ£¶
- MIT OCW 18.04: Complex Variables with Applications
- 3Blue1Brown: "What is Euler's Formula?" (YouTube) β μ€μΌλ¬ 곡μμ μ§κ΄μ μ΄ν΄
- Better Explained: An Intuitive Guide to Imaginary Numbers
μ°κ΄ λ 쨶
- 01. 무νκΈμ: ν μΌλ¬ κΈμ (μ€μΌλ¬ 곡μ μ¦λͺ μ μ¬μ©)
- 12. 볡μν΄μ: ν΄μν¨μ, μ½μ μ 리, μ μ μ 리 (λ³Έ λ μ¨μ μ¬ν)
- 05. νΈλ¦¬μ κΈμ: 1μ nμ κ³±κ·Όκ³Ό DFTμ μ°κ²°
λ€μ λ 쨶
03. λ²‘ν° ν΄μ (Vector Analysis)μμλ μ€μΉΌλΌμ₯κ³Ό 벑ν°μ₯μ λ―ΈλΆκ³Ό μ λΆμ λ€λ£Ήλλ€. κΈ°μΈκΈ°(gradient), λ°μ°(divergence), νμ (curl) μ°μ°μμ μ€ν ν¬μ€/κ°μ°μ€ μ 리λ₯Ό νμ΅ν©λλ€.