IT304 - Integration

4. Definitions and Properties

Dr Robert Batzinger
Instructor Emeritus

2022-08-15

beige dark moon night simple

1 Comparison of Methods

1.1 Derivative - slope

\[\eqalign{\frac{dy}{dx} &=& \frac{d(4x - x^3)}{dx}\\ &=& 4-3x^2\\}\]

1.2 Key proof for derivative

\[\eqalign{ \frac{dy}{dx} &=& lim_{d\rightarrow 0} \left(\frac {4(x+d) - (x+d)^3 - (4x - x^3)}{d}\right)\\ &=&lim_{d\rightarrow 0} \left(\frac{4x + 4d -x^3 -3dx^2 - 3d^2x - d^3 - 4x + x^3}{d}\right)\\ &=&lim_{d\rightarrow 0} \left(\frac{ 4d -3dx^2 - 3d^2x - d^3}{d}\right)\\ &=&lim_{d\rightarrow 0} \left(4 -3x^2 - 3dx - d^2 \right) = 4 -3x^2 \\ }\]

1.3 Integration - area

\[\eqalign{ area_{rthnd} &=& h \left(f(x_1) + f(x_2) + ... + f(x_4)\right)\\ area_{midpt} &=& h \left({\Large f}\left(\frac{x_0 +x_1}{2}\right) + {\Large f}\left(\frac{x_1 +x_2}{2}\right) + ...+{\Large f}\left(\frac{x_3 +x_4}{2}\right)\right)\\ area_{trap} &=& \frac{h}{2}\left(f\left(x_0\right) + 2 f\left(x_1\right) + 2 f\left(x_2\right)+ + 2 f\left(x_3\right) + + 2 f\left(x_1\right)\right)\\ area_{simp}&=& \frac{h}{3}\left(f\left(x_0\right) + 4 f\left(x_1\right) + 2 f\left(x_2\right) + 4 f\left(x_3\right) + f\left(x_4\right)\right)\\ area_{int} &=& \int_{x_0}^{x_4} f(x)dx\\ }\]

1.4 Numerical Integration

Method Calculated Area
Right hand rule 3.50
Midpoint rule 4.125
Trapezoidal rule 3.75
Simpson rule 4
Integration by antiderivative 4

1.5 Application

  • Injection of dye in a vein to measure cardiac blood flow
  • Requires integrating dye concentration in arterial blood over time.
  • Also useful for measuring the flow of rivers and glacier flows.

\[\eqalign{\left(\frac{mg}{area}\right) &=&\frac{mg_{total}}{\left(\frac{mg}{Litre_{blood}}\right)\cdot sec}\\ &=& \left(\frac{mg}{sec}\right)\cdot\left(\frac{Litre_{blood}}{mg}\right)\\ &=& \frac{Litre_{blood}}{sec}}\]

1.6 Dye concentration

$ \[\begin{matrix} time & 5 & 7 & 9 & 11& 13\\ dye & 0 & 3.8 & 8.0 & 6.1 & 3.6\\ \\ time & 15 & 17 & 19 & 21 & 23\\ dye & 2.3 & 1.45 & 0.91 & 0.57 & 0.36 \\ \\ time & 25 & 27 & 29 & 31 & 33\\ dye & 0.23 & 0.14 & 0.09 & 0.05 & 0\\ \end{matrix}\]

$

1.7 Area of a rectangle

1.8 Calculations

  • Area by trapezoid Rule

\[\eqalign{\frac{h_0+h_1}{2dx} + \frac{h_1+h_2}{2dx} + \frac{h_2+h_3}{2dx}+ \frac{h_3+h_4}{2dx}&=& \frac{h_0 + 2h_1 + 2h_2 + 2h_3 + h_4}{2dx}\\ &=& \frac{6+12+12+12+6}{2} = \frac{48}{2} = 24\\}\]

  • Area by Simpson Rule

\[\eqalign{\frac{h_0+4h_1+h_2}{3dx} + \frac{h_2+h_3+h_4}{3dx}&=& \frac{h_0 + 4h_1 + 2h_2 + 4h_3 + h_4}{3dx}\\ &=& \frac{6+24+12+24+6}{3} = \frac{72}{3} = 24\\}\]

  • Area by antideriative

\[\int_0^{4} (6)dx=\displaystyle \bigg|_0^{4} 6x = 6\cdot 4 - 6\cdot 0 = 24 - 0 = 24\]

1.9 Integration of a line

1.10 Calculations

  • Area by trapezoid Rule

\[\eqalign{\frac{h_0+h_1}{2dx} + \frac{h_1+h_2}{2dx} + \frac{h_2+h_3}{2dx}+ \frac{h_3+h_4}{2dx}&=& \frac{h_0 + 2h_1 + 2h_2 + 2h_3 + h_4}{2dx}\\ &=& \frac{0+8+16+24+16}{2} = \frac{64}{2} = 32\\}\]

  • Area by Simpson Rule

