What this calculator does
This tool evaluates the second derivative of the gain-parameterized logistic sigmoid, written \(s''_a(x)\), at a point \(x\) for a chosen gain \(a\) (the slope parameter, often called alpha). The logistic sigmoid is one of the most common activation functions in neural networks and statistical models, and its derivatives appear throughout gradient-based training and curvature analysis.
The formulas
The gain-\(a\) sigmoid is \(s_a(x) = 1 / (1 + e^{-a x})\). Its first derivative is \(s'_a(x) = a \cdot s \cdot (1 - s)\), and its second derivative is $$s''_a(x) = a^2 \cdot s \cdot (1 - s) \cdot (1 - 2s),$$ where \(s = s_a(x)\). Because everything is expressed in terms of \(s\), the calculator first computes \(s\) and then reuses it for both derivatives. The denominator \(1 + e^{-a x}\) is always positive, so there is never a division-by-zero issue.
How to use it
Enter the gain \(a\) (default 1) and the evaluation point \(x\) (default 0.5), then read off the sigmoid value, first derivative, and the headline second derivative. To find the inflection point, note that \(s''_a(x) = 0\) exactly where \(s = 0.5\), which happens at \(x = 0\) for any gain.
Worked example
With \(a = 1\) and \(x = 0.5\): \(e^{-0.5} = 0.606531\), so $$s = \frac{1}{1.606531} = 0.622459.$$ Then \(1 - s = 0.377541\) and $$s' = 1 \cdot 0.622459 \cdot 0.377541 = 0.235004.$$ Finally \(1 - 2s = -0.244919\), giving $$s'' = 1 \cdot 0.235004 \cdot (-0.244919) = -0.057557.$$
FAQ
What does the gain \(a\) do? It scales the steepness of the sigmoid; larger \(a\) produces a sharper transition. Setting \(a = 0\) makes \(s = 0.5\) everywhere, so both derivatives are 0.
Where is the second derivative zero? At \(x = 0\), the inflection point, where the sigmoid switches from convex to concave.
Is it numerically stable? Yes — for negative \(a x\) the calculator uses the equivalent form \(e^{a x}/(1 + e^{a x})\) to avoid exponential overflow.