SOCR ≫ BPAD Website ≫ BPAD GitHub ≫

1 Calculus of Differentiation and Integration

Calculus of differentiation models properties of functional derivatives whereas calculus of integration characterizes antiderivatives (integrals). The derivative and integral operators are inverse operations of each other (cf. the fundamental theorem of calculus) that are defined using the concept of a limit.

1.1 Limits

The limit of a function \(f(x)\) as \(x\to a\) is equal to \(L\), i.e., \(\lim_{x\to a} {f(x)}=L\), if \(\forall \epsilon\gt 0\), \(\exists \delta_{\epsilon}\gt 0\), so that \(\forall x:\ {0\lt |x-a|\lt \delta_{\epsilon}}\), \(|f(x)-L|\lt \epsilon\). In other words, the limit of \(f(x)\) as \(x\) tends to \(a\) is equal to \(L\) when for every desired (function \(f\)) closeness (\(\epsilon\)) to \(L\), there is a small interval around \(a\) (excluding \(a\)) that achieves that closeness under the mapping \(f\).

Two algebraic properties of limits include:

  • \(\lim_{x\to a} (\lambda f(x) + \gamma g(x))=\lambda \lim_{x\to a} (f(x)) + \gamma\lim_{x\to a} (g(x))\),
  • Unless \(f(x)\) is continuous at \(a\), i.e. \(\lim_{x\to a} (f(x))=f(a)\), \(f(a)\) may be undefined and/or unrelated to \(\lim_{x\to a} (f(x))\).

Below, we show two examples of functions we can explore the limits of as the argument \(t\to -1\) and \(t\to 0\). Note that \(f_1(t)\) and \(f_2(t)\) have singularities at \(t=0\) and \(t=-1\), respectively, however, the piecewise definition of \(f_2(t)\) resolves that and controls the growth of the function near \(t=-1\).

\[f_1(t)=\frac{1}{t},\] and \[f_2(t)=\begin{cases} 20\left ( 1+ \frac{1}{t+1}\right ) & |t+1|\geq 0.1 \\ 0 & |t+1|\lt 0.1 \end{cases}.\]

library(plotly)    

# Define Domain values
t <- seq(from=-pi, to=pi, length.out = 1000)

# Define corresponding functional values
f1_val <- 1/t
f2_val <- ifelse(abs(t+1)<0.1, 0, 20*(1 + 1/(t+1)))

# compute the corresponding integral and Riemann sum approximations
funct1 <- function (t) {
  1/t
}
funct2 <- function (t) {
  if (abs(t+1)<0.1) return(0)
  else return(20*(1 + 1/(t+1)))
}

# plots
plot_ly(x = ~t, y = ~f1_val, type = 'scatter', name="y=f1(t)=1/t",
               mode = 'lines', opacity=0.7) %>%
  add_trace(x = ~t, y = ~f2_val, type = 'scatter', name="y=f2(t)=20(1 + 1/(t+1))",
               mode = 'lines', opacity=0.7) %>%
     layout(title="Function Limits", legend = list(orientation = 'h'))