\[\eqalign{\frac{h_0+4h_1+h_2}{3dx} + \frac{h_2+h_3+h_4}{3dx}&=& \frac{h_0 + 4h_1 + 2h_2 + 4h_3 + h_4}{3dx}\\ &=& \frac{0+16+16+48+16}{3} = \frac{96}{3} = 32\\}\]

  • Area by antiderivative

\[\int_0^{4} (4x)dx=\displaystyle \bigg|_0^{4} 2x^2 = 2\cdot 16 - 2\cdot 0 = 32 - 0 = 32\]

1.11 Area of Parabola

1.12 Calculations

  • Area by trapezoid Rule

\[\eqalign{\frac{h_0+h_1}{2dx} + \frac{h_1+h_2}{2dx} + \frac{h_2+h_3}{2dx}+ \frac{h_3+h_4}{2dx}&=& \frac{h_0 + 2h_1 + 2h_2 + 2h_3 + h_4}{2dx}\\ &=& \frac{0+6+8+6+0}{2} = \frac{20}{2} = 10\\}\]

  • Area by Simpson Rule

\[\eqalign{\frac{h_0+4h_1+h_2}{3dx} + \frac{h_2+h_3+h_4}{3dx}&=& \frac{h_0 + 4h_1 + 2h_2 + 4h_3 + h_4}{3dx}\\ &=& \frac{0+12+8+12+0}{3} = \frac{32}{3} = 10.6667\\}\]

  • Area by antiderivative

\[\int_0^{4} (4x-x^2)dx=\displaystyle \bigg|_0^{4} 2x^2-\frac{x^3}{3} = 2\cdot 16 -\frac{64}{3} - 2\cdot 0+\frac{0}{3} = 32 - 21.3333 = 10.6667\]

1.13 4th power

1.14 Calculations

  • Area by trapezoid Rule

\[\frac{h_0 + 2h_1 + 2h_2 + 2h_3 + h_4}{2dx} = \frac{0+6+8+12+0}{2} = \frac{26}{2} = 13\]

  • Area by Simpson Rule

\[\eqalign{\frac{h_0 + 4h_1 + 2h_2 + 4h_3 + h_4}{3dx} &=& \frac{0+12+8+24+0}{3} = \frac{44}{3} = 14.6667\\}\]

  • Area by antiderivative

\[\eqalign{\int_0^{4} (-\frac{x^4}{2}+\frac{7x^3}{2}-8x^2+8x)dx&=&\displaystyle \bigg|_0^{4} -\frac{x^5}{10}+\frac{7x^4}{8}-\frac{8x^3}{3}+4x^2\\ &=& -\frac{1024}{10} +\frac{7\cdot 256}{8} - \frac{8\cdot 64}{3}+4\cdot 16 = 14.93333\\}\]

1.15 Smaller intervals

1.16 Calculations

  • Area by trapezoid Rule

\[\frac{h_0 + 2h_1 + 2h_2 + 2h_3 + ... + h_8}{2dx} = \frac{0+2*(2.40625 + 3 + 3.28125 + 4 + 5.15625 + 6 + 5.03125) + 0}{2} = \frac{28.875}{2} = 14.4375\]

  • Area by Simpson Rule

\[\eqalign{\frac{h_0 + 4h_1 + 2h_2 + 4h_3 + ... + 4h_7+ h_8}{3dx} &=& \frac{0+ 4\cdot 2.40625 +2\cdot 3+4\cdot 3.28125 + 2\cdot 4 + 4\cdot 5.15625 + 2\dot 6 + 4\cdot 5.03125 + 0}{6}\\ &=& \frac{89.5}{6} = 14.91667\\}\]

  • Area by antiderivative

\[\eqalign{\int_0^{4} (-\frac{x^4}{2}+\frac{7x^3}{2}-8x^2+8x)dx&=&\displaystyle \bigg|_0^{4} -\frac{x^5}{10}+\frac{7x^4}{8}-\frac{8x^3}{3}+4x^2\\ &=& -\frac{1024}{10} +\frac{7\cdot 256}{8} - \frac{8\cdot 64}{3}+4\cdot 16 = 14.93333\\}\]

1.17 Even smaller intervals

1.18 Calculations

  • Area by trapezoid Rule

\[\frac{h_0 + 2h_1 + 2h_2 + ... + 2h_{11} + h_{12}}{2dx} = \frac{44.1358}{3} = 14.71193\]

  • Area by Simpson Rule

\[\frac{h_0 + 4h_1 + 2h_2 + 4h_3 + ... + 4h_{11} + h_{12}}{3dx} = \frac{134.3704}{9} = 14.93004\]

  • Area by antiderivative

