Calculus

Differentiation

Definition

Trigonometric functions

ddxsin⁡x=cos⁡xddxcos⁡x=−sin⁡xddxtan⁡x=sec⁡2xddxcot⁡x=−csc⁡2xddxsec⁡x=sec⁡xtan⁡xddxcsc⁡x=−csc⁡xcot⁡x\begin{aligned}\frac{d}{dx}\sin x &= \cos x\\\frac{d}{dx}\cos x &= -\sin x\\\frac{d}{dx}\tan x &= \sec^2 x\\\frac{d}{dx}\cot x &= -\csc^2 x\\\frac{d}{dx}\sec x &= \sec x \tan x\\\frac{d}{dx}\csc x &= -\csc x \cot x\end{aligned}

Integral

Newton-Leibniz

∫abf(x)dx=F∣ab=F(b)−F(a)\begin{aligned}\int_a^b f(x) dx = F \big\vert_a^b = F(b) - F(a)\end{aligned}

Symmetry

∫abf(x)dx=∫aa+b2[f(a+b−x)+f(x)]dx=∫a+b2b[f(a+b−x)+f(x)]dx\begin{aligned}\int_a^b f(x) dx &= \int_a^{\frac{a+b}{2}} \left[f(a+b-x) + f(x)\right] dx\\&= \int_{\frac{a+b}{2}}^b \left[f(a+b-x) + f(x)\right] dx\end{aligned}

Particularly when a=−ba = -b, we have

