1-d calculus#
Derivative#
В курсе матанализа изучаются произвольные функции действительного аргумента, однако, на практике в целом и в машинном обучении в частности обычно встречаются дифференцируемые (гладкие) функции, локально «похожие» на простую и понятную линейную функцию. «Малому приращению» \(h=\Delta x\) аргумента гладкой функции \(f\) соответствует «малое приращение» \(\Delta f = f(x+h) - f(x)\) её значения, приблизительно пропорциональное \(h\): \(f(x+h) - f(x) \approx L(x)h\). Более формально, функция \(f\colon \mathbb R \to\mathbb R\) дифференцируема в точке \(x\), если
— производная функции \(f\) в точке \(x\). Геометрически это означает, что график функции \(y=f(x)\) имеет касательную в точке \((x, f(x))\).
![https://sites.millersville.edu/bikenaga/calculus1/derivatives/derivatives4.png](https://sites.millersville.edu/bikenaga/calculus1/derivatives/derivatives4.png)
If the function \(f'(x)\) is also differentiable, then its derivative is called the second derivative of \(f\): \(f''(x) =\frac d{dx}(f'(x))\). By indtuction, \(n\)-th derivative is defined as
Differential#
The function \(df(x ,h) = L(x)h = f'(x)h\) is called differential of \(f\) at point \(x\). Note that it is a function of two variables \(x\) and \(h\), and the dependency on \(h\) is linear.
Important
Due to historical reasons, the increment \(h\) is often denoted as \(dx\); then the formula for the differential is
Differential is the main linear part of the increment \(\Delta f = f(x + h) - f(x)\).
Rules of differentiation#
\(f'(x) \equiv 0\) if \(f(x)\equiv \mathrm{const}\)
\((\alpha f(x) + \beta g(x))' = \alpha f'(x) + \beta g'(x)\)
\((f(x)g(x))' = f'(x) g(x) + f(x) g'(x)\)
\(\big(\frac{f(x)}{g(x)}\big)' = \frac{f'(x) g(x) - f(x) g'(x)}{g^2(x)}\) if \(g(x) \ne 0\)
\((f(g(x)))' = f'(g(x)) g'(x)\) (chain rule)
Applications of derivatives#
If \(f'(x) > 0\) (\(f'(x) < 0\)) for all \(x\in (a, b)\), then \(f\) is increasing (decreasing) on \((a, b)\).
If \(f'(x) = 0\) and \(f''(x) > 0\) (\(f''(x) < 0\)), then \(x\) is a local minimum (maximum) of \(f\).
If \(f''(x) > 0\) (\(f''(x) < 0\)) for all \(x\in (a, b)\), then \(f\) is strictly convex (concave) on \((a, b)\)
![https://i.stack.imgur.com/GNBZ4.png](https://i.stack.imgur.com/GNBZ4.png)