# Operations

The derivative is a linear operator.

- The derivative of the
**sum**of two functions is the sum of the derivatives of the functions. - The derivative of the
**product**of a function**by a constant**is the derivative of the function multiplied by the constant.

If $$f$$ and $$g$$ are two functions differentiable at $$x_0$$ and $$\lambda$$ and $$\mu$$ are constants, linearity reads $$$(\lambda f+\mu g)'(x_0) = \lambda f'(x_0)+\mu g'(x_0)$$$

For instance, $$$\big(e^x-2\sin x\big)' = e^x -2\sin'(x) = e^x -2\cos x$$$

The proof is below. \begin{align*} &\frac{(\lambda f+\mu g)(x) - (\lambda f+\mu g)(x_0)}{x-x_0} \\ &\quad\quad = \lambda \frac{f(x)-f(x_0)}{x-x_0} + \mu \frac{g(x)-g(x_0)}{x-x_0}\\ &\quad\quad \to \lambda f'(x_0)+ \mu g'(x_0) \end{align*}

The **product** of two differentiable functions is also differentiable, and its derivative is given by the formula $$$(fg)'(x_0) = f'(x_0)g(x_0)+f(x_0)g'(x_0)$$$

For instance, $$$ \big(x\ln(x)\big)'= (x)'\ln(x)+x\ln'(x) = \ln(x) + x/x = \ln(x)+1.$$$

The proof is given below. \begin{align*} &\frac{f(x)g(x) -f(x_0)g(x_0)}{x-x_0} \\ &\quad\quad = g(x)\frac{f(x)-f(x_0)}{x-x_0}+ f(x_0)\frac{g(x)-g(x_0)}{x-x_0}\\ &\quad\quad \to f'(x_0)g(x_0)+f(x_0)g'(x_0) \end{align*}

The **reciprocal** of a differentiable function at a point where it doesn't cancel is differentiable and its derivative is given by the formula $$$\displaystyle \Big(\frac{1}{f}\Big)'(x_0) = \frac{-f'(x_0)}{f^2(x_0)} $$$

For instance, $$$\displaystyle \Big(\frac{1}{\ln(x)}\Big)' = -\frac{\ln'(x)}{\ln^2(x)}= -\frac{1}{x\ln^2(x)} $$$

Here is the proof: $$$ \frac{1/f(x)-1/f(x_0)}{x-x_0} = \frac{f(x_0)-f(x)}{f(x)f(x_0)(x-x_0)}\to\frac{-f'(x_0)}{f^2(x_0)} $$$

The **quotient** of two differentiable functions at a point where the denominator doesn't cancel is differentiable. Its derivative is given by the formula: $$$\displaystyle \Big(\frac{f}{g}\Big)'(x_0) = \frac{f'(x_0)g(x_0) - f(x_0)g'(x_0)}{g^2(x_0)} $$$

For instance, \begin{align*} \tan'(x)=\Big(\frac{\sin}{\cos}\Big)'(x) & = \frac{\sin'x\cos x - \sin x\cos'x}{\cos^2(x)}\\ & = \frac{\cos^2x + \sin^2x}{\cos^2x} = \frac{1}{\cos^2x} \end{align*}

**Proof**: Combining reciprocal and multiplication gives \begin{align*} \Big(\frac{f}{g}\Big)'(x_0) &= \big(f\;(1/g)\big)'(x_0)\\ &\;= f'(x_0)(1/g)(x_0) + f(x_0)(1/g)'(x_0)\\ &\;=\frac{f'(x_0)}{g(x_0)}-\frac{f(x_0)g'(x_0)}{g^2(x_0)}\\ &\;=\frac{f'(x_0)g(x_0) - f(x_0)g'(x_0)}{g^2(x_0)} \end{align*}

The **composite** of two differentiable functions is differentiable and its derivative is given by the formula $$$(f\circ g)'(x_0) = f'\big(g(x_0)\big) g'(x_0)$$$

Recall that the composite function is defined by $$(f\circ g)(x) =f(g(x))$$.

The differentiation formula is often called the chain rule.

For example, $$$\big(\cos(x^2)\big)'= \cos'(x^2) (x^2)' = -2x\sin(x^2)$$$

Here is the proof. \begin{align*} \frac{f\big(g(x)\big)-f\big(g(x_0)\big)}{x-x_0} &\;=\frac{f\big(g(x)\big)-f\big(g(x_0)\big)}{g(x)-g(x_0)}\frac{g(x) - g(x_0)}{x-x_0} \\ &\;\to f'\big(g(x_0)\big) g'(x_0) \end{align*}

The chain rule can be used multiple times for the composite of several functions.

The **inverse** of a bijective (one-to-one correspondence) differentiable function whose derivative doesn't cancel is differentiable, and its derivative is given by $$$\displaystyle (f^{-1})'(x_0) = \frac{1}{f'\big(f^{-1}(x_0)\big)} $$$

For instance, \begin{align*} (\sin^{-1})'(x) &= \frac{1}{\sin'\big(\arcsin(x)\big)} =\frac{1}{\cos\big(\arcsin(x)\big)} \\ &= \frac{1}{\sqrt{1-\sin^2\big(\arcsin(x)\big)}} = \frac{1}{\sqrt{1-x^2}} \end{align*}

To prove the result, we apply the chain rule to the identity $$$x=f\circ f^{-1}(x). $$$ By differentiating both sides, we get $$1 = f'\big(f^{-1}(x_0)\big) (f^{-1})'(x_0)$$. Thus $$$\displaystyle (f^{-1})'(x_0) =1/f'\big(f^{-1}(x_0)\big).$$$