\[\eqalign{\int_0^{4} (-\frac{x^4}{2}+\frac{7x^3}{2}-8x^2+8x)dx&=&\displaystyle \bigg|_0^{4} -\frac{x^5}{10}+\frac{7x^4}{8}-\frac{8x^3}{3}+4x^2\\ &=& -\frac{1024}{10} +\frac{7\cdot 256}{8} - \frac{8\cdot 64}{3}+4\cdot 16 = 14.93333\\}\]

1.19 Yet smaller intervals

1.20 Calculations

  • Area by trapezoid Rule

\[\frac{h_0 + 2h_1 + 2h_2 + ... + 2h_15 + h_16}{2dx} = \frac{118.4688}{4} = 14.80859\]

  • Area by Simpson Rule

\[\frac{h_0 + 4h_1 + 2h_2 + 4h_3 + ... + 4h_{15} + h_{16}}{3dx} = \frac{179.1875}{12} = 14.93229\]

  • Area by antiderivative

\[\eqalign{\int_0^{4} (-\frac{x^4}{2}+\frac{7x^3}{2}-8x^2+8x)dx&=&\displaystyle \bigg|_0^{4} -\frac{x^5}{10}+\frac{7x^4}{8}-\frac{8x^3}{3}+4x^2\\ &=& -\frac{1024}{10} +\frac{7\cdot 256}{8} - \frac{8\cdot 64}{3}+4\cdot 16 = 14.93333\\}\]

1.21 3/8 rule

::: :::

1.22 3/8 RULE

\[\eqalign{ & & Given\quad h = \frac{b-a}{3} \ :\\ \int_a^b f(x)&\approx& \frac{3h}{8}\left[f(a) + 3f\left(\frac{2a+b}{3}\right) + 3f\left(\frac{a+2b}{3}\right) + f(b)\right]\\ &\approx& \frac{3h}{8}\left[f(a) + 3f\left(\frac{3a+b-a}{3}\right) + 3f\left(\frac{3a+2b-2a}{3}\right) + f(b)\right]\\ &\approx& \frac{3h}{8}\left[f(a) + 3f\left(a +\frac{b-a}{3}\right) + 3f\left(a +\frac{2b-2a}{3}\right) + f(b)\right]\\ &\approx& \frac{3h}{8}\left[f(a) + 3f\left(a + h\right) + 3f\left(a +2h\right) + f(b)\right]\\ \int_b^c f(x) &\approx& \frac{3h}{8}\left[f(b) + 3f\left(b + h\right) + 3f\left(b +2h\right) + f(c)\right] } \]

1.23 Calculation

\[\eqalign{\int_0^4 f(x) &\approx& \frac{3h}{8}\left[f(a) + 3f\left(a+h\right) + 3f\left(a +2h\right) + 2f(b) + 3f\left(b+h\right) + 3f\left(b +2h\right) + f(c) \right]\\ &\approx&\frac{1}{4}\left[0 + 3(2.716049) + 3(3.160494) + 2(4)+ 3(5.530864) + 3(5.679012)+ 0\right]\\ &\approx& 14.81481\\}\]

Metric
Way points a a + h a + 2h b b + h b + 2h c
x 0 0.6666667 1.3333333 2 2.6666667 3.3333333 4
y 0 2.716049 3.160494 4 5.530864 5.679012 0

1.24 Matrix multiplicartion (Trapezoid Rule)

\[\eqalign{area &=& y \times wt \times correction\\ &=& [0\quad 2.716049\quad 3.160494\quad 4\quad 5.530864\quad 5.679012\quad 0] \left[\begin{matrix}1\\ 2\\ 2\\ 2\\ 2\\ 2\\1\\\end{matrix}\right] \times \left(\frac{\frac{2}{3}}{2}\right)\\ &=& ( 0 + 5.432099 + 6.320988 + 8 + 11.061728 + 11.358025 + 0)\times \frac{1}{3}\\ &=& \frac{42.17284}{3} = 14.05761\\}\]

1.25 Matrix Multiplication (Simpson Rule)

\[\eqalign{area &=& y \times wt \times correction\\ &=& [0\quad 2.716049\quad 3.160494\quad 4\quad 5.530864\quad 5.679012\quad 0] \left[\begin{matrix}1\\ 4\\ 2\\ 4\\ 2\\ 4\\1\\\end{matrix}\right] \times \left(\frac{2}{3}\right)\left(\frac{1}{3}\right)\\ &=& (0.000000 + 10.864198 + 6.320988 + 16.000000 + 11.061728 + 22.716049 + 0)\times \frac{2}{9}\\ &=& \frac{66.96296}{4} = 14.88066\\}\]

1.26 Matrix multiplication (3/8 Rule)

