IT204 Calculus

Course Orientation

Dr Robert Batzinger
Instructor Emeritus

Payap University
Chiang Mai, Thailand
15-Aug-2022

1 Welcome

 

to the first day of class!!

1.1 Self-Introductions

Who are you?

Speed round: (4 questions < 3min)

  • Your name and how you would like to be called
  • Where are you from?
  • What brings you to Chiang Mai?
  • Where and what do you want to be in 5 years time?
  • How enjoyable has your acquisition of math skills been?

1.1.1 Attitudes towards Calculus

When you think about calculus what words or emotions come to mind?

What do you think about math textbooks?

1.2 Your Instructor

linkedin

email: robert_b@payap.ac.th
Office: PC314 (Office hrs by appointment

1.3 Signing Up for the Class Resources

1.4 Course description

Definition and properties of the limit, rate-of-change and the derivative, differentiation laws, development of the definite integral as area under the curve, the indefinite integral and the Fundamental Theorem of Calculus, integrals of standard functions, techniques of integration, applications of integration, simple differential equations, introduction to partial differentiation and multi-variable integration.

1.5 Learning Objectives of this Course

By the end of the course, students should be able to:

  1. Explain the definition and properties of the limit.
  2. Determine limits graphically and numerically.
  3. Evaluate limits analytically.
  4. Determine continuity, one-sided limits, and infinite limits.
  5. Understand basic differentiation rules and rates of change.
  6. Calculate derivatives of a function.
  7. Compare the concepts of indefinite integral and definite integral.
  1. Demonstrate the fundamental theorem of calculus.
  2. Understand the concepts of integrals of standard functions.
  3. Classify the basic concepts of different integration techniques.
  4. Apply the concept of integration to solve the problems.
  5. Solve the simple differential equations.
  6. Understand the basic concepts of partial differentiation and multi-variable integration.

2 Why study calculus?

2.1 Case 1: Autonomous Quadracopters

Flight state: x,y,z,yaw,spin1,spin2,spin3,spin4

Flight path: Jerk, Snap, Acceleration, Velocity, Distance and Time

\(\begin{eqnarray} J_{t} &=& J_{(t-1)} + S_{t} dt\cr A_{t} &=& A_{(t-1)} + J_{t} dt\cr V_{t} &=& V_{(t-1)} + A_{t} dt\cr D_{t} &=& D_{(t-1)} + V_{t} dt\cr \end{eqnarray}\)

2.2 Case 2: Modeling snowfall in Dec 2010

Snowfall in Syracuse, Dec 3-10
dates 3 4.0 5.0 6.0 7.0 8.0 9.0 10.0
snowfall 0 2.1 6.8 12.9 9.3 11.8 1.9 0.1
Snowfall in Syracuse, Dec 10-18
dates 10.0 11 12 13.0 14 15.0 16.0 17
snowfall 0.1 0 0 1.4 5 7.6 3.4 1

2.2.1 Mathematical modeling of snowfall

\[y = \frac{1}{a}\left(\left(x-3\right)\left(x-11\right)\left(x-18\right)\right)^4\]

2.2.2 Graphing and Modelling

2.2.3 Minimizing Error

2.3 Case 3: Chirping crickets as thermometers

temp chirp1 chirp2 chirp3 chirp4 chirp5 V7
15 80 83 68 77 78 77.2
20 115 127 114 116 120 118.4
25 157 151 149 145 150 150.4
30 189 199 184 190 184 189.2
35 229 212 211 224 226 220.4

2.3.1 Modeling

\[T = 0.1381 C_{60} + 4.13\]

where \(T\) equals Temperature in Celsius, and \(C_{60}\) equals the number of chirps per min

  • Approximation: (Use counts per 58 sec)

\[T = \frac{C_{58}}{7} + 4\]

  • Model statistics:
Statistic Mean value Std dev
slope 0.138089 0.00337
intercept 4.132055 0.536978
\(R^2\) 0.9859 NA

3 Review of Algebra

3.1 Origins of Algebra

Algebra was described in the 9th century book (cIlm al-jabr wa l-muqābala) “The Science of Restoring and Balancing”, by the Persian mathematician al-Khwarizmi Muḥammad ibn Mūsā al-Khwārizmī. الجبر al-jabr “resetting” refers to moving a term between the sides of an equation, المقابلة al-muqābala “balancing” referred to adding equal terms to both sides. The book is full of algorithms for solving equations.

Muḥammad ibn Mūsā al-Khwārizmī

3.2 Properties of the equality \(a=b\)

Property Example
Addition property of equality: \(a + \color{red}{c}= b + \color{red}{c}\)
Subtraction property of equality: \(a - \color{red}{c} = b - \color{red}{c}\)
Multiplicative property of equality: \(a \color{red}{c}= b \color{red}{c}\)
Division property of equality: \(a /\color{red}{c} = b / \color{red}{c}\)
Reciprocal property of equality: \(\frac{1}{a} = \frac{1}{b}\)
Functional equivalents of equality: \(f(a) = f(b)\)

3.3 Some useful properties

Property Addition Multiplication
commutative \(a + b = b + a\) \(a b = b a\)
associative \((a+b)+c = a+(b+c)\) \((ab)c = a(bc)\)
distributive \(a(b+c)=ab + ac\)
identity \(a+0 = a\) \(a\times 1 = a\)
inverse \(I(a) = -a\) \(I(a) = \frac{1}{a}\)

3.4 Strategy to solving equations

  1. Using properties of equality, migrate variables to one side and constants to the other
  2. The Simplify left and right sides of the equation
  3. Rearrange the terms
  4. Apply operations to both sides
  5. Reduce the terms to simple terms

3.4.1 Example of an Algebratic expression

\[\frac{x+2}{4} = \frac{x-1}{3} +2\]

3.4.2 Solution: Part 1

\[\eqalign{\frac{x+2}{4} \color{red}{{- \frac{x-1}{3}}} &=& \color{yellow}{\frac{x-1}{3}} + 2 \color{red}{- \frac{x-1}{3}}\cr \color{red}{\left(\frac{3}{3}\right)}\left(\frac{x+2}{\color{yellow}{4}}\right) - \color{red}{\left(\frac{4}{4}\right)}\left(\frac{x-1}{\color{yellow}{3}}\right) &=& 2\cr \color{red}{12}\left(\frac{3x +6}{\color{yellow}{12}} - \frac{4x-4}{\color{yellow}{12}}\right) &=& 2 \color{red}{\times 12}}\]

3.4.3 Solution: Part 2

\(\begin{eqnarray}\color{yellow}{(3x + 6)} - \color{yellow}{(4x-4)} &=& 24\\ \color{red}{(3x - 4x)} + \color{red}{(6 + 4)} &=& 24 \\ -x + \color{yellow}{10} \color{red}{- 10} &=& 24 \color{red}{- 10}\\ \color{red}{-1}(\color{yellow}{-x}) &=& \color{red}{-1 \times}14\\ x &=& -14 \end{eqnarray}\)

3.4.4 Challenges: Solve for \(x\)

\[2(x-3) - 17 = 13 - 3(x+2)\]

\[\frac{3}{x+6} + \frac{1}{x-2} = \frac{4}{x^2 + 4x -12}\] \[\frac{1}{x} + \frac{1}{q} = \frac{1}{f}\]

\[(x^2 -25)(x + 5) = 11(x-5)\]

3.5 Multiplication of polynomials

\(\eqalign{(ax+b)(cx+d) &=& (acx^2 + adx) + bcx + bd)\\ &=& acx^2 + (ad+bc)x + bd}\)


