Calculus: Integral

Calculus II, special thanks to professor [Wenzheng Shi](https://sites.google.com/view/wenzhengshi/) who provided me with excellent exercises!

The knowledge marked with * is not necessary in Calculus II

# WHY: Why do we want to find out the integral

  • Find out the area
  • Find out some physics parameters

# WHAT: What is integral - “Area (with positive and negative)”

# Approx. Integral

Equaling space is not necessary

Dividing a function and approx it to separated rectangles, then just calculate the areas of rectangles:

$$ S (\int_a^b{f(x)}\,\mathrm{d}x) = \lim_{n \rightarrow \infty} \sum_{i = 0}^{n - 1} \Delta x f(x_i) = \lim_{n \rightarrow \infty}{\sum_{i = 0}^{n - 1}\frac{b - a}{n}f(a + \frac{b - a}{n}i)} $$

EX-CAL-INT-01-01: Prove $\int_0^1{x^9} = \frac{1}{n}((\frac{1}{n})^9 + (\frac{2}{n})^9 + \ldots + (\frac{n}{n})^9)$

EX-CAL-INT-01-02: Prove $\ln(n + 1) < \sum_{i = 1}^{n}\frac{1}{i} < \ln{n} + 1$

  • Riemann integral: left, right, midpoint = $f((x_1 + x_2)/2)$
  • Trapezoidal = (left + right)/2
  • Simpson

$$ y = \frac{(x - x_1)(x - x_2)}{(x_0 - x_1)(x_0 - x_2)}y_0 + \frac{(x - x_2)(x - x_0)}{(x_1 - x_2)(x_1 - x_0)}y_1 + \frac{(x - x_0)(x - x_1)}{(x_2 - x_0)(x_2 - x_1)}y_2 $$ $$ if \ (-h, y_0) (0, y_1) (h, y_2) \Rightarrow \int_{-h}^{h}y\,\mathrm{d}x = \frac{h}{3}(y_0 + 4y_1 + y_2) $$ $$ \Rightarrow S = \frac{h}{3}((y_0 + 4y_1 + y_2) + (y_2 + 4y_3 + y_4) + \ldots + (y_{n - 2} + 4y_{n - 1} + y_n)) (n \ is \ even) $$

  • Error Bond

$$ E = \begin{cases} \text{Riemann} \frac{K(b - a)^3}{24n^2} (K = |f’’_{max}(x)|) \\ \text{Trapezoidal} \frac{K(b - a)^3}{12n^2} (K = |f’’_{max}(x)|) \\ \text{Simpson} \frac{K(b - a)^5}{180n^4} (K = |f^{(4)}_{max}(x)|) \end{cases} $$

# HOW: How to integral - Technique

# Substitution: If the function combines with its derivative

Based on Rules: $\displaystyle \frac{\mathrm{d}f}{\mathrm{d}x} = \frac{\mathrm{d}f}{\mathrm{d}u} \cdot \frac{\mathrm{d}u}{\mathrm{d}x} \Rightarrow \int_{x_1}^{x_2} f(x) \frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x = \int_{u(x_1)}^{u(x_2)}f(u)\,\mathrm{d}u$

The reason why we change the bound from $(x_1, x_2)$ to $(u(x_1), u(x_2))$ is we are from limiting $\mathrm{d}x \rightarrow 0$ to limiting $\mathrm{d}u \rightarrow 0$

  • $\displaystyle \int{F’(g(x)) \cdot g’(x)}{\,\mathrm{d}x}$

$$ u = g(x), \frac{\mathrm{d}u}{\mathrm{d}x} = g’(x) \int F’(u)\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x = \int{F’(u)}\,\mathrm{d}u = F(u) + C = F(g(x)) + C $$

  • $\displaystyle \int{\frac{1}{x(x^2 + 1)}}{\mathrm{d}x}$

$$ u = \arctan{x}, \frac{\mathrm{d}u}{\mathrm{d}x} = \frac{1}{x^2 + 1}, x = \tan{u} \Rightarrow \int{\frac{1}{\tan{u}}}\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x = \int{\frac{1}{\tan{u}}}\,\mathrm{d}u $$

$$ v = \sin{u}, \frac{\mathrm{d}v}{\mathrm{d}u} = \cos{u} \Rightarrow \int{\frac{1}{v}}{\,\mathrm{d}v} = \ln{v} + C = \ln{\sin{u}} + C = \ln{\sin{\arctan{x}} + C} $$

Trigonometric function: $\sqrt{1 - x^2}$, $\sqrt{1 + x^2}$, $\sqrt{x^2 - 1}$, $\frac{1}{1 + x^2}$, $\frac{1}{\sqrt{1 - x^2}}$

  • $\int{\sec^4{x} \tan^3{x}}{\mathrm{d}x}$

$$ \tan{\theta} = \sec^2{\theta} - 1 = \int\sec^2{\theta}\,\mathrm{d}\theta $$

Exercise:

EX-CAL-INT-02-01: $\displaystyle \int{\frac{x}{\sqrt{1 - x^2}}}\,\mathrm{d}x$

EX-CAL-INT-02-02: $\displaystyle\int{\frac{\sqrt{\tan{x}}}{\sin{2x}}}\,\mathrm{d}x$

EX-CAL-INT-02-03: $\displaystyle \int_{0}^{3}{\frac{x}{\sqrt[3]{x - 2}}}\,\mathrm{d}x$

EX-CAL-INT-02-04: $\displaystyle \int_{e}^{\infty}{\frac{1}{x(\ln^p{x})}}\,\mathrm{d}x$

EX-CAL-INT-02-05: $\displaystyle \int{\frac{x^5 - x}{x^8 + 1}}\,\mathrm{d}x$

# Integration by part: If the function combines with a simple function’s derivative

  • Reduce Power: $\int{x \cdot \sin x}\,\mathrm{d}x$

  • Eliminate complex function: $\int{\ln x}\,\mathrm{d}x$

  • *$\displaystyle \int{\frac{1}{\tan^n{x}}}\,\mathrm{d}x$

$$ \sec^2 - \tan^2 = 1 \Rightarrow \int{\frac{\sec^2 - \tan^2}{\tan^n{x}}}\,\mathrm{d}x = \int{\frac{\sec^2{x}}{\tan^n{x}}}\,\mathrm{d}x - \int{\frac{1}{\tan^{n - 2}{x}}}\,\mathrm{d}x $$ $$ \Rightarrow \int{\frac{1}{u^n}}\,\mathrm{d}u - \int{\frac{\sec^2 - \tan^2}{\tan^{n - 2}{x}}}\,\mathrm{d}x = \frac{1}{(1 - n)u^{n - 1}} - \int{\frac{\sec^2{x}}{\tan^{n - 2}{x}}}\,\mathrm{d}x + \int{\frac{1}{\tan^{n - 4}{x}}}\,\mathrm{d}x $$ $$ = \frac{1}{(1 - n)u^{n - 1}} - \frac{1}{(3 - n)u^{n - 3}} + \frac{1}{(5 - n)u^{n - 5}} - \frac{1}{(7 - n)u^{n - 7}} + \ldots (\pm \int{\frac{1}{\tan{x}}}\,\mathrm{d}x) + C $$ $$ \Rightarrow \int{\frac{1}{\tan{x}}}\,\mathrm{d}x, v = \sin{x}, dv = \cos{x}\,\mathrm{d}x \Rightarrow \int{\frac{1}{v}}dv = \ln{|v|} + C $$

Exercise:

EX-CAL-INT-03-01: Known $\displaystyle \int_0^{\infty}{\frac{\sin{x}}{x}}\,\mathrm{d}x = \frac{\pi}{2}$, derive $\displaystyle \int_{-\infty}^{\infty}{\frac{\sin^2{x}}{x^2}}\,\mathrm{d}x$

EX-CAL-INT-03-02: $\int{\arcsin x \cdot \ln x}\,\mathrm{d}x$

EX-CAL-INT-03-03: $\int(4x^4 + 1)e^{x^4}\,\mathrm{d}x$

# E.g.1. Trans between different variables

$$ \int_{C}^{g(x)}{f(t)}\,\mathrm{d}t, \text{assume } F(t) = \int{f(t)}\,\mathrm{d}t \Rightarrow \int_{C}^{g(x)}{f(t)}\,\mathrm{d}t = F(g(x)) - F(C) $$ $$ \text{Taking derivative in both sides:} \frac{\mathrm{d}}{\mathrm{d}x}{\int_{C}^{g(x)}{f(t)}\,\mathrm{d}t} = \frac{\mathrm{d}}{\mathrm{d}x}F(g(x)) - \frac{\mathrm{d}}{\mathrm{d}x}F(C) $$ $$ F’(x) = f(x), F(C) \text{ is constant} \Rightarrow F’(g(x)) \cdot g’(x) - 0 = f(g(x)) \cdot g’(x) $$ $$ \therefore \frac{\mathrm{d}}{\mathrm{d}x}{\int_{C}^{g(x)}{f(t)}\,\mathrm{d}t} = f(g(x)) \cdot g’(x), \frac{\mathrm{d}}{\mathrm{d}x}{\int_{h(x)}^{g(x)}{f(t)}\,\mathrm{d}t} = f(g(x)) \cdot g’(x) - f(h(x)) \cdot h’(x) $$

# E.g.2. Partial Fractions

$$ f(x) = \frac{A(x)}{B(x)} = f_1(x) + \frac{C(x)}{D(x)}, deg(A) >= deg(B) \ or \ deg(C) < deg(D) $$ $$ D(x) = (a_1x+b_1)^{p_1}…(a_ix+b_i)^{p_i}(u_1x^2 + v_1x + w_1)^{r_1}…(u_jx^2 + v_jx + w_j)^{r_j} $$ $$ \Rightarrow \sum_{i, k}\frac{C_{i, k}}{(a_ix+b_i)^{p_k}} + \sum_{j, h}\frac{g_{j, h}x + h_{j, h}}{(u_jx^2 + v_jx + w_j)^{r_h}} $$

then Integral:

  • $\displaystyle\int{\frac{c}{(ax + b)^n}}\,\mathrm{d}x$

$$ \int{\frac{c}{(ax + b)^n}}\,\mathrm{d}x = \frac{c}{a} \cdot \frac{1}{(1 - n)(ax+b)^{n-1}} + C \ or \ = \frac{c}{a} \cdot \ln{|ax + b|} + C \ when \ n = 1 $$

  • $\displaystyle\int{\frac{gx + h}{(ax^2 + bx + c)^n}}\,\mathrm{d}x$

$$ \int{\frac{gx + h}{(ax^2 + bx + c)^n}}\,\mathrm{d}x = \int{\frac{gx + h}{(a(x + \frac{b}{2a})^2 + c - \frac{b^2}{4a})^n}}\,\mathrm{d}x, u = x + \frac{b}{2a} \Rightarrow \int{\frac{iu + j}{(au^2 + k^2)^n}}\,\mathrm{d}u $$ $$ (1) $$ $$ \int{\frac{iu}{(au^2+k^2)^n}}\,\mathrm{d}u, v = au^2 + k^2, \frac{1}{2a}dv = u\mathrm{d}u $$ $$ \Rightarrow \frac{i}{2a}\int{\frac{1}{v^n}}dv \Rightarrow \frac{i}{2a} \cdot \frac{1}{(1 - n)(au^2 + k^2)^{n - 1}} + C \ or \ \frac{i}{2a}\ln{|au^2 + k^2|} + C \ when \ n = 1 $$ $$ (2) $$ $$ \ n = 1: v = \frac{u\sqrt{a}}{k} \Rightarrow \frac{j}{\sqrt{a}}\int{\frac{1}{v^2 + 1}dv} = \frac{j}{\sqrt{a}}\arctan{v} + C $$ $$ *n \neq 1: $$ $$ \int{\frac{1}{(x^2 + 1)^n}}\,\mathrm{d}x, x = \tan{u}, \,\mathrm{d}x = \sec^2{u}\,\mathrm{d}u \Rightarrow \int{\frac{1}{\sec^{2n - 2}{u}}}\,\mathrm{d}u = \int{\frac{\sec^2{u} - \tan^2{u}}{\sec^{2n - 2}{u}}}\,\mathrm{d}u $$ $$ = \int{\frac{\sec^2{u}}{\sec^{2n - 2}{u}}}\,\mathrm{d}u - \int{\frac{\tan{u}\sec{u}\tan{u}}{\sec^{2n - 1}{u}}}\,\mathrm{d}u, i’ = \frac{\tan{u}\sec{u}}{\sec^{2n - 1}{u}}, i = \frac{-1}{(2n - 2)\sec^{2n - 2}u} $$ $$ \Rightarrow \frac{x}{(2n - 2)(x^2 + 1)^{n - 1}} + \int{\frac{\sec^2{u}}{\sec^{2n - 2}{u}}}\,\mathrm{d}u - \int{\frac{sec^2{u}}{(2n - 2)\sec^{2n - 2}{u}}} $$ $$ = \frac{x}{(2n - 2)(x^2 + 1)^{n - 1}} + \frac{2n - 3}{2n - 2}\int{\frac{1}{(x^2 + 1)^{n - 1}}} $$ $$ \int\frac{1}{(ax^2 + b)^n} = \frac{2n - 3}{2b(n - 1)}\int\frac{1}{(ax^2 + b)^{n - 1}}\,\mathrm{d}x + \frac{x}{2b(n - 1)(ax^2 + b)^{n - 1}} $$

Exercise:

EX-CAL-INT-04-01: $\int{\ln{(x^2 - x + 3)}}\,\mathrm{d}x$

EX-CAL-INT-04-02: $\int{\sec{x}}\,\mathrm{d}x$

Notice. Approx to limit - Improper Integral: For integral $\int_a^b{f(x)}\,\mathrm{d}x$, when there are some points that are not defined, we use $t$ to approx. the limit of those points

$$ \int_a^b{f(x)}\,\mathrm{d}x = \lim_{t \rightarrow b}\int_a^t{f(x)}\,\mathrm{d}x $$

# HOW: How to apply integral to reality

# Rate - Differential Equations

$$ \text{Informal:} \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{x}{y} \Rightarrow y\,\mathrm{d}y = x\,\mathrm{d}x \Rightarrow \int{y}\,\mathrm{d}y = \int{x}\,\mathrm{d}x $$ $$ \text{*Formal Solution:} \frac{\mathrm{d}}{\mathrm{d}x}{y(t(x))} = \frac{\mathrm{d}y}{\mathrm{d}t} \cdot \frac{\mathrm{d}t}{\mathrm{d}x} \Leftrightarrow \int{(y(t(x)) \frac{\mathrm{d}t}{\mathrm{d}x})}\,\mathrm{d}x = \int{(y \frac{\mathrm{d}t}{\mathrm{d}x})}\,\mathrm{d}x = \frac{y^2}{2} $$

  • Carrying Capacity:

$$ \frac{\mathrm{d}N}{\mathrm{d}t} = rN(1 - \frac{N}{K}) $$ $$ \Rightarrow \frac{1}{N(K - N)} \frac{\mathrm{d}N}{\mathrm{d}t} = \frac{1}{K} (\frac{1}{N} + \frac{1}{K - N}) \frac{\mathrm{d}N}{\mathrm{d}t} = \frac{r}{K} \Rightarrow \int{(\frac{1}{N} + \frac{1}{K - N})\frac{\mathrm{d}N}{\mathrm{d}t}}\mathrm{d}t = \int{r}\mathrm{d}t $$ $$ \ln{N} - \ln{(K - N)} = rt + C_1 \Rightarrow N = \frac{K}{1 + e^{-rt}} $$

$N$ is the population size, $r$ is the intrinsic growth rate, $K$ is the carrying capacity of the local environment, and $\mathrm{d}N/\mathrm{d}t$, the derivative of $N$ with respect to time $t$, is the rate of change in population with time.

$$ x\frac{\mathrm{d}^2y}{\,\mathrm{d}x^2} + 2\frac{\mathrm{d}y}{\mathrm{d}x} = 0 \Rightarrow \int{(x\frac{\mathrm{d}^2y}{\mathrm{d}x} + \frac{\mathrm{d}y}{\mathrm{d}x})}\,\mathrm{d}x = \int{-\frac{\mathrm{d}y}{\mathrm{d}x}}\,\mathrm{d}x \Rightarrow x\frac{\mathrm{d}y}{\mathrm{d}x} = -y $$

Exercise:

EX-CAL-INT-05-01: $\displaystyle \frac{\mathrm{d}N}{\mathrm{d}t} = -aN\ln(bN)$

*EX-CAL-INT-05-02: $\displaystyle \frac{\mathrm{d}^2N}{\mathrm{d}t^2} = -aN\ln(bN) - \frac{1}{N}\frac{\mathrm{d}N^2}{\mathrm{d}t^2}$

# Arc Length

$$ L = \lim_{x_2 \rightarrow x_1}{\sum{\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}}} = \int{\sqrt{1 + y’^2}}\,\mathrm{d}x $$

