Derivative Rules
Power, product, quotient, and chain rules with common derivatives.
Basic rules
Here $c$ is a constant and $f, g$ are functions of $x$.
| Function | Derivative |
|---|
Constant f(x)=c | |
| |
Scalar multiple cf(x) | |
Sum f(x)+g(x) | f′(x)+g′(x) |
| f′g+fg′ |
| g2f′g−fg′ |
Chain f(g(x)) | f′(g(x))⋅g′(x) |
Common functions
| Function | Derivative |
|---|
| |
| |
| |
| |
| |
| 2x1 |
Activation-function derivatives
Written in terms of the output where that is cheaper to compute (as autograd does in practice).
| Function | Derivative |
|---|
Sigmoid σ(x)=1+e−x1 | σ(x)(1−σ(x)) |
Tanh tanh(x) | 1−tanh2(x) |
ReLU max(0,x) | 1 if x>0, else 0 (undefined at 0; take 0) |
| 1 if x>0, else a |
Softplus ln(1+ex) | σ(x)=1+e−x1 |