$
% macros
% MathJax
\newcommand{\bigtimes}{\mathop{\vcenter{\hbox{$\Huge\times\normalsize$}}}} % prefix with \! and postfix with \!\!
% sized grouping symbols
\renewcommand {\aa} [1] {\left\langle {#1} \right\rangle} % <> angle brackets
\newcommand {\bb} [1] {\left[ {#1} \right]} % [] brackets
\newcommand {\cc} [1] {\left\{ {#1} \right\}} % {} curly braces
\newcommand {\mm} [1] {\lVert {#1} \rVert} % || || double norm bars
\newcommand {\nn} [1] {\lvert {#1} \rvert} % || norm bars
\newcommand {\pp} [1] {\left( {#1} \right)} % () parentheses
% unit
\newcommand {\unit} [1] {\bb{\mathrm{#1}}} % measurement unit
% math
\newcommand {\fn} [1] {\mathrm{#1}} % function name
% sets
\newcommand {\setZ} {\mathbb{Z}}
\newcommand {\setQ} {\mathbb{Q}}
\newcommand {\setR} {\mathbb{R}}
\newcommand {\setC} {\mathbb{C}}
% arithmetic
\newcommand {\q} [2] {\frac{#1}{#2}} % quotient, because fuck \frac
% trig
\newcommand {\acos} {\mathrm{acos}} % \mathrm{???}^{-1} is misleading
\newcommand {\asin} {\mathrm{asin}}
\newcommand {\atan} {\mathrm{atan}}
\newcommand {\atantwo} {\mathrm{atan2}} % at angle = atan2(y, x)
\newcommand {\asec} {\mathrm{asec}}
\newcommand {\acsc} {\mathrm{acsc}}
\newcommand {\acot} {\mathrm{acot}}
% complex numbers
\newcommand {\z} [1] {\tilde{#1}}
\newcommand {\conj} [1] {{#1}^\ast}
\renewcommand {\Re} {\mathfrak{Re}} % real part
\renewcommand {\Im} {\mathrm{I}\mathfrak{m}} % imaginary part
% quaternions
\newcommand {\quat} [1] {\tilde{\mathbf{#1}}} % quaternion symbol
\newcommand {\uquat} [1] {\check{\mathbf{#1}}} % versor symbol
\newcommand {\gquat} [1] {\tilde{\boldsymbol{#1}}} % greek quaternion symbol
\newcommand {\guquat}[1] {\check{\boldsymbol{#1}}} % greek versor symbol
% vectors
\renewcommand {\vec} [1] {\mathbf{#1}} % vector symbol
\newcommand {\uvec} [1] {\hat{\mathbf{#1}}} % unit vector symbol
\newcommand {\gvec} [1] {\boldsymbol{#1}} % greek vector symbol
\newcommand {\guvec} [1] {\hat{\boldsymbol{#1}}} % greek unit vector symbol
% special math vectors
\renewcommand {\r} {\vec{r}} % r vector [m]
\newcommand {\R} {\vec{R}} % R = r - r' difference vector [m]
\newcommand {\ur} {\uvec{r}} % r unit vector [#]
\newcommand {\uR} {\uvec{R}} % R unit vector [#]
\newcommand {\ux} {\uvec{x}} % x unit vector [#]
\newcommand {\uy} {\uvec{y}} % y unit vector [#]
\newcommand {\uz} {\uvec{z}} % z unit vector [#]
\newcommand {\urho} {\guvec{\rho}} % rho unit vector [#]
\newcommand {\utheta} {\guvec{\theta}} % theta unit vector [#]
\newcommand {\uphi} {\guvec{\phi}} % phi unit vector [#]
\newcommand {\un} {\uvec{n}} % unit normal vector [#]
% vector operations
\newcommand {\inner} [2] {\left\langle {#1} , {#2} \right\rangle} % <,>
\newcommand {\outer} [2] {{#1} \otimes {#2}}
\newcommand {\norm} [1] {\mm{#1}}
\renewcommand {\dot} {\cdot} % dot product
\newcommand {\cross} {\times} % cross product
% matrices
\newcommand {\mat} [1] {\mathbf{#1}} % matrix symbol
\newcommand {\gmat} [1] {\boldsymbol{#1}} % greek matrix symbol
% ordinary derivatives
\newcommand {\od} [2] {\q{d #1}{d #2}} % ordinary derivative
\newcommand {\odn} [3] {\q{d^{#3}{#1}}{d{#2}^{#3}}} % nth order od
\newcommand {\odt} [1] {\q{d{#1}}{dt}} % time od
% partial derivatives
\newcommand {\de} {\partial} % partial symbol
\newcommand {\pd} [2] {\q{\de{#1}}{\de{#2}}} % partial derivative
\newcommand {\pdn} [3] {\q{\de^{#3}{#1}}{\de{#2}^{#3}}} % nth order pd
\newcommand {\pdd} [3] {\q{\de^2{#1}}{\de{#2}\de{#3}}} % 2nd order mixed pd
\newcommand {\pdt} [1] {\q{\de{#1}}{\de{t}}} % time pd
% vector derivatives
\newcommand {\del} {\nabla} % del
\newcommand {\grad} {\del} % gradient
\renewcommand {\div} {\del\dot} % divergence
\newcommand {\curl} {\del\cross} % curl
% differential vectors
\newcommand {\dL} {d\vec{L}} % differential vector length [m]
\newcommand {\dS} {d\vec{S}} % differential vector surface area [m^2]
% special functions
\newcommand {\Hn} [2] {H^{(#1)}_{#2}} % nth order Hankel function
\newcommand {\hn} [2] {H^{(#1)}_{#2}} % nth order spherical Hankel function
% transforms
\newcommand {\FT} {\mathcal{F}} % fourier transform
\newcommand {\IFT} {\FT^{-1}} % inverse fourier transform
% signal processing
\newcommand {\conv} [2] {{#1}\ast{#2}} % convolution
\newcommand {\corr} [2] {{#1}\star{#2}} % correlation
% abstract algebra
\newcommand {\lie} [1] {\mathfrak{#1}} % lie algebra
% other
\renewcommand {\d} {\delta}
% optimization
%\DeclareMathOperator* {\argmin} {arg\,min}
%\DeclareMathOperator* {\argmax} {arg\,max}
\newcommand {\argmin} {\fn{arg\,min}}
\newcommand {\argmax} {\fn{arg\,max}}
% waves
\renewcommand {\l} {\lambda} % wavelength [m]
\renewcommand {\k} {\vec{k}} % wavevector [rad/m]
\newcommand {\uk} {\uvec{k}} % unit wavevector [#]
\newcommand {\w} {\omega} % angular frequency [rad/s]
\renewcommand {\TH} {e^{j \w t}} % engineering time-harmonic function [#]
% classical mechanics
\newcommand {\F} {\vec{F}} % force [N]
\newcommand {\p} {\vec{p}} % momentum [kg m/s]
% \r % position [m], aliased
\renewcommand {\v} {\vec{v}} % velocity vector [m/s]
\renewcommand {\a} {\vec{a}} % acceleration [m/s^2]
\newcommand {\vGamma} {\gvec{\Gamma}} % torque [N m]
\renewcommand {\L} {\vec{L}} % angular momentum [kg m^2 / s]
\newcommand {\mI} {\mat{I}} % moment of inertia tensor [kg m^2/rad]
\newcommand {\vw} {\gvec{\omega}} % angular velocity vector [rad/s]
\newcommand {\valpha} {\gvec{\alpha}} % angular acceleration vector [rad/s^2]
% electromagnetics
% fields
\newcommand {\E} {\vec{E}} % electric field intensity [V/m]
\renewcommand {\H} {\vec{H}} % magnetic field intensity [A/m]
\newcommand {\D} {\vec{D}} % electric flux density [C/m^2]
\newcommand {\B} {\vec{B}} % magnetic flux density [Wb/m^2]
% potentials
\newcommand {\A} {\vec{A}} % vector potential [Wb/m], [C/m]
% \F % electric vector potential [C/m], aliased
% sources
\newcommand {\I} {\vec{I}} % line current density [A] , [V]
\newcommand {\J} {\vec{J}} % surface current density [A/m] , [V/m]
\newcommand {\K} {\vec{K}} % volume current density [A/m^2], [V/m^2]
% \M % magnetic current [V/m^2], aliased, obsolete
% materials
\newcommand {\ep} {\epsilon} % permittivity [F/m]
% \mu % permeability [H/m], aliased
\renewcommand {\P} {\vec{P}} % polarization [C/m^2], [Wb/m^2]
% \p % electric dipole moment [C m], aliased
\newcommand {\M} {\vec{M}} % magnetization [A/m], [V/m]
\newcommand {\m} {\vec{m}} % magnetic dipole moment [A m^2]
% power
\renewcommand {\S} {\vec{S}} % poynting vector [W/m^2]
\newcommand {\Sa} {\aa{\vec{S}}_t} % time averaged poynting vector [W/m^2]
% quantum mechanics
\newcommand {\bra} [1] {\left\langle {#1} \right|} % <|
\newcommand {\ket} [1] {\left| {#1} \right\rangle} % |>
\newcommand {\braket} [2] {\left\langle {#1} \middle| {#2} \right\rangle}
$
This is a brief review of calculus. This needs a lot of work.
Limits
$$
\lim_{x \rightarrow c} f(x) = L
\Leftrightarrow
[\forall \epsilon > 0, \exists \delta > 0, \forall x \in D] [0 < \nn{x - c} < \delta \Rightarrow \nn{f(x) - L} < \epsilon]
$$
$$
L = \lim_{x \rightarrow c} f(x)
$$
$$
\lim_{x \rightarrow c} [\alpha f(x) + \beta g(x)]
= \alpha \bb{\lim_{x \rightarrow c} f(x)} + \beta \bb{\lim_{x \rightarrow c} g(x)}
$$
$$
\lim_{x \rightarrow c} [f(x) g(x)]
= \bb{\lim_{x \rightarrow c} f(x)} \bb{\lim_{x \rightarrow c} g(x)}
$$
$$
f(c) = \lim_{x \rightarrow c} f(x)
$$
Derivatives
Derivatives quantify rates of change of a function with respect to a dependent variable.
Definition
The derivative of function $f: \setR \rightarrow \setR$
$$
\boxed{
\od{}{x} f(x) \equiv \lim_{\Delta x \rightarrow 0} \q{f(x + \Delta x) - f(x)}{\Delta x}
}
$$
Linearity
$$
\boxed{
\od{}{x}[\alpha f(x) + \beta g(x)] = \alpha \od{f}{x} + \beta \od{g}{x}
}
$$
Product Rule
$$
\lim_{\Delta x \rightarrow 0} \q{\Delta[f g]}{\Delta x}
= \lim_{\Delta x \rightarrow 0} \q{[f + \Delta f][g + \Delta g] - f g}{\Delta x}
= \lim_{\Delta x \rightarrow 0} \bb{\q{\Delta f}{\Delta x} g + f \q{\Delta g}{\Delta x} + \q{\Delta f \Delta g}{\Delta x}}
$$
$$
\boxed{
\od{}{x} [f g] = \od{f}{x} g + f \od{g}{x}
}
$$
Chain Rule
$$
\lim_{\Delta x \rightarrow 0} \q{\Delta [f(g(x))]}{\Delta x}
=
\lim_{\Delta x \rightarrow 0}
\bb{\q{g(x + \Delta x) - g(x)}{\Delta x}}
\bb{\q{f(g(x + \Delta x)) - f(g(x))}{g(x + \Delta x) - g(x)}}
$$
$$
\boxed{
\od{}{x} f(g(x)) = \od{g}{x} \od{f}{g}
}
$$
Useful Derivatives
$$
\od{}{x} x^n = n x^{n - 1}
$$
$$
\od{}{x} \sin x = \cos x
$$
$$
\od{}{x} \cos x = -\sin x
$$
$$
\od{}{x} e^x = e^x
$$
Integrals
Definition
$$
\boxed{
\int_a^b f(x) dx \equiv \lim_{\Delta x_i \rightarrow 0}\sum_i f(x_i) \Delta x_i
}
$$
Properties
Linearity
$$
\boxed{
\int_a^b [\alpha f(x) + \beta g(x)] dx = \alpha \int_a^b f(x) dx + \beta \int_a^b g(x) dx
}
$$
$$
\boxed{
\int_a^c f dx = \int_a^b f dx + \int_b^c f dx
}
$$
$$
\boxed{
-\int_a^b f dx = \int_b^a f dx
}
$$
Delta Distribution
$$
f(x) = \int_{-\infty}^\infty f(x') \delta(x' - x) dx'
$$
Fundamental Theorem
$$
\boxed{
F(x) = \int_{x_0}^x f(x') dx'
}
$$
$$
F(x + \Delta x) - F(x)
= \bb{\int_{x_0}^{x + \Delta x} f dx'} - \bb{\int_{x_0}^x f dx'}
= \int_x^{x + \Delta x} f dx'
= f(c) \Delta x
$$
$$
\od{F}{x} = \lim_{\Delta x \rightarrow 0} \q{F(x + \Delta x) - F(x)}{\Delta x} = f(x)
$$
$$
\boxed{
f(x) = \od{}{x} \int_{x_0}^x f(x') dx'
}
$$
$$
\boxed{
\int_a^b f(x) dx = F(b) - F(a)
}
$$
Integration by Parts
$$
\int_a^b \bb{\od{f}{x} g + f \od{g}{x}} dx = \int_a^b \od{}{x} [f g] dx = f g |_{x=a}^b
$$
$$
\boxed{
\int_a^b f \od{g}{x} dx = f g |_a^b -\int_a^b \od{f}{x} g dx
}
$$
Integration by Substitution
$$
\int_a^b f(u(x)) \od{u}{x} dx
= \int_a^b \od{}{x} [F(u(x))] dx
= F(u(b)) - F(u(a)) = \int_{u(a)}^{u(b)} f(u) du
$$
$$
\boxed{
\int_a^b f(u(x)) \od{u}{x} dx = \int_{u(a)}^{u(b)} f(u) du \quad\text{where}\quad u(x),\; du = \od{u}{x} dx
}
$$
Taylor Expansion
$$
f(x) = \sum_{n = 0}^\infty \alpha_n [x - x_0]^n
$$
$$
f(x_0) = \alpha_0 + \alpha_1 0^1 + \alpha_2 0^2 + \alpha_3 0^3 + \alpha_4 0^4 \dots
$$
$$
\od{f}{x}(x_0) = \alpha_1 1 + \alpha_2 2 \cdot 0^1 + \alpha_3 3 \cdot 0^2 + \alpha_4 4 \cdot 0^3 \dots
$$
$$
\odn{f}{x}{2}(x_0) = \alpha_2 2 \cdot 1 + \alpha_3 3 \cdot 2 \cdot 0^1 + \alpha_4 4 \cdot 3 \cdot 0^2 + \dots
$$
$$
\boxed{
f(x) = \sum_{n = 0}^\infty \q{1}{n!} \odn{f}{x}{n} (x_0) [x - x_0]^n
}
$$
$n! \equiv \prod_{m=1}^n m$
$$
\cos x = \sum_{n = 0}^{\infty} [-1]^n \q{x^{2n}}{[2n]!} = \q{x^0}{0!} - \q{x^2}{2!} + \q{x^4}{4!} - \q{x^6}{6!} + O(x^8)
$$
$$
\sin x = \sum_{n = 0}^{\infty} [-1]^n \q{x^{2n + 1}}{[2n + 1]!} = \q{x^1}{1!} - \q{x^3}{3!} + \q{x^5}{5!} - \q{x^7}{7!} + O(x^9)
$$
$$
e^x = \sum_{n = 0}^{\infty} \q{x^n}{n!} = \q{x^0}{0!} + \q{x^1}{1!} + \q{x^2}{2!} + \q{x^3}{3!} + O(x^4)
$$
$$
e^{j x} = \sum_{n=0}^{\infty} \q{[j x]^n}{n!} = \q{x^0}{0!} + j \q{x^1}{1!} - \q{x^2}{2!} - j \q{x^3}{3!} + O(x^4)
$$
$$
\boxed{
e^{j \phi} = \cos \phi + j \sin \phi
}
$$
$$
[1 + x]^p = \sum_{n=0}^{\infty} \begin{pmatrix} p \\ n \end{pmatrix} x^n
\quad\text{where}\quad
\begin{pmatrix} p \\ n \end{pmatrix}
\equiv
\q{1}{n!} \prod_{m=1}^n [p - m + 1]
$$
$$
[1 + x]^{\q{1}{2}} = 1 + \q{1}{2} x - \q{1}{8} x^2 + \q{1}{16} x^3 + O(x^4)
$$
Complexity
$$
f(x) = O(c(x)) \Leftrightarrow x \geq x_0 \wedge f(x) \leq k c(x)
$$
$$
f(x) = \Omega(c(x)) \Leftrightarrow x \geq x_0 \wedge f(x) \geq k c(x)
$$
$$
f(x) = \Theta(c(x)) \Leftrightarrow f(x) = O(c(x)) = \Omega(c(x))
$$
$$
f(x) = o(c(x)) \Leftrightarrow f(x) = O(c(x)) \neq \Omega(c(x))
$$
2nd Order ODE
$$
\bb{a \odn{}{t}{2} + b \od{}{t} + c} f(t) = s(t)
$$
remember to talk about BCs