Code never lies, comments sometimes do, Anonymous

A complex number is specified by an ordered pair of real numbers (a, b) ∈ ℝ2 and expressed or written in the form z = a + bi, where a and b are real numbers, and i is the imaginary unit, defined by the property i2 = −1 ⇔ i = $\sqrt{-1}$, e.g., 2 + 5i, $7\pi + i\sqrt{2}.$ ℂ= { a + bi ∣a, b ∈ ℝ}.
Definition. Let D ⊆ ℂ be a set of complex numbers. A complex-valued function f of a complex variable, defined on D, is a rule that assigns to each complex number z belonging to the set D a unique complex number w, f: D ➞ ℂ.
We often call the elements of D as points. If z = x+ iy ∈ D, then f(z) is called the image of the point z under f. f: D ➞ ℂ means that f is a complex function with domain D. We often write f(z) = u(x ,y) + iv(x, y), where u, v: ℝ2 → ℝ are the real and imaginary parts.
Definition. Let D ⊆ ℂ, $f: D \rarr \Complex$ be a function and z0 be a limit point of D (so arbitrarily close points of D lie around z0, though possibly z0 ∉ D). A complex number L is said to be a limit of the function f as z approaches z0, written or expressed as $\lim_{z \to z_0} f(z)=L$, if for every epsilon ε > 0, there exist a corresponding delta δ > 0 such that |f(z) -L| < ε whenever z ∈ D and 0 < |z - z0| < δ.
Why 0 < |z - z0|? We exclude z = z0 itself because the limit cares about values near z0, not at z0 itself. When z0 ∉ D, you cannot evaluate f(z0), so you only care about z approaching z0. When z0 ∈ D, you still want the function’s nearby behavior; this separates “limit” from “value.”
Equivalently, if ∀ε >0, ∃ δ > 0: (for every ε > 0, there exist a corresponding δ > 0) such that whenever z ∈ D ∩ B'(z0; δ), f(z) ∈ B(L; ε) ↭ f(D ∩ B'(z0; δ)) ⊂ B(L; ε).
If no such L exists, then we say that f(z) does not have a limit as z approaches z0. This is exactly the same ε–δ formulation we know from real calculus, but now z and L live in the complex plane ℂ, and neighborhoods are round disks rather than intervals.
Definition. Let D ⊆ ℂ. A function f: D → ℂ is said to be continuous at a point z0 ∈ D if given any arbitrarily small ε > 0, there is a corresponding δ > 0 such that |f(z) - f(z0)| < ε whenever z ∈ D and |z - z0| < δ.
In words, arbitrarily small output‐changes ε can be guaranteed by restricting z to lie in a sufficiently small disk of radius δ around z0.
Definition. A function f: D → ℂ is said to be continuous if it is continuos at every point in its domain (∀z0 ∈ D).
Definition. Let D ⊆ ℂ, a ∈ D, and f: D → ℂ be a function. The derivative of f at the point a is defined to be $\lim_{h \to 0} \frac{f(a+h)-f(a)}{h}$ if this limits exists. If this limit exists and we express it as f'(a) or $\frac{df}{dz}|_{z=a}$, we say that f is differentiable at the point a. Otherwise, if this limit does not exist, then we say that f is not differentiable at a.
Definition. A function f that is differentiable at every point in its domain is said to be differentiable.
As h→0, the |h|²/h term tends to 0
f(z) = z⋅Re(z) = (x + iy)·x = x2 + ixy.
Compute the limit along two paths:
Real Axis (h = t ∈ ℝ), $\lim_{t \to 0} \frac{f(z+t)-f(z)}{t} = \lim_{t \to 0} \frac{(x+t)^2+i(x+t)y-x^2-ixy}{t} = \lim_{t \to 0} \frac{x^2 +2xt + t^2+ixy +ity -x^2-ixy}{t} \lim_{t \to 0} \frac{+2xt + t^2+ity }{t} = \lim_{t \to 0} 2x + t + iy = 2x + iy$
Imaginary Axis (h = it ∈ ℝ), $\lim_{t \to 0} \frac{f(z+it)-f(z)}{it} = \lim_{t \to 0} \frac{x^2 + ix(y+t)-x^2-ixy}{it} = \lim_{t \to 0} \frac{ixy + ixt -ixy}{it} \lim_{t \to 0} \frac{ixt}{it} = x$
The limits differ unless x = y = 0 (i.e., z = 0). Thus, the derivative does not exist for z ≠ 0.
$\lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{\frac{1}{z+h}-\frac{1}{z}}{h} = \lim_{h \to 0} \frac{z - (z+h)}{hz(z+h)} = \lim_{h \to 0} \frac{-1}{z(z+h)} = \frac{-1}{z^2}$
f(z) is differentiable everywhere except at z = 0, where it has a pole (a type of isolated singularity).
$\lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{\frac{z+h}{(z+h)^2+1}-\frac{z}{z^2+1}}{h} = \lim_{h \to 0} \frac{(z+h)(z^2+1)-z((z+h)^2+1)}{((z+h)^2+1)(z^2+1)h}$
Expand the numerator: $(z+h)(z^2+1)-z((z+h)^2+1) = z(z^2+1) + h(z^2+1) -z(z^2 +2zh + h^2 + 1) = z^3 + z + hz^2 + h -z^3 -2z^2h -zh^2 -z = hz^2 + h -2z^2h -zh^2 = h(1 -z^2 -zh)$
Substitute back into the limit: $\lim_{h \to 0} \frac{(z+h)(z^2+1)-z((z+h)^2+1)}{((z+h)^2+1)(z^2+1)h} = \lim_{h \to 0} \frac{h(1 -z^2 -zh)}{((z+h)^2+1)(z^2+1)h} = \lim_{h \to 0} \frac{1 -z^2 -zh}{((z+h)^2+1)(z^2+1)} = \frac{1 -z^2}{(z^2+1)^2}$
Final Result: $f'(z) = \frac{1 -z^2}{(z^2+1)^2}, \forall z \in ℂ$ {i, -i}. The derivative exists everywhere except at the poles z = ±i, where the denominator becomes zero.
It matches the derivative obtained via quotient rule: $\frac{d}{dz}\frac{u}{v} = \frac{u'v -uv'}{v^2} \leadsto \frac{z^2+1-z·2z}{(z^2+1)^2} = \frac{1 -z^2}{(z^2+1)^2}$
Let z0 ∈ D, $\lim_{h \to 0} \frac{f(z_0+h)-f(z_0)}{h} = \lim_{h \to 0} \frac{\frac{3(z_0+h)}{z_0+h-i}-\frac{3z_0}{z_0-i}}{h} =[\text{Combine over a common denominator}] \lim_{h \to 0} \frac{1}{h}(\frac{3(z_0+h)(z_0-i)-3z_0(z_0+h-i)}{(z_0+h-i)(z_0-i)})$ =[Expand the numerator:]
$\lim_{h \to 0} \frac{1}{h}(\frac{3z_0²+3z_0h-3iz_0-3hi-3z_0²-3z_0h+3z_0i)}{(z_0+h-i)(z_0-i)}) =[\text{Thus the quotient becomes}] \lim_{h \to 0} \frac{1}{h}(\frac{-3hi}{(z_0+h-i)(z_0-i)})$ =
$\lim_{h \to 0} (\frac{-3i}{(z_0+h-i)(z_0-i)}) = \frac{-3i}{(z_0-i)(z_0-i)} = \frac{-3i}{(z_0-i)²}$
$f'(z_0) = \frac{-3i}{(z_0-i)²}$. Since z0 was taken arbitrary in the domain D, f is differentiable everywhere on its domain, with $f'(z) = \frac{-3i}{(z-i)²}, \forall z \ne i$.
These rules form the basis for differentiating complex functions.