\[(x+3)(x-2) = (x^x -2x) + (3x - 6)= x^2 + x -6\]

\[(x+3)(x+3) = (x^x +3x) + (3x + 9)= x^2 + 6x + 9\] \[(x+3)(x-3) = (x^x -3x) + (3x - 9)=x^2 - 9\]

3.6 Graphically Factoring polynomials

Given this graph of an unknown relationship what can we say about its root factors and its behavior?

3.6.1 Effects of order of the function

3.6.2 Functions that share root factors

3.7 Solving systems of equations

\[\begin{eqnarray} y &=& \frac{x}{2} -1 \\ y &=& -2x + 1\\ \\ \frac{x}{2} -1 &=& -2x + 1\\ \frac{x}{2} -1 \color{red}{+ 2x +1}&=& -2x + 1\color{red}{+ 2x +1}\\ \left(\frac{5}{2}\right)x\color{red}{\times \frac{2}{5}} &=& 2\color{red}{\times \frac{2}{5}}\\ x &=& \frac{4}{5}\\ y &=& -2\left(\frac{4}{5}\right) + 1 = -\frac{8}{5} + 1\\ y &=&-\frac{3}{5} \end{eqnarray}\]

3.8 Quadratic formula

\[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\]


* For \(x^2-25 = 0\) : \((x+5)(x-5)\)

