Simplicity is the ultimate sophistication, Anonymous

Definition. Let $f: \text{dom}(f) \to \mathbb{R}^m$ be a function, where its domain $\text{dom}(f) \subseteq \mathbb{R}^n$ is an open set. The function $f$ is said to be differentiable if it is differentiable at every point $\mathbf{x} \in \text{dom}(f)$.
Formally, $f$ is differentiable at a point $\mathbf{x}$ if there exists a linear map $L: \mathbb{R}^n \to \mathbb{R}^m$ (represented by an $m \times n$ matrix, the Jacobian matrix $Df(\mathbf{x})$), such that $\lim_{\mathbf{h} \to \mathbf{0}, \mathbf{h} \in \mathbb{R}^n} \frac{\| f(\mathbf{x} + \mathbf{h}) - f(\mathbf{x}) - Df(\mathbf{x})\mathbf{h} \|}{\|\mathbf{h}\|} = 0$
Here, $\| \cdot \|$ denotes a norm (e.g., the Euclidean norm) on $\mathbb{R}^n$ and $\mathbb{R}^m$. This limit must hold for sequences $\mathbf{h} \to 0$ from any direction within $\mathbb{R}^n$.
For (x, y) ≠ (0, 0), one shows $\sqrt{x^2+y^2}=(x^2+y^2)^{1/2}, \dfrac{∂g}{∂x} =\dfrac{1}{2}(x^2+y^2)^{-1/2}·2x = \dfrac{x}{\sqrt{x^2+y^2}}$. Analogously, $\dfrac{∂g}{∂y} =\dfrac{y}{\sqrt{x^2+y^2}}$, Both continuous on ℝ² \ {(0, 0)}, so g is differentiable everywhere except possibly at the origin.
If g were differentiable at (0, 0): (i) the function has a minimum at (0, 0) (since g ≥ 0 and g(0,0) = 0); (ii) at a differentiable minimum, ∇g(0, 0) = (0, 0); (iii) Therefore, $D_u g(0, 0) = ∇g(0, 0) \cdot u = 0$ for all u.
When a differentiable function $g\colon\R^n\to\R$ attains a local minimum at a point p, the gradient $\nabla g(p)$ has to be the zero vector. The gradient $\nabla g(p)$ points in the direction of steepest ascent. At a minimum, there is no “downhill” direction to go—every small move increases (or leaves unchanged) the value of g. Hence there cannot be any nonzero component of the gradient; otherwise you could go “downhill” in the opposite direction.
The graph of $\sqrt{x^2+y^2}$ is the upper half of a circular cone (a sharp corner) with its vertex at the origin.
It has no tangent plane at the origin.
Directional derivatives along (1, 0) and (0, 1) give, $Dg_{(1, 0)} = \lim_{h \to 0^+} \dfrac{g(h, 0)-g(0, 0)}{h} = \lim_{h \to 0^+} \dfrac{h^2}{h}=1, Dg_{(0, 1)} = \lim_{h \to 0^+} \dfrac{g(0, h)-g(0, 0)}{h}=1$.
If g were differentiable at (0, 0), the total derivative would be Dgu(0, 0) = ∇g(0,0)⋅u=(0,0)⋅(a,b) = 0 for all u. Since the previous directional derivatives along (1, 0) and (0, 1) don’t match $D_{(1,0)} g = 1 ≠ 0$ ⊥, g fails to be differentiable at (0, 0).
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# Define the coordinates
x = np.linspace(-1, 1, 100)
y = np.linspace(-1, 1, 100)
X, Y = np.meshgrid(x, y)
# Avoid division by zero
Z = np.zeros_like(X)
mask = (X != 0) | (Y != 0)
# Define the function
Z[mask] = (X[mask]**2 * Y[mask]) / (X[mask]**4 + Y[mask]**2)
# Create the figure
fig = plt.figure(figsize=(10, 8))
ax = fig.add_subplot(111, projection='3d')
# Plot the surface
ax.plot_surface(X, Y, Z, cmap='viridis', alpha=0.8)
# Adding labels and title
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('f(x, y)')
plt.title('Surface Plot of f(x, y)')
plt.savefig('surface_plot.jpg')
A common misconception is that if a function has directional derivatives in every direction at a point, then it must be differentiable there. This is false. Differentiability requires the existence of a single linear map that simultaneously approximates the function's behavior in all directions in a coherent, consistent way.
For a function $f: \mathbb{R}^n \to \mathbb{R}^m$ to be differentiable at a point $a$, we need a linear map $L: \mathbb{R}^n \to \mathbb{R}^m$ (the derivative $Df(a)$) such that for every direction vector $v$ (not necessarily unit), the directional derivative satisfies: $D_v f(a) = L(v) \quad \text{for all vectors } v \in \mathbb{R}^n$
This single requirement actually imposes two hidden algebraic conditions on the collection of directional derivatives:
If either of these properties fails, the function cannot be differentiable at that point —even if every single directional derivative exists.
For $f: \mathbb{R}^n \to \mathbb{R}^m$ to be differentiable at $a$, we require three things, each building on the last:
All three requirements—existence, linearity, and approximation—are elegantly captured in the single limit definition of differentiability: $\lim_{h \to 0} \frac{\|f(a+h) - f(a) - Df(a) \cdot h\|}{\|h\|} = 0$
This definition simultaneously:
Definition. Let $D \subseteq \mathbb{C}$ be an open set and $f: D \to \mathbb{C}$ be a function. We say $f$ is **complex differentiable** at a point $z_0 \in D$ if the limit: $f'(z_0) = \lim_{h \to 0} \frac{f(z_0 + h) - f(z_0)}{h}$ exists. The value of this limit is called the derivative of $f$ at $z_0$.. Otherwise, if this limit does not exist, then we say that f is not differentiable at $z_0$.
Key facts:
Definition. A function $f$ is called analytic (or holomorphic) on an open set $D$ if it is complex differentiable at every point in $D$.
Definition. A function $f$ is called entire if it is analytic on the whole complex plane $\mathbb{C}$.
The rules of calculation mirror real calculus because the limit definition is algebraically identical.
$f′(z)= \lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{c-c}{h} = lim_{h \to 0} \frac{0}{h} = lim_{h \to 0} 0 = 0.$ ∎ Constants are entire, with derivative 0.
$f′(z)= \lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{z+h-z}{h} = lim_{h \to 0} \frac{h}{h} = lim_{h \to 0} 1 = 1$ ∎
$f′(z)= \lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{(z+h)^n-z^n}{h} =[\text{Using the binomial theorem}] \lim_{h \to 0} \frac{\sum_{k=0}^n {n \choose k}z^{n-k}h^k-z^n}{h} = \lim_{h \to 0} \sum_{k=1}^n {n \choose k}z^{n-k}h^{k-1}$
As $h \to 0$, all terms with hk-1, k ≥ 2 vanish, leaving $f'(z)= {n \choose 1}z^{n-1} = nz^{n-1}$. Therefore, $f(z) = z^n$ is entire, with $f'(z) = nz^{n-1}$. ∎
Every polynomial is differentiable everywhere in ℂ. Examples: f(z) = 3z² - 2z + 5, f’(z) = 6z - 2; f(z) = z⁴ - iz³ + 2z, f’(z) = 4z³ - 3iz² + 2; f(z) = (z - 1)³, f’(z) = 3(z - 1)².
Example: $f(z) = \frac{3z}{z - i}$. Domain: D = ℂ \ {i}.
Derivative: $f'(z) = \frac{3(z-i) - 3z \cdot 1}{(z-i)^2} = \frac{3z - 3i - 3z}{(z-i)^2} = \frac{-3i}{(z-i)^2}$.
Let z₀ ∈ D. Then, $f'(z_0) = \lim_{h \to 0} \frac{\frac{3(z_0+h)}{z_0+h-i} - \frac{3z_0}{z_0-i}}{h}=[\text{Combining fraction}] \lim_{h \to 0} \frac{3(z_0+h)(z_0-i) - 3z_0(z_0+h-i)}{h(z_0+h-i)(z_0-i)}$
Expanding the numerator: $3(z_0+h)(z_0-i) - 3z_0(z_0+h-i) = 3z_0^2 - 3iz_0 + 3hz_0 - 3ih - 3z_0^2 - 3hz_0 + 3iz_0 = -3ih$
Therefore, $f'(z_0) = \lim_{h \to 0} \frac{-3ih}{h(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)^2}$
This limit exists and we also know that $f'(z_0) = \frac{-3i}{(z_0-i)^2}$. Since z₀ is an arbitrary point in dom(f), f is differentiable.
We define these functions via power series or Euler’s formula to extend them to $\mathbb{C}$.
$f′(z)= \lim_{h \to 0} \frac{f(z+h)-f(z)}{h} = \lim_{h \to 0} \frac{e^{z+h}-e^z}{h} = e^z·\lim_{h \to 0} \frac{e^{h}-1}{h}$
Expand eh as a Taylor series: $e^h = 1 + h + \frac{h^2}{2!} + \frac{h^3}{3!} + \cdots$. Therefore, $\frac{e^h-1}{h} = 1 + \frac{h}{2!} + \frac{h^2}{3!} + \cdots$
As $h \to 0$, all terms except the first vanish, leaving: $\lim_{h \to 0}\frac{e^h-1}{h} = 1, f′(z)= e^z·\lim_{h \to 0} \frac{e^{h}-1}{h} = e^z·1 = e^z$. Thus, $f'(z) = e^z \cdot 1 = e^z \blacksquare$.
Another approach. $e^z = e^{x+iy} = e^x(\cos y + i\sin y)$. $e^z = \sum_{n=0}^\infty \frac{z^n}{n!}$.
Using the series definition and differentiating term-by-term (valid for power series): $\frac{d}{dz} \left(1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots \right) = 0 + 1 + \frac{2z}{2!} + \frac{3z^2}{3!} + \cdots = 1 + z + \frac{z^2}{2!} + \cdots = e^z$