∫−bbf(x)dx=∫0b[f(x)+f(−x)]dx={0,f(x)=−f(−x);2∫0bf(x)dx,f(x)=f(−x).\begin{aligned}\int_{-b}^b f(x) dx &= \int_0^b \left[ f(x) + f(-x) \right] dx\\&= \begin{cases} 0, & f(x) = -f(-x); \\ 2\int_0^b f(x) dx, & f(x) = f(-x). \end{cases}\end{aligned}

Multiple integral

Double integral

  • For a 2D region DD parameterized by {a≤x≤by1(x)≤y≤y2(x)\begin{cases} a \leq x \leq b \\ y_1(x) \leq y \leq y_2(x)\end{cases}, if function f(x,y)f(x, y) is integrable on DD, then

    ∬Df(x,y)dxdy=∫abdx∫y1(x)y2(x)f(x,y)dy.\begin{aligned}\iint_D f(x, y)dxdy = \int_a^b dx \int_{y_1(x)}^{y_2(x)} f(x, y) dy.\end{aligned}
  • For a 2D region DD parameterized by {c≤y≤dx1(y)≤x≤x2(y)\begin{cases} c \leq y \leq d \\ x_1(y) \leq x \leq x_2(y)\end{cases}, if function f(x,y)f(x, y) is integrable on DD, then

    ∬Df(x,y)dxdy=∫cddy∫x1(y)x2(y)f(x,y)dx.\begin{aligned}\iint_D f(x, y)dxdy = \int_c^d dy \int_{x_1(y)}^{x_2(y)} f(x, y) dx.\end{aligned}
  • Given a 2D region parameterized by {x=x(u,v)y=y(u,v)\begin{cases} x = x(u, v) \\ y = y(u, v) \end{cases}, if x(u,v)x(u,v) and y(u,v)y(u,v) are continuous and differentiable, and Jacobian determinant J=∣D(x,y)D(u,v)∣=∣∂x∂u∂x∂v∂y∂u∂y∂v∣≠0J = \left| \cfrac{D(x,y)}{D(u,v)} \right| = \begin{vmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{vmatrix} \neq 0, then we have

    ∬D(x,y)f(x,y)dxdy=∬D(u,v)f(x(u,v),y(u,v))∣J∣dudv,\begin{aligned}\iint_{D(x, y)} f(x,y)dxdy = \iint_{D(u, v)} f \left(x(u, v), y(u, v)\right) |J| dudv,\end{aligned}

    where D(u,v)D(u, v) is an one-to-one mapping of D(x,y)D(x, y).

    • Particularly, for the transformation from Cartesian to polar coordinate systems, {x=rcos⁡θy=rsin⁡θ\begin{cases} x = r\cos\theta \\ y = r\sin\theta \end{cases}, we have J=rJ = r and

      ∬D(x,y)f(x,y)dxdy=∬D(r,θ)f(rcos⁡θ,rsin⁡θ)rdrdθ.\begin{aligned}\iint_{D(x, y)} f(x,y)dxdy = \iint_{D(r, \theta)} f(r\cos\theta, r\sin\theta) rdrd\theta.\end{aligned}

Triple integral

  • For a 3D region VV parameterized by {a≤x≤by1(x)≤y≤y2(x)z1(x,y)≤z≤z2(x,y)\begin{cases} a \leq x \leq b \\ y_1(x) \leq y \leq y_2(x) \\ z_1(x,y) \leq z \leq z_2(x,y)\end{cases}, if function f(x,y,z)f(x, y, z) is integrable on VV, then

    ∭Vf(x,y,z)dxdydz=∫abdx∫y1(x)y2(x)dy∫z1(x,y)z2(x,y)f(x,y,z)dz.\begin{aligned}\iiint_V f(x,y,z)dxdydz = \int_a^b dx \int_{y_1(x)}^{y_2(x)} dy \int_{z_1(x,y)}^{z_2(x,y)} f(x, y, z)dz.\end{aligned}
  • Given a 3D region parameterized by {x=x(u,v,w)y=y(u,v,w)z=z(u,v,w)\begin{cases} x = x(u, v, w) \\ y = y(u, v, w) \\ z = z(u, v, w) \end{cases}, if x(u,v,w)x(u,v,w), y(u,v,w)y(u,v,w), and z(u,v,w)z(u,v,w) are continuous and differentiable, and Jacobian determinant J=∣D(x,y,z)D(u,v,w)∣=∣∂x∂u∂x∂v∂x∂w∂y∂u∂y∂v∂y∂w∂z∂u∂z∂v∂z∂w∣≠0J = \left| \cfrac{D(x,y,z)}{D(u,v,w)} \right| = \begin{vmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} & \frac{\partial x}{\partial w} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} & \frac{\partial y}{\partial w} \\ \frac{\partial z}{\partial u} & \frac{\partial z}{\partial v} & \frac{\partial z}{\partial w}\end{vmatrix} \neq 0, then we have

    ∭V(x,y,z)f(x,y,z)dxdydz=∭V(u,v,w)f(x(u,v,w),y(u,v,w),z(u,v,w))∣J∣dudvdw,\begin{aligned}\iiint_{V(x, y, z)} f(x,y,z)dxdydz = \iiint_{V(u,v,w)} f \left( x(u,v,w), y(u,v,w), z(u,v,w) \right) |J| dudvdw,\end{aligned}

    where V(u,v,w)V(u,v,w) is an one-to-one mapping of V(x,y,z)V(x,y,z).

    • Particularly, for the transformation from Cartesian to cylindrical coordinate systems, {x=rcos⁡θy=rsin⁡θ\begin{cases} x = r\cos\theta \\ y = r\sin\theta \end{cases}, we have J=rJ = r and

      ∭V(x,y,z)f(x,y,z)dxdydz=∭V(r,θ,z)f(rcos⁡θ,rsin⁡θ,z)rdrdθdz.\begin{aligned}\iiint_{V(x, y, z)} f(x,y,z)dxdydz = \iiint_{V(r, \theta, z)} f(r\cos\theta, r\sin\theta, z) rdrd\theta dz.\end{aligned}
    • Particularly, for the transformation from Cartesian to spherical coordinate systems, {x=rsin⁡θcos⁡ϕy=rsin⁡θsin⁡ϕz=rcos⁡θ\begin{cases} x = r\sin\theta\cos\phi \\ y = r\sin\theta\sin\phi \\ z = r\cos\theta\end{cases}, we have J=r2sin⁡θJ = r^2 \sin\theta and

      ∭V(x,y,z)f(x,y,z)dxdydz=∭V(r,θ,ϕ)f(rsin⁡θcos⁡ϕ,rsin⁡θsin⁡ϕ,rcos⁡θ)r2sin⁡θdrdθdϕ.\begin{aligned}\iiint_{V(x, y, z)} f(x,y,z)dxdydz = \iiint_{V(r, \theta, \phi)} f(r\sin\theta\cos\phi, r\sin\theta\sin\phi, r\cos\theta) r^2\sin\theta drd\theta d\phi.\end{aligned}

Line integral

A line integral means to integrate a scalar function or a vector field over a smooth curve in a plane or space. The former is termed scalar line integral or 1st type of line integral, while the latter is termed vector line integral or 2nd type of line integral.

Curve parameterization

Generally, a smooth curve can be parameterized by

r(t)=[x(t)y(t)z(t)],a≤t≤b.\begin{aligned}\mathbf{r}(t) = \begin{bmatrix} x(t) \\ y(t) \\ z(t) \end{bmatrix}, \quad a \le t \le b.\end{aligned}
Regular parameterization

∀t∈[a,b]\forall t\in [a, b], if r′(t)≠0\mathbf{r}^\prime(t) \neq \mathbf{0}, the parameterization is regular or smooth. The regularity ensures r\mathbf{r} is a curve, but not just a point.

Scalar line integral

Given a smooth curve CC between AA and BB parameterized by {x=x(t)y=y(t)z=z(t)\begin{cases}x = x(t)\\ y = y(t)\\ z = z(t)\end{cases}, tA≤t≤tBt_A \leq t \leq t_B, if integrand f(x,y,z)f(x, y, z) is continuous over CC, then

∫Cf(x,y,z)ds=∫tAtBf(x(t),y(t),z(t))x′2(t)+y′2(t)+z′2(t)dt,\begin{aligned}\int_Cf(x,y,z)ds = \int_{t_A}^{t_B} f(x(t), y(t), z(t)) \sqrt{x^{\prime 2}(t) + y^{\prime 2}(t) + z^{\prime 2}(t)} dt,\end{aligned}

where ds≜∥[dxdydz]∥=∥[x′(t)y′(t)z′(t)]∥dt=x′2(t)+y′2(t)+z′2(t)dtds \triangleq \left\| \begin{bmatrix}dx \\ dy \\ dz\end{bmatrix}\right\| = \left\|\begin{bmatrix} x^{\prime}(t) \\ y^{\prime}(t) \\ z^{\prime}(t) \end{bmatrix}\right\|dt = \sqrt{x^{\prime 2}(t) + y^{\prime 2}(t) + z^{\prime 2}(t)} dt is the arc length unit.

For scalar line integral, neither the orientation nor the parameterization of the curve matters, i.e., ∫AB⌢f(x,y,z)ds=∫BA⌢f(x,y,z)ds\int_{\overset{\frown}{AB}} f(x,y,z)ds = \int_{\overset{\frown}{BA}} f(x,y,z)ds.

Vector line integral

Given a smooth and oriented curve CC from AA to BB parameterized by {x=x(t)y=y(t)z=z(t)\begin{cases}x = x(t)\\ y = y(t)\\ z = z(t)\end{cases}, if a vector field F=[P(x,y,z)Q(x,y,z)R(x,y,z)]\mathbf{F} = \begin{bmatrix} P(x,y,z) \\ Q(x,y,z) \\ R(x,y,z)\end{bmatrix} is continuous over CC, then

∫CF⋅dr=∫CPdx+Qdy+Rdz=∫tAtBPx′(t)+Qy′(t)+Rz′(t)dt=∫CF⋅Tds,\begin{aligned}\int_C \mathbf{F} \cdot d\mathbf{r} &= \int_C Pdx + Qdy + Rdz = \int_{t_A}^{t_B} Px^{\prime}(t) + Qy^{\prime}(t) + Rz^{\prime}(t) dt\\&= \int_C \mathbf{F} \cdot \mathbf{T} ds,\end{aligned}

where

  • dr≜[dxdydz]=r′(t)dt=Tdsd\mathbf{r} \triangleq \begin{bmatrix} dx \\ dy \\ dz \end{bmatrix} = \mathbf{r}^{\prime}(t)dt = \mathbf{T} ds is the arc unit;
  • r′(t)≜[x′(t)y′(t)z′(t)]\mathbf{r}^{\prime}(t) \triangleq \begin{bmatrix} x^{\prime}(t) \\ y^{\prime}(t) \\ z^{\prime}(t) \end{bmatrix};
  • T≜r′(t)∥r′(t)∥\mathbf{T} \triangleq \cfrac{\mathbf{r}^{\prime}(t)}{\|\mathbf{r}^{\prime}(t)\|} is the unit tangent vector along CC;
  • ds≜∥dr∥=∥r′(t)∥dtds \triangleq \|d\mathbf{r}\| = \|\mathbf{r}^{\prime}(t)\| dt is the arc length unit.

For vector line integral, the orientation of the curve does matter, i.e., ∫AB⌢F⋅dr=−∫BA⌢F⋅dr\int_{\overset{\frown}{AB}} \mathbf{F} \cdot d\mathbf{r} = -\int_{\overset{\frown}{BA}} \mathbf{F} \cdot d\mathbf{r}.

Orientation

For a scalar line integral, neither the orientation nor the parameterization of a curve matters. So long as the curve is traversed once by the parameterization, the value of the line integral is unchanged. Differently, the orientation of a curve indeed matters for a vector line integral.

For an oriented curve CC and a same curve but with reversed orientation −C-C, following equation holds.

∫−CF⋅dr=−∫CF⋅dr.\begin{aligned}\int_{-C} \mathbf{F} \cdot d\mathbf{r} = -\int_C \mathbf{F} \cdot d\mathbf{r}.\end{aligned}

Surface integral

A surface integral means to integrate a scalar function or a vector field over a smooth surface in space. A surface integral is very similar to a line integral, and the only difference lies the integration is performed over a surface rather than a path. If the integrand is a scalar function, the integral is termed scalar surface integral or 1st type of surface integral; if the integrand is a vector field, the integral is termed vector surface integral or 2nd type of surface integral.

Surface parameterization

Generally, a surface can be parameterized by

r(u,v)=[x(u,v)y(u,v)z(u,v)],\begin{aligned}\mathbf{r}(u,v) = \begin{bmatrix} x(u,v) \\ y(u,v) \\ z(u,v) \end{bmatrix},\end{aligned}

with 2 parameters uu and vv involved since a surface is 2 dimensional.

For example, a sphere of radius ρ\rho centered at the origin can be parameterized by

r(θ,ϕ)=[ρsin⁡θcos⁡ϕρsin⁡θsin⁡ϕρcos⁡θ];0≤θ≤π,0≤ϕ≤2π.\begin{aligned}\mathbf{r}(\theta, \phi) = \begin{bmatrix} \rho\sin\theta\cos\phi \\ \rho\sin\theta\sin\phi \\ \rho\cos\theta\end{bmatrix}; \quad 0 \le \theta \le \pi, 0 \le \phi \le 2\pi.\end{aligned}
Regular parameterization

∀(u,v)\forall(u, v), if cross product ru×rv≠0\mathbf{r}_u \times \mathbf{r}_v \neq \mathbf{0}, the parameterization is regular or smooth. Similarly, the regularity ensures r(u,v)\mathbf{r}(u,v) is a surface, but not just a curve or even point.

Scalar surface integral

Given a smooth surface SS, if integrand f(x,y,z)f(x, y, z) is continuous over SS, then

∬Sf(x,y,z)dS=∬D(u,v)f(x(u,v),y(u,v),z(u,v))∥tu×tv∥dudv=∬D(x,y)f(x,y,z)1+zx2+zy2dxdy=∬D(y,z)f(x,y,z)1+xy2+xz2dydz=∬D(x,z)f(x,y,z)1+yx2+yz2dxdz,\begin{aligned}\iint_Sf(x, y, z)dS &= \iint_{D(u,v)}f(x(u,v),y(u,v),z(u,v))\|\mathbf{t}_u \times \mathbf{t}_v\|dudv\\&= \iint_{D(x,y)}f(x, y, z)\sqrt{1 + z_x^2 + z_y^2}dxdy\\&= \iint_{D(y,z)}f(x, y, z)\sqrt{1 + x_y^2 + x_z^2}dydz\\&= \iint_{D(x,z)}f(x, y, z)\sqrt{1 + y_x^2 + y_z^2}dxdz,\end{aligned}

where

  • Tangent vectors tu≜[∂x∂u,∂y∂u,∂z∂u]\mathbf{t}_u \triangleq \begin{bmatrix} \cfrac{\partial x}{\partial u}, \cfrac{\partial y}{\partial u}, \cfrac{\partial z}{\partial u} \end{bmatrix} and tv≜[∂x∂v,∂y∂v,∂z∂v]\mathbf{t}_v \triangleq \begin{bmatrix} \cfrac{\partial x}{\partial v}, \cfrac{\partial y}{\partial v}, \cfrac{\partial z}{\partial v} \end{bmatrix} span the tangent plane.
  • dS≜∥tu×tv∥dudv=1+zx2+zy2dxdy=1+xy2+xz2dydz=1+yx2+yz2dxdzdS \triangleq \left\|\mathbf{t}_u \times \mathbf{t}_v \right\|dudv = \sqrt{1 + z_x^2 + z_y^2}dxdy = \sqrt{1 + x_y^2 + x_z^2}dydz = \sqrt{1 + y_x^2 + y_z^2}dxdz is the surface area unit.

Vector surface integral

Given a smooth surface SS, if a vector field F=[P(x,y,z)Q(x,y,z)R(x,y,z)]\mathbf{F} = \begin{bmatrix} P(x,y,z) \\ Q(x,y,z) \\ R(x,y,z)\end{bmatrix} is continuous over SS, then,

∬SF⋅dS=∬SPdydz+Qdxdz+Rdxdy=∬SPcos⁡α+Qcos⁡β+Rcos⁡γdS=∬SF⋅ndS,\begin{aligned}\iint_S \mathbf{F} \cdot d\mathbf{S} &= \iint_S Pdydz + Qdxdz + Rdxdy = \iint_S P\cos\alpha + Q\cos\beta + R\cos\gamma dS\\&= \iint_S \mathbf{F} \cdot \mathbf{n} dS,\end{aligned}

where

  • dS≜[dydzdxdzdxdy]=ndSd\mathbf{S} \triangleq \begin{bmatrix}dydz \\ dxdz \\ dxdy\end{bmatrix} = \mathbf{n}dS is the surface unit.
  • n=[cos⁡αcos⁡βcos⁡γ]\mathbf{n} = \begin{bmatrix}\cos\alpha \\ \cos\beta \\ \cos\gamma \end{bmatrix} is the unit normal vector; cos⁡α\cos\alpha, cos⁡β\cos\beta, cos⁡γ\cos\gamma are direction cosines; α\alpha, β\beta, γ\gamma are the angles relative to xx, yy, zz axes respectively.
  • dS≜∥dS∥=∥[dydzdxdzdxdy]∥dS \triangleq \|d\mathbf{S}\| = \left\| \begin{bmatrix}dydz \\ dxdz \\ dxdy\end{bmatrix}\right\| is the surface area unit.
Orientation

Similar to vector line integrals, we need to define an oriented surface for a surface integral of a vector field. The orientation means upward/downward for an oriented surface, or outward/inward for a sphere or a cylinder.

For a closed surface, e.g., sphere, we define outward unit normal vector as positive orientation; while for a portion of a graph, we define upward unit normal vector as positive orientation.

Maximum and minimum values

For a differentiable function f:Rn→Rf: \mathbb{R}^{n} \to \mathbb{R}, zero gradient is the necessary condition of an extreme point.

  • If Hessian matrix at an extreme point x0\mathbf{x}_0 is positive definite, i.e., ∇f(x0)=0\nabla f(\mathbf{x}_0) = \mathbf{0}, H(x0)≻0\mathbf{H}(\mathbf{x}_0) \succ 0, the extreme point corresponds with a local minimum.
  • If Hessian matrix at an extreme point x0\mathbf{x}_0 is negative definite, i.e., ∇f(x0)=0\nabla f(\mathbf{x}_0) = \mathbf{0}, H(x0)≺0\mathbf{H}(\mathbf{x}_0) \prec 0, the extreme point corresponds with a local maximum.