\[x = \frac{\pm\sqrt{-4(-25)}}{2} = \pm \frac{\sqrt{100}}{2} = \pm 5\]

  • For \(x^2 +7x +10 = 0:\) \((x+5)(x+2)=0\)
\[x = \frac{-7\pm \sqrt{49-40}}{2} = \frac{-7 \pm \sqrt{9}}{2} = \frac{-7\pm 3}{2} = -5,-2\]

3.8.1 Maximum/Minimum values of a Quadratic

\(\frac{-b}{2a} = \cases{x_{(y_{max})}, & if a < 0\cr x_{(y_{min})}, & if a > 0\cr}\)

3.9 Multiple variables in a linear system

\(\begin{eqnarray} 2x & + y & + z &=& 5\cr 4x &- 6y & &=& -2\cr -2x &+ 7y & + 2z &=& 9 \cr \end{eqnarray}\)

  • Matrix representation

\(\left[\begin{matrix} 2 & 1M& 1\cr 4&-6& 0\cr -2& 7& 2&\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} 5\cr -2\cr 9 \cr \end{matrix}\right]\)

3.9.1 Solution by matrix rearrangments (2)

  • Gaussian elimination of first variable

\(\left[ \begin{matrix} 1 & \frac{1}{2} & \frac{1}{2}\cr 4-2\times2 &-6-2\times1 & 0-2\times1\cr -2+2& 7+1& 2+1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{5}{2}\cr -2-2\times5\cr 9 + 5\cr \end{matrix}\right]\)

  • Rearrange

\(\left[ \begin{matrix} 1 & \frac{1}{2} & \frac{1}{2}\cr 0 &-8 & -2\cr 0& 8& 3\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{5}{2}\cr -12\cr 14\cr \end{matrix}\right]\)

3.9.2 Solution by matrix rearrangments (3)

  • Gaussian elimination of second variable

\(\left[ \begin{matrix} 1 & \frac{1}{2} & \frac{1}{2}\cr 0 &\frac{-8}{-8} & \frac{-2}{-8}\cr 0& 8-8& 3-2\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{5}{2}\cr \frac{-12}{-8}\cr 14-12\cr \end{matrix}\right]\)

  • Rearrange

\(\left[ \begin{matrix} 1 & \frac{1}{2} & \frac{1}{2}\cr 0 & 1 & \frac{1}{4}\cr 0& 0& 1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{5}{2}\cr \frac{3}{2}\cr 2\cr \end{matrix}\right]\)