Exercise:

EX-CAL-INT-06-01: Find curve length of $y = \ln{\sec{x}}, 0 \leq x \leq \pi / 4$

# Areas

$$ A = \lim_{n \rightarrow \infty}{\sum_{i = 1}^{n}{\Delta{x}(f(x_i^\star) - g(x_i^\star))}} = \int_{x_1}^{x_2}{(f(x) - g(x))}\,\mathrm{d}x = \int_{y_1}^{y_2}{(f^{-1}(y) - g^{-1}(y))}\,\mathrm{d}y $$

# Surface

$$ S = \int{2\pi f(x)\sqrt{1 + f’^2}}\,\mathrm{d}x $$

# Volume

$$ V = \int{A(z)}\,\mathrm{d}z $$ $$ \text{Cylindrical Shells (y-axis): } V = \lim_{\Delta{x} \rightarrow 0}{\sum{h(x) \cdot \pi ((x + \Delta{x})^2 - x^2)}} $$ $$ = \lim_{\Delta{x} \rightarrow 0}{\sum{h(x) \cdot \pi (2x \Delta{x} + \Delta^2{x})}} = \int{h(x) 2 \pi x}\,\mathrm{d}x $$

# HOW: How to apply in Polar Coordinate

# WHY: Why we should learn about Polar Coordinate - Cycloid & Parametric Curves

