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 + h) - f(x) = L(x)h + o(h), \quad \text{ где } L(x) = \lim\limits_{h\to 0} \frac{f(x+h)-f(x)}h =: f'(x) \]

производная функции \(f\) в точке \(x\). Геометрически это означает, что график функции \(y=f(x)\) имеет касательную в точке \((x, f(x))\).

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

\[ f^{(n)}(x) = \frac d{dx}(f^{(n-1)}(x)). \]

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

\[ df = f'(x)dx. \]

Differential is the main linear part of the increment \(\Delta f = f(x + h) - f(x)\).

Rules of differentiation#

  1. \(f'(x) \equiv 0\) if \(f(x)\equiv \mathrm{const}\)

  2. \((\alpha f(x) + \beta g(x))' = \alpha f'(x) + \beta g'(x)\)

  3. \((f(x)g(x))' = f'(x) g(x) + f(x) g'(x)\)

  4. \(\big(\frac{f(x)}{g(x)}\big)' = \frac{f'(x) g(x) - f(x) g'(x)}{g^2(x)}\) if \(g(x) \ne 0\)

  5. \((f(g(x)))' = f'(g(x)) g'(x)\) (chain rule)

Applications of derivatives#

  1. If \(f'(x) > 0\) (\(f'(x) < 0\)) for all \(x\in (a, b)\), then \(f\) is increasing (decreasing) on \((a, b)\).

  2. If \(f'(x) = 0\) and \(f''(x) > 0\) (\(f''(x) < 0\)), then \(x\) is a local minimum (maximum) of \(f\).

  3. 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