3.9.3 Solution by matrix rearrangments (4)

  • Back substitute the third variable \(\left[ \begin{matrix} 1 & \frac{1}{2} & \frac{1}{2}-\frac{1}{2}\cr 0 & 1 & \frac{1}{4}-\frac{1}{4}\cr 0& 0& 1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{5}{2} -\frac{2}{2}\cr \frac{3}{2}-\frac{2}{4}\cr 2\cr \end{matrix}\right]\)

  • Rearrange

\(\left[ \begin{matrix} 1 & \frac{1}{2} & 0 \cr 0 & 1 & 0 \cr 0& 0& 1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} \frac{3}{2}\cr 1 \cr 2\cr \end{matrix}\right]\)

3.9.4 Solution by matrix rearrangments (5)

  • Back substitution of 2nd variable

\(\left[ \begin{matrix} 1 & \frac{1}{2}-\frac{1}{2} & 0 \cr 0 & 1 & 0 \cr 0& 0& 1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right]= \left[\begin{matrix} \frac{3}{2} - \frac{1}{2} \cr 1 \cr 2\cr \end{matrix}\right]\)

  • Rearrange

\(\left[ \begin{matrix} 1 & 0 & 0 \cr 0 & 1 & 0 \cr 0& 0& 1\cr\end{matrix}\right] \left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} 1 \cr 1 \cr 2\cr \end{matrix}\right]\)

  • Solution

\(\left[ \begin{matrix} x \cr y \cr z \cr\end{matrix}\right] = \left[\begin{matrix} 1 \cr 1 \cr 2\cr \end{matrix}\right]\)

3.9.5 Solution by matrix rearrangments (6)

  • Validation

\[\left[\begin{matrix} 2 & 1 & 1\cr 4&-6& 0\cr -2& 7& 2&\cr\end{matrix}\right] \left[\begin{matrix} 1 \cr 1 \cr 2\cr \end{matrix}\right] = \left[\begin{matrix} 2\times 1 + 1\times 1 +1\times 2\cr 4 \times 1 + -6\times 1 + 0\times 2\cr -2\times 1+ 7\times 1 + 2\times 2 \cr\end{matrix}\right] =\]

\[\left[\begin{matrix} 2 + 1 + 2\cr 4 + -6 \cr -2 + 7 + 4\cr\end{matrix}\right] = \left[\begin{matrix} 5\cr -2\cr 9 \cr \end{matrix}\right]\]

3.10 Chemical Stoichiometry

\[C_6H_{12}O_6 + O_2 \longrightarrow CO_2 + H_2O\]

Setup the Stoichiometry Table

Parameter \(C_6H_12O_6\) \(O_2\) \(CO_2\) \(H_2O\)
Number of Molecules \(x\) \(y\) \(z\) \(w\)
Sugar molecule \(x = 1\)
Carbon atoms \(6x\) \(-z\)
Hydrogen atoms \(12x\) \(-2w\)
Oxygen atoms \(6x\) \(2y\) \(-2z\) \(-w\)

3.10.1 Matrix version

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 6 & 2 & -2 & -1\cr12 & 0 & 0 & -2\cr 6 & 0 & -2 & 0 \cr\end{matrix}\right]\left[\begin{matrix}x\cr y\cr z\cr w\cr\end{matrix}\right] = \left[\begin{matrix}1\cr0\cr0\cr0\cr\end{matrix}\right]\]

  • Gaussian elimination of the first variable

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 0 & 2 & -2 & -1\cr 0 & 0 & 0 & -2\cr 0 & 0 & -2 & 0 \cr\end{matrix}\right]\left[\begin{matrix}x\cr y\cr z\cr w\cr\end{matrix}\right] = \left[\begin{matrix}1\cr -6\cr -12\cr -6\cr\end{matrix}\right]\]

