User:Auximines/sandbox

Differentiate x squared
$f(x) = x^2$

$\frac{d}{dx}(f(x)) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

$ \begin{alignat}{4} \frac{d}{dx}(x^2)\,\, &= \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{x^2 + 2xh + h^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{2xh + h^2}{h} \\ &= \lim_{h \to 0} 2x + h \\ &= 2x \end{alignat} $

Differentiate x cubed
$f(x) = x^3$

$\frac{d}{dx}(f(x)) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

$ \begin{alignat}{4} \frac{d}{dx}(x^3)\,\, &= \lim_{h \to 0} \frac{(x+h)^3 - x^3}{h} \\ &= \lim_{h \to 0} \frac{x^3 + 3x^2h + 3xh^2 + h^3 - x^3}{h} \\ &= \lim_{h \to 0} \frac{3x^2h + 3xh^2 + h^3}{h} \\ &= \lim_{h \to 0} 3x^2 + 3xh + h^2 \\ &= 3x^2 \end{alignat} $

Differentiate x^n
$f(x) = x^n$

$\frac{d}{dx}(f(x)) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

$ \begin{alignat}{4} \frac{d}{dx}(x^n)\,\, &= \lim_{h \to 0} \frac{(x+h)^n - x^n}{h} \\ &= \lim_{h \to 0} \frac{x^n + nx^{n-1}h + \frac{n(n-1)}{2!}x^{n-2}h^2 + \frac{n(n-1)(n-2)}{3!}x^{n-3}h^3 +\,... - x^n}{h} \\ &= \lim_{h \to 0} \frac{nx^{n-1}h + \frac{n(n-1)}{2!}x^{n-2}h^2 + \frac{n(n-1)(n-2)}{3!}x^{n-3}h^3 +\,...}{h} \\ &= \lim_{h \to 0} nx^{n-1} + \frac{n(n-1)}{2!}x^{n-2}h + \frac{n(n-1)(n-2)}{3!}x^{n-3}h^2 +\,... \\ &= \lim_{h \to 0} nx^{n-1} \\ \frac{d}{dx}(x^n)\,\, &= nx^{n-1} \end{alignat} $

Differentiate sin x
$f(x) = \sin x$

$\frac{d}{dx}(f(x)) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

$\lim_{h \to 0} \frac{\sin h}{h} = 1$
 * $\lim_{h \to 0} \frac{1 - \cos h}{h} = 0$

$\sin(a+b) = \sin a \cos b + \cos a \sin b$

$ \begin{alignat}{3} \frac{d}{dx}(\sin x)\,\, &= \lim_{h \to 0} \frac{\sin(x+h) - \sin x}{h} \\ &= \lim_{h \to 0} \frac{\sin x \cos h + \cos x \sin h - \sin x}{h} \\ &= \lim_{h \to 0} \sin x \frac{\cos h - 1}{h} + \lim_{h \to 0} \cos x \frac{\sin h}{h} \\ \end{alignat} $

Multiple Angle
$ \begin{cases} \sin 2\theta = 2 \sin \theta \cos \theta \\ \cos 2\theta = 2 \cos^2 \theta - 1 \\ \end{cases} $


 * $\cos 3\theta = ?$
 * $\sin 4\theta = ?$
 * $\cos 12\theta = ?$


 * $e^{i x} = \cos x+ i \sin x$


 * $e^{3i \theta}$
 * $e^{3i \theta} = {(e^{i \theta})}^{3}$

\begin{alignat}{4} \cos 3\theta + i \sin 3\theta \,\, &= \\ \cos 3\theta + i \sin 3\theta \,\, &= (\cos \theta + i \sin \theta)^3 \\ &= \cos^3 \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, i \sin \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, i \sin \theta + 3 \cos \theta \, i^2 \sin^2 \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, i \sin \theta + 3 \cos \theta \, i^2 \sin^2 \theta + i^3 \sin^3 \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, {\color{red}i} \sin \theta + 3 \cos \theta \, i^2 \sin^2 \theta + i^3 \sin^3 \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, i \sin \theta + 3 \cos \theta \, {\color{red}i^2} \sin^2 \theta + i^3 \sin^3 \theta \\ &= \cos^3 \theta + 3 \cos^2 \theta \, i \sin \theta + 3 \cos \theta \, i^2 \sin^2 \theta + {\color{red}i^3} \sin^3 \theta \\ &= \cos^3 \theta \\ &= \cos^3 \theta + 3i \cos^2 \theta \sin \theta \\ &= \cos^3 \theta + 3i \cos^2 \theta \sin \theta - 3 \cos \theta \sin^2 \theta \\ &= \cos^3 \theta + 3i \cos^2 \theta \sin \theta - 3 \cos \theta \sin^2 \theta - i \sin^3 \theta \\ \cos 3\theta + i \sin 3\theta \,\, &= (\cos^3 \theta - 3 \cos \theta \sin^2 \theta) + i(3 \cos^2 \theta \sin \theta - \sin^3 \theta) (1)\\ \end{alignat} $



\begin{alignat}{4} \cos 3\theta \,\, &= \cos^3 \theta - 3 \cos \theta \sin^2 \theta \\ &= \cos^3 \theta - 3 \cos \theta (1 - \cos^2 \theta) \\ &= 4 \cos^3 \theta - 3 \cos \theta \\ \end{alignat} $



\begin{alignat}{4} \sin 3\theta \,\, &= 3 \cos^2 \theta \sin \theta - \sin^3 \theta \\ &= 3 (1 - \sin^2 \theta) \sin \theta - \sin^3 \theta \\ &= 3 \sin \theta - 4 \sin^3 \theta \\ \end{alignat} $

$ \begin{cases} \cos 3\theta = 4 \cos^3 \theta - 3 \cos \theta \\ \sin 3\theta = 3 \sin \theta - 4 \sin^3 \theta \\ \end{cases} $

Powers

 * $a^n = \underbrace{a \times a \times \cdots \times a \times a}_{n}$
 * $a^1 = a $
 * $a^2 = a \times a$
 * $a^3 = a \times a \times a$
 * $a^4 = a \times a \times a \times a$
 * $a^5 = a \times a \times a \times a \times a$


 * $a^n = a^{n-1} \times a$
 * $a^{n-1} = \frac{a^n}{a}$


 * $a^0 = \frac{a^1}{a} = 1$
 * $a^{-1} = \frac{a^0}{a} = \frac{1}{a}$
 * $a^{-2} = \frac{a^{-1}}{a} = \frac{\frac{1}{a}}{a} = \frac{1}{a^2}$
 * $a^{-n} = \frac{1}{a^n}$


 * undefined

Misc

 * $e$ is Euler's number, the base of natural logarithms,
 * $i$ is the imaginary unit, which satisfies $i^{2} = −1$, and
 * $\pi$ is pi, the ratio of the circumference of a circle to its diameter.



f(n) = \begin{cases} n/2      & \quad \text{if } n \text{ is even}\\ -(n+1)/2 & \quad \text{if } n \text{ is odd}\\ \end{cases} $$



\begin{cases} n/2      & \quad \text{if } n \text{ is even}\\ -(n+1)/2 & \quad \text{if } n \text{ is odd}\\ \end{cases} $$