\[\eqalign{area &=& y \times wt \times correction\\ &=& [0\quad 2.716049\quad 3.160494\quad 4\quad 5.530864\quad 5.679012\quad 0] \left[\begin{matrix}1\\ 3\\ 3\\ 2\\ 3\\ 3\\1\\\end{matrix}\right] \times \left(\frac{2-0}{3}\right)\left(\frac{3}{8}\right)\\ &=& (0 + 8.148147 + 9.481482 + 8 + 16.592592 + 17.037036 + 0)\times \frac{2}{8}\\ &=& \frac{59.25926}{4} = 14.81481\\}\]

1.27 Antideriative

\[\eqalign{\int_0^4 f\left(\frac{-x^4}{2}+\frac{7x^3}{2}-8x^2+8x\right) dx &=& \bigg|_0^4 \frac{-x^5}{10}+\frac{7x^4}{8}-\frac{8x^3}{3}+4x^2\\ &=&\frac{-\left(4^5\right)}{10}+\frac{7\left(4^4\right)}{8}-\frac{8\left(4^3\right)}{3}+4\left(4^2\right) - 0\\ &=&\frac{-1024}{10}+\frac{7\left(256\right)}{8}-\frac{8\left(64\right)}{3}+4\left(16\right)\\ &=&-102.4 + 224 - 170.6667 + 64 = 14.9333\\}\]

2 Integration

2.1 Basic properties of Integrals

\[\eqalign{ \int \left(\alpha f(x)\right)dx &=& \alpha \int \left(f(x)\right)dx\\ \\ \int \left(f(x) + g(x) \right)dx &=& \int \left(f(x)\right)dx + \int \left(g(x)\right)dx\\ \\ \int_a^c \left(f(x)\right)dx &=& \int_a^b \left(f(x)\right)dx + \int_b^c \left(f(x)\right)dx\quad \hbox{if}\ a < b < c \\ \\ \int_a^b \left(f(x)\right)dx &=& -\int_b^a \left(f(x)\right)dx \\ \\ \int_a^b \left(f'(x)\right)dx &=& f(b) - f(a)\\ }\]

3 The theory of calculus

\[ \eqalign{\int \left(f'(x)\right) dx &\leftrightarrow& f(x) + C\\ \uparrow\quad\quad & &\quad\quad \downarrow\\ f'(x)\ &\leftrightarrow&\frac{d}{dx}\left(f(x)\right)}\]

4 Standard Rules of Integration

\[\eqalign{\int x^n dx &=& \frac{x^{n+1}}{n+1} + C,\quad n\ne -1\\ \int \frac{1}{x} dx &=& \ln(|x|) +C\\ \int cos(x) dx &=& \sin(x) + C\\ \int sin(x) dx &=& -cos(x) +C\\}\]

4.1 More rules

\[\eqalign{\int e^x dx &=& e^x +c\\ \int e^{kx} dx &=& \frac{e^{kx}}{k} +c,\quad k \ne 0\\ \int a^x dx &=& \frac{a^x}{\ln(a)} +c\\ \int a^{kx} dx &=& \frac{a^{kx}}{k\ln(a)} + C,\quad k \ne 0\\}\]

4.2 Some practice examples (where rewriting the equation helps)

\[\eqalign{ \int \left(\frac{12}{x^5}\right)dx &=& 12\int \left(x^{-5}\right) dx =\quad ?\\ \\ \int (3x^2 -4x + 5)dx &=& 3\int (x^2)dx - 4\int (x)dx + 5\int dx =\quad ?\\ \\ \int \frac{x^2 + 1}{\sqrt{x}} dx &=& \int \left(\frac{x^2}{\sqrt{x}} + \frac{1}{\sqrt{x}}\right)dx \\ & =& \int \left(x^{3/2}+x^{-1/2}\right) dx =\quad ?\\ \\ \int \left(x^2 - 1\right)^2 dx &=& \int (x^4 - 2x^2 + 1)dx = \quad ?\\ }\]

4.3 More samples

\[\eqalign{\int e^{9t} dt &=& ???\\ &=&\frac{e^{9t}}{9} dt\\ \int −x^2(2x \sin(2x+1) -3cos(2x+1) &=& \int 3x^2 cos(2x+1) -2x^3 sin(2x+1) &=& ???\\ &=& x^3 \cos(2x+1)\\ \int \frac{3}{3x+1} &=& \int \frac{1}{u} du = ???\quad u= 3x+1; du = 3dx\\ &=& \ln(u) = \ln(3x + 1) & }\]

4.4 More samples : answer

\[\eqalign{\int e^{9t} dt &=& \frac{e^{9t}}{9}\\ \int 2^{-5x} dx &=& Substitute: \quad [[u = -5x;du = -5dx]]\rightarrow\\ &=& \int 2^u du = \bigg|\frac{2^u}{\ln(2)}du \rightarrow\\ &=&−\frac{1}{5}\frac{2^{-5x}}{\ln(2)}\\}\]

4.5 Calculating the error

After measuring the radius of 1000 ball bearings, we can determine the radius of ball bearing as:

\[r = 6.000 \pm 0.015 \hbox{mm}\] Calculate the error in the volume of ball bearings given the formula for the volume of a sphere: \[V=\frac{4}{3}\pi r^3\]

The error in volume can be calculated as: \[\eqalign{\Delta V &=& \frac{4}{3}\pi (r + \Delta r)^3 - \frac{4}{3}\pi r^3\\ &=& \frac{4}{3}\pi (0.6 \pm 0.015)^3 - \frac{4}{3}\pi (0.6)^3\\ &=& 0.9743477 - 0.9047787 = \pm 0.06956898\\}\]

4.6 Stopping

4.7 Landing a plane

\[\eqalign{y&=&\frac{\left(x-10\right)^{2}\left(x+5\right)}{50}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+4\right)}{40.666}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+3\right)}{32.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+2\right)}{25.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+1\right)}{19.6667}\\ y&=&\frac{\left(x-10\right)^{2}x}{14.8}\\ }\]