3.10.2 Stoichiometry

  • Gaussian elimination of the second variable

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 0 & 1 & -1 & -\frac{1}{2}\cr 0 & 0 & 0 & -2\cr 0 & 0 & -2 & 0 \cr\end{matrix}\right]\left[\begin{matrix}x\cr y\cr z\cr w\cr\end{matrix}\right] = \left[\begin{matrix}1\cr -3\cr -12\cr -6\cr\end{matrix}\right]\]

  • Gaussian elimination of the 3rd and 4th variable

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 0 & 1 & -1 & -\frac{1}{2}\cr0 & 0 & 1 & 0 \cr 0 & 0 & 0 & 1\cr \end{matrix}\right]\left[\begin{matrix}x\cr y\cr z\cr w\cr\end{matrix}\right] = \left[\begin{matrix}1\cr -3\cr 3\cr 6\cr\end{matrix}\right]\]

3.10.3 Stoichiometry

  • Back substitution

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 0 & 1 & 0 & 0 \cr0 & 0 & 1 & 0 \cr 0 & 0 & 0 & 1\cr \end{matrix}\right]\left[\begin{matrix}x\cr y\cr z\cr w\cr\end{matrix}\right] = \left[\begin{matrix}1\cr 3\cr 3\cr 6\cr\end{matrix}\right]\]

  • Solution

\[C_6H_{12}O_6 + 3 O_2 \longrightarrow 3 CO_2 + 6 H_2O\]

3.10.4 Stoichiometry

  • Validation

\[\left[\begin{matrix} 1 & 0 & 0 & 0\cr 6 & 2 & -2 & -1\cr12 & 0 & 0 & -2\cr 6 & 0 & -2 & 0 \cr\end{matrix}\right]\left[\begin{matrix}1\cr 3\cr 3\cr 6\cr\end{matrix}\right] = \left[\begin{matrix}1\cr6+6-6-6\cr12-12\cr6-6\cr\end{matrix}\right]=\left[\begin{matrix}1\cr0\cr0\cr0\cr\end{matrix}\right]\]

3.10.5 Exercise:

\[IO_3^- + I^- + H^+ \longrightarrow I_3^- + H_2O\]

Variables \(x\) \(y\) \(z\) \(w\) \(v\) total
Molecules \(IO_3^-\) \(I^-\) \(H^+\) \({I_3}^-\) \(H_2O\) -
I \(x\) \(y\) \(-3w\) 0
O \(3x\) \(-v\) 0
H \(z\) \(-2v\) 0
electrons \(x\) \(y\) \(-z\) \(-w\) 0
Multiple \(x\) 1

\[IO_3^- + 8I^- + 6H^+ \longrightarrow 3{I_3}^- + 3H_2O\]

4 Functions and graphs

  • Function can be restricted to a range of input and/or a domain of output
  • Not all functions have inverse function.
  • All points in the range will return a single point in the domain.
  • In some functions, multiple points in the ranges can return the same value within the domain.

4.0.1 Identify the functions and non-functions

4.1 Simple Polynomials

4.1.1 Polynomials with Offsets

4.1.2 Polynomials with Offsets

5 Logarithms

5.1 Slide Rule

Slide Rule Cursor

The slide rule was a mechanical analog computer based on logrithms. It was invented in the 1600’2 to multiply and divide numbers and provide values for logarithmic, and trigonometric functions. Output was 3 significant decimal digits in scientific notation.

5.1.1 Multiplication on a slide rule

Multiplying with a slide rule

  • Adding distance of \(a\) to that of \(b\) determine the product \(ab\)
  • Place the 1 value of the slide C scale over the value of \(a\)
  • Use the cursor to find the value of \(b\) on the same scale.
  • Read the corresponding value on the fixed C scale.

5.1.2 Multiplication

  • No change of magnitude: \(2\times 3 = 6\)

\(\begin{eqnarray} \log(6) &=& \log(1) &+& \log(2) &+& \log(3)\\ 0.7781_{(6)} &=& 0.0000_{(0)} &+& 0.3010_{(2)} &+& 0.4771_{(3)}\\ \end{eqnarray}\)

  • Adds an order of magnitude: \(2\times 6 = 12\)

