# Differential Calculus Differential calculus is the analytic study of how a function changes with respect to its variables. Derivative is a linear operator of functions. This means it follows: 1. Summation distribution 2. Scalar multiplication In computational context, differentiation on complex functions are performed using [[Automatic Differentiation]]. ## L'Hospital's rule L'Hospital's rule is useful in calculating limit when taking derivative of the original function simplifies calculation. $ \left[\lim _{x \rightarrow a} \frac{f(x)}{g(x)}=\lim _{x \rightarrow a} \frac{f^{\prime}(x)}{g^{\prime}(x)}\right] $ ## Product rule $ \frac{d}{d x}(f(x) \cdot g(x))=f^{\prime}(x) \cdot g(x)+f(x) \cdot g^{\prime}(x) $ ## Quotient rule $ \frac{d}{d x}\left[\frac{f(x)}{g(x)}\right]=\frac{\frac{d}{d x} f(x) \cdot g(x)-f(x) \frac{d}{d x} g(x)}{(g(x))^2} $ ## Chain rule The chain rule states that the partial derivative of $E=E(x, y)$ with respect to $x$ can be calculated via another variable $y=y(x)$, as follows: $ \frac{\partial E}{\partial x}=\frac{\partial E}{\partial y} \cdot \frac{\partial y}{\partial x} $ ## [[Matrix Calculus]] ## Gradients Gradient is a vector of partial derivatives of a function with respect to its parameters. $ \nabla f(x, y)=\left[\frac{\partial f}{\partial x} , \frac{\partial f}{\partial y} \right] $ ## Some useful results ### Logarithms $ \frac{\partial f(x)}{\partial x}=f(x) \frac{\partial \log f(x)}{\partial x} $ $ \frac{d}{d x} \log f(x)=\frac{1}{f(x)} \cdot \frac{d f(x)}{d x} $ ### Exponentials $ \frac{d}{d x}\left(e^{f(x)}\right)=f^{\prime}(x) e^{(f(x))} $ $ \frac{d}{d x}\left[a^x\right] = a^x \ln (a) $ ## Integral Calculus Integration by parts $ \int f(x) g^{\prime}(x) d x=f(x) g(x)-\int g(x) f^{\prime}(x) d x . $ --- ## References