4.8 Landing a plane

\[\eqalign{y&=&\frac{\left(x-10\right)^{2}\left(x+5\right)}{50}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+4\right)}{40.666}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+3\right)}{32.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+2\right)}{25.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+1\right)}{19.6667}\\ y&=&\frac{\left(x-10\right)^{2}x}{14.8}\\ }\]

4.9 Landing a plane

\[\eqalign{y&=&\frac{\left(x-10\right)^{2}\left(x+5\right)}{50}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+4\right)}{40.666}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+3\right)}{32.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+2\right)}{25.6}\\ y&=&\frac{\left(x-10\right)^{2}\left(x+1\right)}{19.6667}\\ y&=&\frac{\left(x-10\right)^{2}x}{14.8}\\ }\]

4.10 Revenue from Marginal Revenue

Given that marginal revenue is given as:

\[R'(q) = 400 e^{-0.1q} + 8\]

Integration gives us the equation for Revenue curve

\[\eqalign{R &=& \int (400 e^{-0.1q} + 8) dq\\ &=&\left(400\frac{e^{-0.1q}}{-0.1} + 8q\right)dq\\ &=&4000 e^{-0.1q} + 8q + C\\}\]

Since \(R(0) = 0\) we can solve for \(C\)

\[\eqalign{0 &=& 4000 e^{-0.1(0)} + 8(0) + C\\ &=& -4000 + C\\ \\ C &=& 4000\\}\]

Combined terms we have the full equation for Revenue as a function of \(q\)

\[R = 4000 e^{-0.1q} + 8q + 4000\]

4.11 Area between curves

\[\eqalign{\int_0^1 \left(\sqrt{x} - x^3\right) dx &=& \bigg|_0^1 \frac{2x^{3/2}}{3}-\frac{x^4}{4}\\ &=& \frac{2}{3}-\frac{1}{4}= \frac{8-3}{12}\\ &=& \frac{5}{12}=0.4166667\\}\]

4.12 Area between curves

4.13 Area between curves

\[\eqalign{Area&=&\int_{-2}^{2} \left(f(x)-g(x)\right) dx\\ &=&\int_{-2}^{2} \left(2x+6\right) - \left(4-x^2\right) dx\\ &=&\bigg|_{-2}^{2} \frac{x^3}{3} + x^2 +2x\\ &=&\left(\frac{8}{3} +4 +4\right) - \left(\frac{-8}{3} + 4 -4\right)\\ &=&\frac{16}{3} + 8\\ &=&13.33333}\]

\[\eqalign{Area&=&\int_{-2}^{2} f(x) dx - \int_{-2}^{2} g(x) dx \\ &=&\int_{-2}^{2} \left(2x +6\right) dx - \int_{-2}^{2} \left(4-x^2\right) dx \\ &=&\bigg|_{-2}^{2} \left(x^2 +6x\right) - \bigg|_{-2}^{2} \left(4x - \frac{x^3}{3}\right)\\ &=&\left((4+12) - (4 -12)\right) - \left(\left(8 - \frac{8}{3}\right) - \left(-8 +\frac{8}{3]}\right)\right)\\ &=&24-16+ \frac{16}{3}\\ &=&13.33333\\ }\]

4.14 Integration by substitution

\[\eqalign{\int f(x) dx &=& \int \frac{f(g'(u))}{d(g'(u))}du \\ \\ \int (2x+1)^{16} dx &=& \int u^{16} \frac{1}{2}du = \frac{1}{2(17)}u^{17} +C = \frac{1}{34}(2x+1)^{17} + C,\quad u = 2x + 1\\ \int \frac{2x}{\sqrt{x^2 + 1}}dx &=& \int \frac{1}{u^{\frac{1}{2}}} du = 2u^{\frac{1}{2}} + C= 2\sqrt{x^2 + 1} + C,\quad u= x^2 +1\\ }\]

