# Calculus

Contains an overview of calculus.

## Common derivatives

The following derivatives must simply be memorised:

$$
\begin{align}
{\Large \text{Very common}}\\
\\\
\frac{d}{dx} [x^n] =\ & n \cdot x^{n-1}\\
\\\
\frac{d}{dx} [e^x] =\ & e^x\\
\\\
\frac{d}{dx} [sin\ x] =\ & cos\ x\\
\\\
\frac{d}{dx} [cos\ x] =\ & \text{-} sin\ x\\
\\\
\frac{d}{dx} [ln\ x] =\ & \frac{1}{x}\\
\\\
\\\
\\\
{\Large \text{Hyperbolic}}\\
\\\
\frac{d}{dx} [sinh\ x] =\ & cosh\ x\\
\\\
\frac{d}{dx} [cosh\ x] =\ & sinh\ x\\
\\\
\frac{d}{dx} [tanh\ x] =\ & \frac{1}{cosh^2\ x}\\
\\\
\end{align}
$$

## Differentiation rules

### Product rule

$$
\frac{d}{dx}(f \cdot g) = \frac{d}{dx}(f) \cdot g + f \cdot \frac{d}{dx}(g) \equiv f' g + f g'
$$

### Quotient rule

$$
\frac{d}{dx} \left ( \frac{f}{g} \right ) = \frac{f' g - f g'}{g^2}
$$

### Chain rule

$$
\frac{dy}{dx} = \frac{df}{dg} \frac{dg}{dx} = f'(g(x))\ g'(x)
$$

### Reciprocal rule

$$
\frac{dx}{dy} = \frac{1}{dy/dx}
$$

## Implicit differentiation

Sometimes not possible to solve for $y$ and then differentiate.

We can still do differentiation in this case by simply differentiating w.r.t. $x$ on all terms and then solve for $\frac{dy}{dx}$.

## Leibniz's formula

Gives _n_th derivative of a product of functions.

Looks like binomial expansion $(p+q)^n$:

$$
\begin{align}
\frac{d^n(f \cdot g)}{dx^n} &= \sum_{m=0}^{n} \begin{pmatrix} n \\ m \end{pmatrix}\ f^{(n - m)}\ g^{(m)}\\
\\\
                            &= f^{(n)} \cdot g^{(0)} + n f^{(n - 1)} \cdot g^{(1)} + \frac{n(n - 1)}{2!} f^{(n - 2)} \cdot g^{(2)} + \ldots + f^{(0)} \cdot g^{(n)}
\end{align}
$$


4fa26930190798de64f9c2ee84b92ca6fe8ebdab
ipynb
Jupyter Notebook
docs/mathematics/calculus.ipynb
JeppeKlitgaard/jepedia
c9af119a78b916bd01eb347a585ff6a6a0ca1782
MIT
docs/mathematics/calculus.ipynb
JeppeKlitgaard/jepedia
c9af119a78b916bd01eb347a585ff6a6a0ca1782
MIT
docs/mathematics/calculus.ipynb
JeppeKlitgaard/jepedia
c9af119a78b916bd01eb347a585ff6a6a0ca1782
MIT
Qwen/Qwen-72B
1. YES
2. YES