$$ \begin{cases} x = r(\theta - \sin\theta) \\ y = r(1 - \cos\theta) \end{cases} $$

$$ \frac{\mathrm{d}y}{\mathrm{d}\theta} = \frac{\mathrm{d}y}{\mathrm{d}x}\frac{\mathrm{d}x}{\mathrm{d}\theta} \Rightarrow \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{\mathrm{d}y/\mathrm{d}\theta}{\mathrm{d}x/\mathrm{d}\theta}, \frac{\mathrm{d}^2y}{\,\mathrm{d}x^2} = \frac{\mathrm{d}}{\mathrm{d}x}(\frac{\mathrm{d}y}{\mathrm{d}x}) = \frac{\frac{\mathrm{d}}{\mathrm{d}\theta}(\frac{\mathrm{d}y}{\mathrm{d}x})}{\frac{\mathrm{d}x}{\mathrm{d}\theta}} $$

Why $\displaystyle \mathrm{d}^2y/\,\mathrm{d}x^2 \neq \frac{\mathrm{d}^2y/\mathrm{d}\theta^2}{\mathrm{d}^2x/\mathrm{d}\theta^2}?$

If you remember “$y$ and $x$ are not in the same manner” that I mentioned before, you would find that in this equation, the left is differentiation respecting to $x$, or they are in different stage, but the right side turns the $x$ and $y$ into same stage.

$$ L = \int_{a}^{b}{\sqrt{1 + \frac{\mathrm{d}y^2}{\,\mathrm{d}x^2}}}\,\mathrm{d}x = \int_{\alpha}^{\beta}{\sqrt{1 + (\frac{\mathrm{d}y/\mathrm{d}t}{\mathrm{d}x/\mathrm{d}t})^2}}\frac{\mathrm{d}x}{\mathrm{d}t}\mathrm{d}t = \int_{\alpha}^{\beta}{\sqrt{\frac{\mathrm{d}x^2}{\mathrm{d}t^2} + \frac{\mathrm{d}y^2}{\mathrm{d}t^2}}}\mathrm{d}t $$

# WHAT: What is Polar Coordinates

$$ A(x, y) \Rightarrow A(r\cos{\theta}, r\sin{\theta}) \Rightarrow A(r, \theta) $$

$(r, \theta) = (-r, \theta + (2k + 1)\pi) = (r, \theta + 2k\pi)$

Built with Hugo
Theme Stack designed by Jimmy