4.15 Basic Calculus

Area in 2D

\[\int_0^1 4x\ dx = \bigg|_0^1 2x^2 = 2 (1^2 - 0^2) = 2\]

Volume in 3D

\[\int_0^1 \pi(4x)^2 dx = \bigg|_0^1 \frac{16\pi x^3}{3} = \frac{16\pi}{3} - 0 = \frac{16\pi}{3}\]

4.16 Cylinder

\[\int_0^1 \pi(4x) dx = \bigg|_0^1 \frac{16\pi x^3}{3} = \frac{16\pi}{33} - 0 = \frac{16\pi}{3}\]

4.17 Surface area of a sphere

\[\eqalign{\int_{-\pi/2}^{\pi/2} 2\pi r \cos(A) r dA&=&4\pi r^2\bigg|_{-\pi/2}^{\pi/2} sin(A)\\ &=&4\pi r^2 (1-0)\\ &=&4\pi r^2}\]

4.18 Volume of a sphere

\[\eqalign{Area &=& 4\pi r^2\\ Volume &=& 4\pi r^2 dr\\ &=& \int_{0}^{R} 4\pi r^2 dr\\ &=& \frac{4\pi}{3} \bigg|_0^R r^3 \\ &=& \frac{4\pi r^3}{3} (R^3-0)\\ &=& \frac{4\pi R^3}{3}}\]

5 Integration by parts

\[\eqalign{ \frac{d(uv)}{dx} &=& u\frac{dv}{dx} + v\frac{du}{dx}\\ d(uv) &=& u\ dv + v\ du\\ \int d(uv) &=& \int u\ dv + \int v\ du\\ uv &=& \int u\ dv + \int v\ du\\ \int u\ dv &=& uv -\int v du\\} \]

5.1 An example

\[\eqalign{ \int x\ e^{5x} &:&\quad (Set-up)\\ dv&=& e^{5x}\\ u &=& x\\ du &=& dx\\ v &=& \int dv = \int e^{5x} dx &=& \frac{xe^{5x}}{5} - \frac{e^5x}{25}\\ \int u \ dv &=& uv - \int v du\\ }\]

\[\eqalign{ \int x\ e^{5x} &=&x\left(\frac{e^{5x}}{5}\right) - \int \frac{e^{5x}}{5} dx\\ &=&\frac{e^{5x}}{5} - \frac{e^{5x}}{25} + C\\ &=&\frac{e^{5x}}{25}(5x - 1) + C\\ }\]

\[\pmatrix{D & &I\\ x & + & e^{5x}\\ 1 & - & \frac{e^{5x}}{5}\\ 0 & + & \frac{e^{5x}}{25}\\ }\longrightarrow \pmatrix{x\frac{e^{5x}}{5}\\ -\frac{e^{5x}}{25}\\}\longrightarrow \\ x\frac{e^{5x}}{5} -\frac{e^{5x}}{25} \longrightarrow\\ \frac{e^{5x}}{25}(5x-1)\]

5.2 Another example

\[\eqalign{\int \ln(x) dx &:& (Setup)\\ dv &=& dx\\ u &=& \ln(x)\\ v &=& x\\ du &=& \frac{1}{x}dx\\}\]

\[\eqalign{\int \ln(x) dx &=& x\ln(x) - \int x\left(\frac{1}{x} dx\right)\\ &=& x\ln(x) - \int dx\\ &=& x\ln(x) - x + C\\}\]

5.3 Another example

\[\eqalign{\int (2x^2 + 5) e^{-3x} dx &:& (Setup)\\ dv &=& e^{-3x} dx\\ u &=& 2x^2 + 5\\ v &=& -\frac{e^{-3x}}{3}\\ du &=& 4x\ dx\\}\]

\[\eqalign{\int (2x^2 + 5) e^{-3x} dx &=& -(2x^2 + 5)\left(-\frac{e^{-3x}}{3}\right) + \frac{4}{3}\int x\ e^{-3x} dx\\ &=& -(2x^2 + 5)\left(-\frac{e^{-3x}}{3}\right) +\\ &&\quad \frac{4}{3}\left[-\frac{xe^{-3x}}{3} -\int \frac{-e^{-3x)}}{3} dx\right]\\ &=& -(2x^2 + 5)\left(-\frac{e^{-3x}}{3}\right) +\\ &&\quad \frac{4}{3}\left[-\frac{xe^{-3x}}{3} - \frac{e^{-3x)}}{9}\right] + C\\ &=& -(2x^2 + 5)\left(-\frac{e^{-3x}}{3}\right) -\frac{4xe^{-3x}}{9} - \frac{4e^{-3x)}}{27} + C\\ &=& \left[(2x^2 + 5)(-9) -4x(3) - 4 \right]\frac{e^{-3x}}{27}+C\\ &=& \left(18x^2 +12x + 49 \right)\left(\frac{-e^{-3x}}{27}\right)+C\\}\]