\(\begin{eqnarray} \log(ab) &=& \log(1) &+& \log(a) &+& \log(b)\\ 1.0791_{(12)} &=& 0.0000_{(0)} &+& 0.3010_{(2)} &+& 0.7781_{(6)}\\ \end{eqnarray}\)

5.1.3 Other operations

Exponentiation:

\(\begin{eqnarray} \log(x^y) &=& y \log(x)\\ \log(3^4) &=& 4 \log(3)\\ 1.9084_{(81)} &=& 4 \times 0.4771_{(3)}\\ \end{eqnarray}\)

Square root

\(\begin{eqnarray} \log(\sqrt{x}) &=& \log(x^{\frac{1}{2}}) = \frac{\log(x)}{2}\\ \log(\sqrt{4}) &=& \log(4^{\frac{1}{2}}) = \frac{\log(4)}{2}\\ 0.3010_{(2)} &=& 0.5 \times 0.6021_{(4)}\\ \end{eqnarray}\)

5.1.4 Converting between log and numbers

\[x = 10^{\log(x)}\]

displayLog <- function(x) {
  cat(
    sprintf("%8.5f %7.5f %8.5f\n",
            x,log10(x),10**log10(x)))
}
for (x in 1:10) { displayLog(x) }
 1.00000 0.00000  1.00000
 2.00000 0.30103  2.00000
 3.00000 0.47712  3.00000
 4.00000 0.60206  4.00000
 5.00000 0.69897  5.00000
 6.00000 0.77815  6.00000
 7.00000 0.84510  7.00000
 8.00000 0.90309  8.00000
 9.00000 0.95424  9.00000
10.00000 1.00000 10.00000

5.1.5 Converting between \(\log_{10}(x)\) and \(\log_n(x)\)

\[log_n(x) = \frac{\log_{10}(x)}{\log_{10}{(n)}}\]

logn <- function(n,x) {
  logx10 = log10(x)
  logn10 = log10(n)
  logxn = logx10 / logn10
  cat(
    sprintf(
      "%8.5f %7.5f %7.5f %7.5f %8.5f\n",
      x,logx10,logn10,logxn,n**logxn))
}
cat("x log10(x) log10(n) logN(x) n^(logN(x)\n")
for (x in 2:10) { logn(2,x) }

5.1.6 Output

 x log10(x) log10(n) log2(x) 2^(log2(x)
   2  0.3010  0.3010  1.0000  2.0000
   3  0.4771  0.3010  1.5850  3.0000
   4  0.6021  0.3010  2.0000  4.0000
   5  0.6990  0.3010  2.3219  5.0000
   6  0.7782  0.3010  2.5850  6.0000
   7  0.8451  0.3010  2.8074  7.0000
   8  0.9031  0.3010  3.0000  8.0000
   9  0.9542  0.3010  3.1699  9.0000
  10  1.0000  0.3010  3.3219 10.0000

6 Trigonometry

6.1 Estimates of Pi

  • Archimedes: \(\frac{22}{7}\)

  • Zu Chongzhi: \(\frac{355}{113}\)

  • Gregory-Leibniz Series:
    \(\frac{\pi}{4}=1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{9}-\ldots\)

  • Nilakantha Series:
    \(\pi= 3+ \frac{4}{2\times 3 \times 4}-\frac{4}{4\times 5 \times 6}+\frac{4}{6\times 7 \times 8}-\frac{4}{8\times 9 \times 10}+\ldots\)

7 Trigonometric functions

7.0.1 Equivalences

$$\[\begin{eqnarray} 1 &=& sin(x)^2 + cos(x)^2\cr sin(x) &=&\sqrt{1-cos(x)^2}\cr \end{eqnarray}\]$$

7.0.2 Law of Sines

\(\frac{A}{sin(a)} = \frac{B}{sin(b)} = \frac{C}{sin(c)}\)