0.1 Important notions
- Functions. \(\mathbb{R}^n\to \mathbb{R}\)
- send points to numbers (scalars)
- Curves. \(I \to \mathbb{R}^n\)
- send numbers to points (in space)
- Vector fields. \(\mathbb{R}^n \to \mathbb{R}^n\)
- sends points to vectors (in the same dimension)
1 Baby linear algebra and geometry
1.1 Babby’s first vectors
Read \(\operatorname{comp}_{\mathbf{a}} \mathbf{b}, \operatorname{proj}_{\mathbf{a}} \mathbf{b}\) leftwards as component/projection of \(\mathbf{b}\) on \(\mathbf{a}\). \[\begin{align*} \operatorname{comp}_{\mathbf{a}} \mathbf{b} &= \frac{\mathbf{a}\cdot\mathbf{b}}{\left\lVert \mathbf{a} \right\rVert} \\ \operatorname{proj}_{\mathbf{a}} \mathbf{b} &= \frac{\mathbf{a}\cdot\mathbf{b}}{\mathbf{a}\cdot\mathbf{a}} \\ \mathbf{a}\cdot\mathbf{b} &= \left\lVert \mathbf{a} \right\rVert\left\lVert \mathbf{b} \right\rVert \cos \theta \\ \left\lVert \mathbf{a} \right\rVert^2 &= \mathbf{a}\cdot\mathbf{a} \\ \left\lVert \mathbf{a}\times\mathbf{b} \right\rVert &= \left\lVert \mathbf{a} \right\rVert\left\lVert \mathbf{b} \right\rVert \sin\theta \end{align*}\]
- Use \(\times\) to find area of parallelogram or shortest distance to line from point (divide by \(\left\lVert \mathbf{a} \right\rVert\)).
- When doing cross product remember to minus the \(\mathbf{j}\) term!
- The \(\cdot\) and \(\times\) operators are bilinear.
- Triple product = determinant of \(3\) vectors.
1.2 (Translated) subspaces
Any hyperspace can be described by a normal vector \(\mathbf{n}\). Equation of any hyperspace can be given by \(\mathbf{r}\cdot\mathbf{n} = 0\), translation gives \(\mathbf{n}\cdot\mathbf{r} = \mathbf{n}\cdot\mathbf{r}_0\) where \(\mathbf{r}_0\) is the position vector of any given point in the hyperspace.
- Angle between hyperspaces = angle between their normals.
- Shortest distance between \(Q\) and \(\Pi\) = \(\operatorname{comp}_{\mathbf{n}} \overrightarrow{AQ}\) on \(\mathbf{n}\) where \(A\in \Pi\).
1.3 Vector functions
- Differentiate vector \(\mathbf{r}(t)\) component-wise.
- Product rule generalises to \(\cdot\) and \(\times\), proof by bloody expansion.
- Arc length formula. For arc traced by \(\mathbf{r}(t)\), from \(a \leq t \leq b\), arc length is \(\int_a^b \left\lVert \mathbf{r}'(t) \right\rVert \ dt\).
2 Surfaces & Multivariable functions
- Cylinder.
- Exists plane \(\Pi\) such that all planes parallel to \(\Pi\) intersect \(S\) in the same curve. (Common cylinders are those with a free variable.)
Quadric surface | Shape | Properties |
---|---|---|
\(x^2 + y^2 = z\) | Elliptic paraboloid | Opens up on the axis of the linear variable |
\(x^2 - y^2 = z\) | Hyperbolic paraboloid | “Saddle” opens up the direction of the linear variable |
\(x^2 + y^2 + z^2=1\) | Ellipsoid | Nothing special |
\(x^2 + y^2 - z^2=0\) | (Elliptic) cone | Opens up on the axis with negative coefficient |
\(x^2 + y^2 - z^2=1\) | 1-sheet hyperboloid | \(\uparrow\) same |
\(x^2 + y^2 - z^2=-1\) | 2-sheet hyperboloid | \(\uparrow\) same |
If all else fails, fix \(1\) variable and trace the other two.
3 Limits & Continuity
- To show limit does not exist at \(\mathbf{a}\), trace along several different paths (any line that passes through \(\mathbf{a}\) will do) and get a contradiction (not well-defined).
- To show limit exist, use limit laws or squeeze.
On limit laws: for \(\left\{\, \text{functions of }\mathbf{x}\text{ with limit at }\mathbf{a} \,\right\}\),- \(\lim_{\mathbf{x}\to\mathbf{a}}\) is linear.
- \(\lim_{\mathbf{x}\to\mathbf{a}}\) respects \(\cdot\) and \(/\) provided \(\lim\) denominator is not \(0\).
- \(f\) is continuous at \(\mathbf{a}\) iff substitution property \[ \lim_{\mathbf{x} \to \mathbf{a}} f(\mathbf{x}) = f(\mathbf{a}) \]
- Subspace of continuous functions is closed under \(\pm,\cdot,/\) and \(\circ\).
- Standard continuous functions are polynomials, trig, exp and rational functions.
4 Differential Calculus
4.1 Partial derivatives
Suppose \(f: \mathbb{R}^n \to \mathbb{R}\), let \((e_i)_{i=1,2,\dots,n}\) be standard basis for \(\mathbb{R}^n\). \[D_i f = \frac{\partial f}{\partial e_i} =_{\text{def}} \lim_{h\to 0} \frac{f(\mathbf{v} + he_i) - f(\mathbf{v})}{h}.\] When differentiating normally is too hard use \(\uparrow\).
Clairaut’s Theorem. Partial differentiation operators commute. \(\forall i,j.~ D_i D_j = D_j D_i\).
4.2 Differentiability and linear approximation
\(f: \mathbb{R}^n \to \mathbb{R}\) is differentiable at \(\mathbf{a}\) iff
- all the partial derivatives \(D_1 f,\dots,D_n f\) (these terms are in fact limits) exist at the point \(\mathbf{a}\), and
- there exists a function \(\varepsilon: \mathbb{R}^n \to \mathbb{R}^n\) (defined for small \(\mathbf{h}\) such that) \[\lim_{\mathbf{h}\to\mathbf{0}} \varepsilon(\mathbf{h}) = \mathbf{0},\quad\textbf{and}\] \[f(\mathbf{a} + \mathbf{h}) - f(\mathbf{a}) = \nabla f(\mathbf{a})\cdot \mathbf{h} + \varepsilon(\mathbf{h})\cdot \mathbf{h}\] post-composing \(\varepsilon\) with tuple-selection map will give \(n\) functions, and
- in \(2\) variables where \(\mathbf{h} = (\Delta x, \Delta y)\), it simplifies to Stewart’s shit-tier definition \[\Delta z = f_x \Delta x + f_y \Delta y + \varepsilon_1(\mathbf{h}) \Delta x + \varepsilon_2(\mathbf{h}) \Delta y\]
On differentiability, only these implications hold, at a point \(\mathbf{x}\in \mathbb{R}^n\),
- all partial derivatives continuous at \(\mathbf{x}\) \(\implies\) \(f\) differentiable at \(\mathbf{x}\),
- \(f\) differentiable \(\implies\) \(f\) continuous,
- \(f\) differentiable \(\implies\) all partial derivatives exist.
Suppose \(f\) is differentiable at \(\mathbf{a}\), then for a small vector \(\mathbf{h}\), \[ f(\mathbf{a} + \mathbf{h}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot \mathbf{h} \]
4.3 Chain rule
\(f\) is a differentiable function, \(\mathbf{r}(t)\) is a differentiable curve. Then \(f(\mathbf{r}(t))\) is differentiable and \[ \frac{df(\mathbf{r}(t))}{dt} = \nabla f(\mathbf{r}(t))\cdot \mathbf{r}'(t),\] or in terms of coordinates, if \(\mathbf{r}(t) = \left\langle r_1(t),\dots,r_n(t) \right\rangle\), \[ \frac{df(\mathbf{r}(t))}{dt} = \frac{\partial f}{\partial r_1}\frac{d r_1}{d t} + \dots + \frac{\partial f}{\partial r_n}\frac{d r_n}{d t}.\]
In general, suppose \(f(\mathbf{x}(\mathbf{t}))\) is differentiable and \(\mathbf{x}(\mathbf{t}) = \left\langle x_1(\mathbf{t}),\dots,x_n(\mathbf{t}) \right\rangle\), then \[ \frac{\partial f}{\partial t_i} = \frac{\partial f}{\partial x_1}\frac{\partial x_1}{\partial t_i} + \dots + \frac{\partial f}{\partial x_n}\frac{\partial x_n}{\partial t_i}.\] (remember as adding all paths traced from \(f\) to \(t_i\).)
- Corollary.
- \(\nabla f =_{\text{def}} \left\langle D_1f , \dots , D_nf \right\rangle\) is always normal to the level curve/surface of \(f\).
- Implicit differentiation.
- Suppose \(F(x,y,z) = 0\) implicitly defines \(z = \phi(x)\), then by chain rule (assuming \(y\) independent) \[\frac{\partial F}{\partial x} + \frac{\partial F}{\partial z}\frac{\partial z}{\partial x} = 0.\]
- Tangent Plane shortcut.
- For \(f: \mathbb{R}^2\to \mathbb{R}\), vector normal to tangent plane at \((a,b)\) is given by \[ \left\langle 1,0,f_x(a,b) \right\rangle \times \left\langle 0,1,f_y(a,b) \right\rangle = \left\langle -f_x(a,b),-f_y(a,b), 1 \right\rangle. \]
4.4 Directional derivatives
Given a unit vector \(\mathbf{u}\), the derivative of \(f\) in the direction of \(\mathbf{u}\) is \[ D_{\mathbf{u}} f =_\text{def} \nabla f \cdot \mathbf{u}.\]
Min/max rate of change of \(f\) at a point \(P\),
- max rate of change is in direction \(\nabla f\), with magnitude \(\left\lVert \nabla f(P) \right\rVert\), conversely
- min rate of change is in direction \(-\nabla f\), with magnitude \(-\left\lVert \nabla f(P) \right\rVert\)
4.5 Extrema
(Local min/max was not defined rigorously so I assume no1cur.)
- Critical point.
- \(P\) is a critical point of \(f\) if \(\nabla f(P) = \mathbf{0}\).
- Boundary point.
- \(P\) is a boundary point of \(S\) if every open ball centered at \(P\) contains a point in \(S\) and a point not in \(S\).
- Closed set.
- \(S\) is closed if it contains all boundary points.
- Bounded.
- There exists \(b\) such that for any point \(X\) in set, we have \(\left\lVert X \right\rVert \leq b\).
Extreme Value Theorem. For a function \(f\) defined on a closed and bounded set \(S\), \(f\) has global maximum and minimum in \(S\).
Closed Interval Method for \(f:D\to \mathbb{R}\), where \(D\) is closed and bounded.
- Find values of \(f\) at all critical points in \(D\).
- Trace values of \(f\) at each boundary of \(D\).
- min/max
4.5.1 Lagrange Multipliers
Suppose \(f,g\) are differentiable functions where \(\nabla g \ne \mathbf{0}\). Optimisation: find min/max \(f\) (objective) given \(g(x,y) = k\) (constraint).
- solve \(\nabla f(x,y) = \lambda \nabla g(x,y)\), where \(\lambda\) is Lagrange Multiplier to be determined.
- Evaluate \(f\) at all points found, proceed to min/max.
Higher-dimensional cases are analogous.
5 Integral Calculus
5.1 Additive property of integrals
Let \(\mathcal{F} = \left\{\, R_i \,\right\}_{i\in I}\) be a finite family of sets (regions, curves, surfaces) such that \(R_i\cap R_j\) is of measure \(0\) whenever \(i\ne j\), then \[\int_{\mathcal{F}} = \sum_{i\in I} \int_{R_i}\] (obvious from Riemann sum definition).
5.2 Double Integrals
If domain of \(f\) can be represented as \(D = \left\{\, (x,y): a\leq x\leq b, h_1(x)\leq y\leq h_2(x) \,\right\}\), then \[ \iint_D f(x,y)\ dA = \int_a^b \int_{h_1(x)}^{h_2(x)} f(x,y)\ dy\ dx.\]
5.2.1 Polar Regions
If the polar region of integral is given as \(D = \left\{\, (r,\theta): 0\leq a\leq r\leq b, h_1(r)\leq \theta\leq h_2(r) \,\right\}\) (angle depends on radius), then \[\iint_D f(r,\theta)\ dA = \int_a^b \int_{h_1(r)}^{h_2(r)} f(r, \theta)r \ d\theta\ dr.\] On the other hand when radius depends on angle, say \(D = \left\{\, (r,\theta): \alpha\leq\theta\leq\beta, h_1(\theta)\leq r\leq h_2(\theta) \,\right\}\), \[\iint_D f(r,\theta)\ dA = \int_\alpha^\beta \int_{h_1(\theta)}^{h_2(\theta)} f(r, \theta)r \ dr\ d\theta.\]
5.3 Triple Integrals
Synopsis. Reduce the triple integral into a double integral by projecting the domain of integration on a coordinate plane.
Suppose \(D\in\mathbb{R}^2\) such that \(E = \left\{\, (x,y,z): (x,y)\in D, h_1(x,y) \leq z \leq h_2(x,y) \,\right\}\), then an integral over \(E\) can be reduced to a double integral by doing \[\iiint_E f(x,y,z)\ dV = \iint_D\left[ \int_{h_1(x,y)}^{h_2(x,y)} f(x,y,z)\ dz\right]\ dA.\]
5.3.1 Cylindrical coordinates
Nothing much, use \(\uparrow\) to reduce into a double integral over polar region.
5.3.2 Spherical coordinates
\[(\rho,\theta,\phi)\mapsto (\rho\sin\phi\cos\theta,\rho\sin\phi\sin\theta,\rho\cos\phi)\]
- This shit simplifies computations involving spheres (no shit) and cones.
- the Jacobian is \[dx\ dy\ dz = \rho^2\sin\phi\ d\rho\ d\theta\ d\phi\]
6 Interlude on Linear Algebra
Suppose \(T: (u,v)\mapsto (x,y)\), then \[\iint_{T(R)} f(x,y)\ dx\ dy = \iint_{R} (f\circ T)(u,v)\left\lvert \det(T') \right\rvert\ du\ dv\] where \(T' = \displaystyle\frac{\partial (x,y)}{\partial (u,v)}\). (I need a commutative diagram for this shit.)
Find \(R\) by tracing \(T^{-1}\) along boundary regions of \(T(R)\). Higher-dimensional cases are analogous.
7 Vector Calculus
7.1 Potential functions
- Conservative.
- \(\mathbf{F}\) is a conservative vector field if there exists \(\varphi: \mathbb{R}^n\to\mathbb{R}\) such that \(\mathbf{F} = \nabla \varphi\).
- Test for conservativeness.
- Whenever \(\mathbf{F}\) is defined in an open and simply-connected (no holes) region. Suppose \(\mathbf{F} = \left\langle D_1\varphi,D_2\varphi,\dots,D_n\varphi \right\rangle\) for some \(\varphi\), then test if all 2nd-order partial derivatives of \(\varphi\) indeed commute.
- In short, \(\nabla\times\mathbf{F} = \mathbf{0}\).
- Find potential function when \(\mathbf{F}\) is defined on box.
- If eye power fails, do partial integrations on \(\mathbf{F}\).
- Fundamental Theorem for Curve Integrals.
- If there exists \(\varphi: \mathbb{R}^n\to\mathbb{R}\) such that \(\mathbf{F} = \nabla \varphi\), let \(P,Q\) be start and end of curve \(C\) respectively, then \[\int_{P,C}^Q \mathbf{F}\cdot d\mathbf{r} = \varphi(Q) - \varphi(P).\]
- Corollaries.
- When \(\mathbf{F}\) admits a potential function, integral of \(F\) is independent of the path \(C\) joining \(P\) and \(Q\).
- If \(C\) is a closed path (same start/end point) and \(\int_C \mathbf{F} \ne 0\), then \(\mathbf{F}\) is not conservative. (contrapositive)
7.2 Line & Surface integrals
Notation. Let everything be as differentiable as needed.
- \(f\) denotes a scalar field.
- \(\mathbf{F}\) denotes a vector field.
- \(C\) denotes a smooth (\(C^1\)) curve.
- Let \(\mathbf{r}(t): I\to\mathbb{R}^n\) be a parametrisation.
- \(S\) denotes a surface.
- Let \(\mathbf{r}(u,v): D \to\mathbb{R}^3\) be a parametrisation.
- Then \(\mathbf{n} = \pm \displaystyle\frac{\mathbf{r}_u \times \mathbf{r}_v}{\left\lVert \mathbf{r}_u \times \mathbf{r}_v \right\rVert}\) is a unit normal vector
Formulas will be \[\begin{gather*} \int_C f \ d\mathbf{r} = \int_I f(\mathbf{r}(t)) \left\lVert \mathbf{r}'(t) \right\rVert\ dt \tag*{(1)} \\ \int_C \mathbf{F}\cdot d\mathbf{r} = \int_I \mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\ dt \tag*{(2)} \\ \iint_S f \ dS = \iint_D f(\mathbf{r}(u,v)) \left\lVert \mathbf{r}_u \times \mathbf{r}_v \right\rVert\ dA \tag*{(3)} \\ \iint_S \mathbf{F}\cdot \ d\mathbf{S} = \iint_D \mathbf{F}(\mathbf{r}(u,v))\cdot \left(\mathbf{r}_u \times \mathbf{r}_v\right) \ dA \tag*{(4)} \end{gather*}\]
Notes.
Computationally we write (example in \(2\)-space) as symbolic shorthand \[\int_C \mathbf{F}\cdot d\mathbf{r} = \int_I f_1\ dx + f_2\ dy.\]
Computations can be skipped if \(\mathbf{F}\) is conservative, refer to section above.
Be careful of orientation conventions for \(\mathbf{n}\), possibly switching the cross product.
When \(\mathbf{r}(x,y) = \left\langle x,y,g\left(x,y\right) \right\rangle\), \(\mathbf{r}_x \times \mathbf{r}_y = \left\langle -g_x, -g_y, 1 \right\rangle\). Computationally rewrite (4) as \[\iint_S \mathbf{F}\cdot \ d\mathbf{S} = \pm \iint_D -f_1 g_x - f_2 g_y + f_3 \ dy\ dx.\]
7.3 Divergence and curl
- Divergence.
- \[\nabla\cdot \mathbf{F} = \frac{\partial f_1}{\partial x} + \frac{\partial f_2}{\partial y} + \frac{\partial f_3}{\partial z}\]
- Curl.
- \[\nabla\times \mathbf{F} = \begin{vmatrix} \mathbf{i}&\mathbf{j}&\mathbf{k}\\ \frac{\partial }{\partial x}&\frac{\partial }{\partial y}&\frac{\partial }{\partial z}\\ f_1&f_2&f_3 \end{vmatrix}\]
For any vector field \(\mathbf{F}\), \(\nabla\cdot\left(\nabla\times\mathbf{F}\right) = 0\)
7.4 Theorems that let you interchange stuff
- Green’s Theorem (2d).
- Let \(C\) be a closed path and \(A\) be region bounded by \(C\), \(\mathbf{F} = \left\langle f_1,f_2 \right\rangle\), \[\oint_C \mathbf{F} = \oint_C f_1\ dx + f_2\ dy = \iint_A \left(\frac{\partial f_2}{\partial x} - \frac{\partial f_1}{\partial y}\right) \ dy\ dx.\] Convention: \(A\) lies to the left of the curve \(C\).
- Gauss’ Divergence Theorem.
- Let \(S\) be boundary surface of \(E\) with outward orientation, then \[\iint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E \nabla\cdot\mathbf{F} \ dV.\]
- Stokes’ Theorem.
- Let \(C\) be boundary curve of surface \(S\) with unit normal \(\mathbf{n}\). Let \(C\) be positively oriented (\(\mathbf{r}'(t)\times \mathbf{n}\) points out), then \[\oint_C \mathbf{F}\cdot d\mathbf{r} = \iint_S \nabla\times\mathbf{F}\cdot d\mathbf{S}.\]
8 Trig identities
\[ \begin{pmatrix} \cos(\alpha+\beta) &-\sin(\alpha+\beta) \\ \sin(\alpha+\beta) & \cos(\alpha+\beta) \end{pmatrix} = \begin{pmatrix} \cos\alpha & -\sin\alpha \\ \sin\alpha & \cos\alpha \end{pmatrix} \begin{pmatrix} \cos\beta & -\sin\beta \\ \sin\beta & \cos\beta \end{pmatrix}\]
8.1 Pre-computing spherical stuff
Fix \(\rho\), let \(\mathbf{r}\) parametrise something, \[\begin{align*} \mathbf{r}(\phi,\theta) &= \rho\begin{pmatrix} \sin\phi\cos\theta\\ \sin\phi\sin\theta\\ \cos\phi \end{pmatrix}; & \mathbf{r}_{\phi} &= \rho\begin{pmatrix} \cos\phi\cos\theta \\ \cos\phi\sin\theta \\ -\sin\phi \end{pmatrix} & \mathbf{r}_{\theta} &= \rho\begin{pmatrix} -\sin\phi\sin\theta \\ \sin\phi\cos\theta \\ 0 \end{pmatrix} \end{align*}\] then \(\mathbf{r}_{\phi}\times \mathbf{r}_{\theta}\) points outwards, and \[\begin{align*} \mathbf{r}_{\phi}\times \mathbf{r}_{\theta} &= \rho^2 \begin{pmatrix} -\sin^2\phi \cos\theta \\ \sin^2\phi\sin\theta \\ \cos\phi\sin\phi \end{pmatrix} \end{align*}\]