\[\pmatrix{D& & I\\\hline (2x^2 + 5)&+&e^{-3x}\\ 4x &-& e^{-3x}/-3\\ 4 & + & e^{-3x}/9\\ 0 & - & e^{-3x}/-27\\}\longrightarrow\pmatrix{\\\hline +(2x^2 + 5)\frac{\left(e^{-3x}\right)}{-3}\\ -4x \frac{\left(e^{-3x}\right)}{9}\\ 4 \frac{\left(e^{-3x}\right)}{-27}\\}\longrightarrow \\ -(2x^2 + 5)\frac{\left(e^{-3x}\right)}{3} -4x \frac{\left(e^{-3x}\right)}{9}- 4 \frac{\left(e^{-3x}\right)}{27}\longrightarrow\\ -2x^2 \frac{\left(e^{-3x}\right)}{3} -4x \frac{\left(e^{-3x}\right)}{9}- 49 \frac{\left(e^{-3x}\right)}{27}\longrightarrow\\ -(18x^2 + 12x + 49) \frac{\left(e^{-3x}\right)}{27}\]

5.4 Practice

\[\eqalign{\int (3x^2+4) e^{2x} dx &=& (6x^2 − 6x + 11)\frac{e^{2x}}{4} +C\\ \int \frac{\ln(x)}{x^2} dx&=& −\frac{\ln(x)+1}{x}+C\\ \int x^2 \ln(x) dx&=& \frac{x^3(3\ln(x)-1)}{9}+ C\\ \int \frac{1}{x\sqrt{4-x^2}} dx&=& −\frac{\ln\left(\frac{\sqrt{4-x^2}}{x}+\frac{2}{x}\right)}{2}+C\\ \int \frac{1}{4-x^2} dx &=& \frac{\ln\left(|x + 2|\right) −\ln\left(|x-2|\right)}{4} + C\\}\]

5.5 Practice solutions

\[\eqalign{ \int (3x^2+4) e^{2x} dx &=& ???\\ \int \frac{\ln(x)}{x^2} dx&=& ???\\ \int x^2 \ln(x) dx&=& ???\\ \int \frac{1}{x\sqrt{4-x^2}} dx&=& ???\\ \int \frac{1}{4-x^2} dx &=& ???\\}\]

5.6 Landing a drone: Rate of descent

\[y=\ ax^{2}\ +\ bx\]

5.7 Drone landing: height profile

\[y=\frac{ax^{3}}{3}\ +\frac{bx^2}{2} + C\]

5.8 Solution

\[\eqalign{c &=& 10000\\ 10^2a &=& 10b\\ 10a &=& b\\\ y &=&\frac{a10^3}{3} - \frac{b10^2}{2} + 10000\\ 0 &=& \frac{2000a-300b + 60000}{6}\\ 0 &=& 2000a-3000a + 60000\\ 0 &=& -a+60\\ a &=& 60\\ b &=& 6\\}\]

5.9 Population Growth (40 Million)

\[dy=ax^{2}-bx\]

5.10 Population

\[y=-\frac{ax^3}{3} + \frac{bx^2}{2}\]

5.11 Solution

\[\eqalign{y &=& -(ax^3)/3 + (bx^2)/2 + c\\ c &=& 0 \\ dy &=&-ax^2+bx\\ 0 &=& -40^2 a+ 40b\\ 1600a &=& 40b\\ 40a &=& b\\ 40000000 &=& -\frac{2a40^3}{6} +\frac{3a40^3}{6}\\ 1000000 &=& \frac{2a40^2}{6} +\frac{3a40^3}{6}\\ 6000000 &=& 40^2 a\\ \frac{6000000}{1600} &=& a\\ \frac{15000}{4}&=& a\\ 3750 &=&a\\ 150000 & b\\}\]

5.12 Population growth

5.13 Least means

