Approximating the Heaviside step function & its derivative with sigmoids
Top: Smooth approximations to
H(x) = 0 (x < 0), 1 (x > 0)
using
sigmoid(x; σ) = 1 / (1 + e^{-σ x})
for σ = 1 (orange), 2 (green), 4 (red), 8 (purple). Larger σ → sharper step.
Bottom: Their derivatives
d/dx [sigmoid] = σ ⋅ sigmoid(x; σ) ⋅ (1 − sigmoid(x; σ))
which converge to the Dirac delta δ(x) as σ → ∞.
This Enables gradient-based optimization in neural networks and physics simulations where the true step function is non-differentiable.
顯示更多