\[\eqalign{y&=&mx +b\\ d_1 &=& \left(mx_1 + b - y_1\right)^2\\ D &=& \sum_{i=1}^{n} (mx_i + b -y_i)^2\\ \frac{\partial D}{\partial m} &=& 2\sum_{i=1}^{n} x_i(mx_i +b -y_i)=0\\ 0&=& m \sum_{i=1}^{n} x_i^2 +b\sum_{i=1}^{n} x_i - \sum_{i=1}^{n}x_i y_i\\ \sum_{i=1}^{n}x_i y_i &=& m \sum_{i=1}^{n} x_i^2 +b\sum_{i=1}^{n} x_i\\ \sum_{i=1}^{n} y_i &=& m \sum_{i=1}^{n} x_i +b n\\ \bar y &=& m \bar x +b\\ \\ m &=& \frac{n\sum_{i=1}^{n} x_i y_i - \left(\sum_{i=1}^{n} x_i\right)\left(\sum_{i=1}^{n} y_i\right)}{n\sum_{i=1}^{n} x^2_i -\left(\sum_{i=1}^{n} x^2_i\right)^2} \\ \\ \frac{\partial D}{\partial b} &=& 2\sum_{i=1}^{n} (mx_i +b -y_i)=0\\ b&=&\frac{\left(\sum_{i=1}^{n} y_i\right) \left(\sum_{i=1}^{n} x_i^2\right)-\left(\sum_{i=1}^{n} x_i\right)\left(\sum_{i=1}^{n} x_i y_i\right)}{n\sum_{i=1}^{n} x^2_i -\left(\sum_{i=1}^{n} x^2_i\right)^2}\\ }\]

5.14 Geometric Series

\[\eqalign{S_n &=& S_{n-1} (1 + r)\\ S_n &=& a + ar + ar^2 + ar^3+ \cdots + ar^{n-1}\\ rS_n &=&ar + ar^2 + ar^3 + ar^4+ \cdots + ar^n\\ S_n(1-r) &=& a - ar^n\\ S_n &=& \frac{a(1-r^n)}{1-r}\\}\]

5.15 Geometric Example

Saving account 1000 baht added annually with \(r=1.02\)

Year 1 2 3 4 5 6
BCF+ Int 0 1020 2060.4 3121.61 4204.04 5308.12
Deposit 1000 1000 1000 1000 1000 1000
Balance 1000 2020 3060.4 4121.61 5204.04 6308.12
Calculated 1000 2020 3060.4 4121.61 5204.04 6308.12

\[S_n = \frac{a(1-r^n)}{1-r} = \frac{1000(1-1.02^n)}{1-1.02}\]

5.16 Geometric Example

Quinine is administered 50mg/day and 77% is metabolized by the end of the day.

Year 1 2 3 4 5 6
BCF+ Int 0 11.5 14.15 14.75 14.89 14.93
Deposit 50 50 50 50 50 50
Balance 50 61.5 64.50 64.75 64.89 64.93
Calculated 50 61.50 64.15 64.75 64.89 64.93

\[S_n = \frac{a(1-r^n)}{1-r} = \frac{50(1-0.23^n)}{1-0.23}\]

Equilbrium

\[\eqalign{S_{eq} &=& S_{eq} r + a\\ S_{eq} - S_{eq} r &=& a \\ S_{eq} &=& \frac{a}{1-r} \\ &=& \frac{50}{0.77} = 64.93506\\}\]

5.17 Recursive definition

Two pennies are added every day

\[\eqalign{\frac{dy}{dx} &=& 2\\ dy &=& 2dx\\ \int dy &=& \int 2 dx\\ y &=& 2x + C\\}\] | Day | 1 | 2| 3| 4 | 5 | 6 | 7 | |:——:|:——:|:——:|:——:|:——:|:——:|:——:|:——:| |Incr | 2 | 2| 2 | 2 | 2 | 2| 2| |Balance | 2 | 4 | 6 | 8 | 10 | 12 | 14 | | | | | | | | | |Calculated | 2 | 4 | 6 | 8 | 10 | 12 | 14 |

5.18 Recursive definition

Each day add another penny to the amount to be added

\[\eqalign{\frac{dy}{dx} &=& x+1\\ dy &=& x + 1\ dx\\ \int y\ dy &=& \int x + 1\ dx\\ y &= \frac{x^2 + x}{2} + C\\}\]

Day 1 2 3 4 5 6 7
Incr 1 2 3 4 5 6 7
Balance 1 3 6 10 15 21 28
Calculated 1 3 6 10 15 21 28

5.19 Recursive definition

\[\eqalign{\frac{dy}{dt} &=& ky\\ \frac{1}{y}\ dy &=& k\ dt\\ \int \frac{1}{y}\ dy &=& \int k\ dt\\ \ln(y) &=& kt + C\\ y &=& e^{kt+C} = e^{kt}e^C = A e^{kt}\\}\]

5.20 Recursive definition to direct equation

\[\eqalign{\frac{dy}{dx} &=& -\frac{x}{y}\\ y\ dy &=& -x\ dx\\ \int y\ dy &=& \int -x\ dx\\ \frac{y^2}{2} &=& -\frac{x^2}{2} + k\\ x^2 + y^2 &=& C\\}\]

6 A note about the final exam

  • Date: 6 December 2023

  • Time: 13:00 - 16:00

  • Venue: PC402

  • You can bring:

    • A simple calculator (one that cannot integrate or differentiate)
    • An A4 page of notes