Chapter 5.7 Analysis of Error
In this section, we learn about how to describe certain qualitative features of a function using limits. We introduce new notation to define the subtle differences.
Asymptotic Notation
The functions \({\rm pow}_1\), \({\rm pow}_2\), and \({\rm pow}_6\) all have the property that \[\lim_{x\to 0} {\rm pow}_1(x) = \lim_{x\to 0} {\rm pow}_2(x) = \lim_{x\to 0}{\rm pow}_6(x) = 0,\] but their behavior near 0 qualitatively appears different.
Here are sketches of these functions:
The behavior of \(\rm{pow}_1\) near \(0\) is different from \(\rm{pow}_2\) and \(\rm{pow}_6\). The behavior of \(\rm{pow}_2\) and \(\rm{pow}_6\) is similar near \(0\), but there is a difference. It appears “flatter” near \(0\) for the sketch of \(\rm{pow}_6\) compared to the sketch of \(\rm{pow}_2.\)
To continue our discussion, we first define what we mean by local behavior.
Local Behavior
For any function \(f\) and any real number \(x_0\) that is a limit point of \(\mathcal D(f)\), the local behavior of \(f\) at \(x_0\) is, roughly, the information about \(f\) that, for any open interval \(I\) that contains \(x_0\), can be recovered from the values of \(f\) on \((\mathcal D(f)\cap I)\setminus\{x_0\}\).
The Landau Notation is useful for capturing such information about a function.
The quantification of the interval \(I\) over all open intervals makes precise the idea that these are the properties of a function that depend only on the \(x\)-coordinates being “close enough” to \(x_0\).
Landau Big O Notation
For any function \(f\) and any limit point \(x_0\) of \(\mathcal D(f)\), \(f\) is \(\displaystyle \underset{x\to x_0}O (g(x))\) (reads: “big oh of \(g\) of \(x\) at \(x_0\)”) if there is
an open interval \(I\) that contains \(x_0\)
and a bounded function \(\eta\) that is defined on \((\mathcal D(f)\cap I)\setminus\{x_0\}\)
so that for all \(x\) in \((\mathcal D(f)\cap I)\setminus\{x_0\}\), \[f(x) = \eta(x)g(x).\]
Essentially, the function \(f\) can be “factored” into two functions, a function \(g\) and a bounded function \(\eta\) near \(x_0\), but necessarily at \(x_0\).
In the next example, use the definition to identify the local behavior of the function.
Example 1
For each rational function \(f\) that is given below, classify all zeros of \(f\) by finding the largest natural number \(n\) and a real number \(x_0\) so that \(f\) is \(O((x-x_0)^n)\):
\(f(x) = \frac{x^3}{x+2}\);
\(f(x) = \frac{(x+3)(x-5)^2}{(x-1)}\);
- The zero of \(f\) is \(x_0=0\). The function \(f\) can be rewritten like this: \[\frac{x^3}{x+2}= (x-0)^3\cdot\frac{1}{x+2}.\] The function \(\eta(x)=\frac{1}{x+2}\) is bounded on \(I=(-1,1)\) since it is continuous on the closed and bounded interval \([-1,1]\) (See Theorem 4 in Chapter 5.6). Hence, \(f\) is \(O(x^3)\) because
- there is an open interval \(I=(-1,1)\) that contains \(x_0=0\)
- a bounded function \(\eta(x)=\frac{1}{x+2}\) defined on \((-1,0)\cup(0,1)\)
- so that \(f(x)=(x-0)^3\cdot\frac{1}{x+2}\).
- The zeros of \(f\) is \(x_0=-3\) and \(x_0=5\). The function \(f\) can be rewritten like this: \[\frac{(x+3)(x-5)^2}{(x-1)}= (x+3)\cdot\frac{(x-5)^2}{(x-1)}.\] The function \(\eta(x)=\frac{(x-5)^2}{x-1}\) is bounded on \(I=(-4,-2)\) since it is continuous on the closed and bounded interval \([-4,-2]\) (See Theorem 4 in Chapter 5.6). Hence, \(f\) is \(O(x+3)\) because
- there is an open interval \(I=(-4,-2)\) that contains \(x_0=-3\)
- a bounded function \(\eta(x)=\frac{(x-5)^2}{x-1}\) defined on \((-4,-3)\cup(-3,4)\)
- so that \(f(x)=(x+3)\cdot\frac{(x-5)^2}{(x-1)}\).
The function \(f\) can be rewritten like this: \[\frac{(x+3)(x-5)^2}{(x-1)}= (x-5)^2\cdot\frac{x+3}{x-1}.\] The function \(\eta(x)=\frac{x+3}{x-1}\) is bounded on \(I=(4,6)\) since it is continuous on the closed and bounded interval \([4,6]\) (See Theorem 4 in Chapter 5.6). Hence, \(f\) is \(O((x-5)^2)\) because
there is an open interval \(I=(4,6)\) that contains \(x_0=5\)
a bounded function \(\eta(x)=\frac{x+3}{x-1}\) defined on \((4,5)\cup(5,6)\)
so that \(f(x)=(x-5)^2\cdot\frac{x+3}{x-1}\).
A related but different way to describe local behavior is by using Landau little o notation.
Landau Little O Notation
For any function \(f\) and any limit point \(x_0\) of \(f\), a function \(f\) is \(\displaystyle \underset{x\to x_0}o (g(x))\) (reads: “little oh of \(g\) of \(x\) at \(x_0\)”) if there is
an open interval \(I\) that contains \(x_0\)
and a function \(\eta\) that is defined on \((\mathcal D(f)\cap I)\setminus\{x_0\}\) with \[\lim_{x\to x_0} \eta(x) = 0,\]
so that for all \(x\) in \((\mathcal D(f)\cap I)\setminus\{x_0\}\), \[f(x) = \eta(x)g(x).\]
The key difference between little o and big O notation is that for little o, we need the function \(\eta\) to not just be bounded near \(x_0\) but also have its limit at \(x_0\) go to zero.
In the next example, we show a connection between big o and little o notation.
Example 2
Show that any function that is \(O((x-x_0)^2)\) is \(o(x-x_0)\).
Because \(f\) is \(O((x-x_0)^2)\),
there is an open interval \(I\) that contains \(x_0\)
and a bounded function \(\eta(x)\) defined on \((\mathcal{D}(f)\cap I)\setminus\{x_0\}\)
so that for all \(x\) in \((\mathcal{D}(f)\cap I)\setminus\{x_0\}\) \(f(x)=\eta(x)(x-x_0)^2\).
The claim is that \(f\) is \(o(x-x_0)\). First rewrite \(f\). Instead of \(f(x)=\eta(x)(x-x_0)^2\) rewrite it as \(f(x)=[\eta(x)(x-x_0)]\cdot(x-x_0),\) Define \(\eta'(x)=\eta(x)(x-x_0)\). To satisfy the definition of \(o(x-x_0)\), show \(\displaystyle\lim_{x\to x_0}\eta'(x)=0\). Use the squeeze theorem. Since \(\eta\) is bounded, \[\begin{align*}m\leq &\eta(x)\leq M\\ m(x-x_0)\leq&(x-x_0)\eta(x)\leq M(x-x_0) \end{align*}\] or \(m(x-x_0)\geq(x-x_0)\eta(x)\geq M(x-x_0)\) depending on if \(x>x_0\) or \(x<x_0\). However, in either case, both \(\displaystyle\lim_{x\to x_0}m(x-x_0)=0\) and \(\displaystyle\lim_{x\to x_0}M(x-x_0)=0,\) Apply the squeeze theorem to conclude \(\displaystyle\lim_{x\to x_0}\eta'(x)=0\).
Thus \(f\) is \(o(x-x_0)\)
In this example, practice identifying both big O and little o behavior of the following functions.
Example 3
For each function \(f\) that is given below, find the largest natural numbers \(m\) and \(n\) so that \(f\) is \(O((x-x_0)^m)\) and \(o((x-x_0)^n)\):
\(x_0 = 2\) and \(f(x) = (x+3)(x-2)^3\);
\(x_0 = 5\) and \(f(x) = (x+1)\sin(x-5)\);
\(x_0 = 0\) and \(f(x) = (x+1)^\frac{1}{5}(1-\cos(x))\).
- The function \(f\) is \(O((x-2)^3)\) since \(f(x)=(x+3)(x-2)^3\) can be rewritten as \(\eta(x)(x-2)^3\) where \(\eta(x)=(x+3)\) is a bounded function on the interval \(I=(1,2)\cup(2,3)\). However, \(f\) is \(o((x-2)^2)\) since \(f(x)=(x+3)(x-2)^3\) can be rewritten as \(\eta(x)(x-2)^2\) where \(\eta(x)=(x-2)(x+3)\) is a function defined \(I=(1,2)\cup(2,3)\) with \(\displaystyle\lim_{x\to 2}\eta(x)=\lim_{x\to 2}(x-2)(x+3)=0\).
- The function \(f\) is \(O((x-5))\) since \(f(x)=(x+1)\sin(x-5)\) can be rewritten as \((x+1)\sin(x-5)=\tfrac{(x-5)}{(x-5)}(x+1)\sin(x-5)=\eta(x)(x-5)\) where \(\eta(x)=(x+1)\tfrac{\sin(x-5)}{x-5}\) is a bounded function on the interval \(I=(4,5)\cup(5,6)\). However, \(f\) is not \(o((x-5))\) since \(\displaystyle\lim_{x\to 5}\eta(x)=\displaystyle\lim_{x\to 5}(x+1)\tfrac{\sin(x-5)}{x-5}=6\cdot 1=6\) is not equal to zero.
- The function \(f\) is \(O((x)^2)\) since \(f(x)=(x+1)^{1/5}(1-\cos(x))\) can be rewritten as \((x+1)^{1/5}(1-\cos(x))=\tfrac{(x+1)^{1/5}(1-\cos(x))}{x^2}\cdot x^2=\eta(x)x^2\) where \(\eta(x)=\tfrac{(x+1)^2(1-\cos(x))}{x^2}\) is a bounded function on the interval \(I=(-1,0)\cup(0,1)\). This is because \((x+1)^{1/5}\) is bounded in \((-1,0)\cup(0,1)\) and \(\tfrac{1-\cos(x)}{x^2}\) is bounded in \((-1,0)\cup(0,1)\) since \(\displaystyle\lim_{x\to 0}\tfrac{1-\cos(x)}{x^2}=\frac{1}{2}\).
However \(f\) is \(o(x)\) since \((x+1)^{1/5}(1-\cos(x))=\tfrac{(x+1)^{1/5}(1-\cos(x))}{x}\cdot x=\eta(x)x\) and \(\displaystyle\lim_{x\to 0}\eta(x)=\displaystyle\lim_{x\to 0}(x+1)^{1/5}\tfrac{1-\cos(x)}{x}=1\cdot 0=0\).
The Big O notation can also be used to describe how the function \(f\) itself behaves without reference to another function.
Big O 1 Notation
Take \(1\) to be the constant function defined for all \(x\) by \[1(x) = 1.\]
A function \(f\) is \(\displaystyle \underset{x\to x_0} O (1(x))\) means that there is
an open interval \(I\) that contains \(x_0\),
and a bounded function \(\eta_f\),
so that for every \(x\) in \((\mathcal D(f)\cap I)\setminus\{x_0\}\), \[f(x) = \eta_f(x)1(x) = \eta_f(x).\]
To say that a function \(f\) is \(\displaystyle \underset{x\to x_0} O (1(x))\) is just a way of saying that \(f\) is bounded in a small enough open interval containing \(x_0\), but that \(f\) might not be defined at \(x_0\).
Little o 1 Notation
A function \(f\) is \(\displaystyle \underset{x\to x_0} o (1(x))\) means that there is
an open interval \(I\) that contains \(x_0\),
a function \(\eta_f\) with \(\displaystyle\lim_{x\to 0}\eta_f(x)=0\),
so that for every \(x\) in \((\mathcal D(f)\cap I)\setminus\{x_0\}\), \[f(x) = \eta_f(x)1(x) = \eta_f(x).\]
Confirm your understanding with the next example.
Example 4
Show that the function \(f\) that is given by \[f(x) = \tfrac{(x+2)^2(x-4)}{(x-4)(x-6)}\] is not defined at \(4\), but is \(\displaystyle \underset{x\to 4} O (1(x))\).
The function \(f\) is undefined at \(x=4\) because of the \((x-4)\) term. However, when \(x\not=4\), \[ \tfrac{(x+2)^2(x-4)}{(x-4)(x-6)}=\tfrac{(x+2)^2}{x-6},\] Take \(\eta_f(x)=\tfrac{(x+2)^2}{x-6}\) and \(I=(3,5)\).
Then \(f(x)=\eta_f(x)\) in \((3,4)\cup(4,5)\) and \(\eta_f\) is a bounded function.
Thus \(f\) is \(\displaystyle \underset{x\to 4} O(1(x))\).
In this next example, understand the implications of big O and little o notation.
Example 5
Determine whether or not the following statements are true or false:
- For any function \(f\) that is \(\displaystyle \underset{x\to x_0} O(1(x))\) but not defined at \(x_0\), \(f\) has a continuous extension to \(x_0\).
- For any function \(f\) that is \(\displaystyle \underset{x\to x_0} o (1(x))\) but not defined at \(x_0\), \(f\) has a continuous extension to \(x_0\).
Note that \(\displaystyle \underset{x\to x_0} O (1(x))\) means that there is an interval \(I\) containing \(x_0\) and a bounded function \(\eta_f(x)\) so that for every \(x\) in \((\mathcal{D}(f)\cap I)\setminus \{x_0\}\), \(f(x)=\eta_f(x)\). There is no additional information on whether \(\eta_f(x)\) has a limit at \(x_0\). So there may or may not be a continuous extension.
Note \(\displaystyle \underset{x\to x_0} o (1(x))\) means that \(f(x)=\eta_f(x)\) for \(x\) near \(x_0\) but not equal to \(x_0\) and \(\displaystyle \lim_{x\to x_0}\eta_f(x)=0.\) Define a continuous extension of \(f\) to \(\mathbb{R}\) by \[g(x)=\begin{cases}f(x)&\text{if }x\not=x_0\\ 0&\text{ if } x=x_0\end{cases}.\]
In order to advance our understanding of local behavior, we define a new function, called the finite difference operator.
Finite Difference Operator
For any function \(f\) and any \(x_0\) that is in \(\mathcal D(f)\), define the finite difference operator at \(x_0\), \(\Delta_{x_0}\), by \[(\Delta_{x_0}f)(h) = f(x_0+h) - f(x_0).\]
The \(o\)-Landau notation is useful for describing continuity at the point \(x_0\) using \(\Delta_{x_0}\).
Theorem on Continuity and Little O Notation
Given that \(x_0\) is a limit point of \(\mathcal D(f)\), the statement that \(\Delta_{x_0}f\) is \(\displaystyle \underset{h\to 0} o (1(h))\) is equivalent to the statement that \(f\) is continuous at \(x_0\).
This follows since \(\Delta_{x_0}f(h)=f(x_0+h)-f(x_0)\) is \(\displaystyle \underset{h\to 0}o(1(h))\) means that there is an open interval \(I\) containing \(x_0\) and a function \(\eta_f(x)=f(x_0+h)-f(x_0)\) defined with \(\displaystyle\lim_{h\to 0}\eta_f(h)=0\). Meaning \(\displaystyle\lim_{h\to 0}f(x_0+h)-f(x_0)=0\) so \(\displaystyle\lim_{h\to 0}f(x_0+h)=f(x_0)\). Thus \(f\) is continuous at \(x_0\).
In the next example, calculate the finite difference operator for each function.
Example 6
For each function \(f\) and each real number \(x_0\), write a formula for \(\Delta_{x_0}f(h)\) and simplify the expression as much as possible:
- \(x_0 = 3\) and \(f(x) = x^2\);
- \(x_0 = 9\) and \(f(x) = \sqrt{x}\);
- \(x_0 = \frac{\pi}{6}\) and \(f(x) = \sin(x)\).
\(\Delta_{3}f(h)=f(3+h)-f(3)=(3+h)^2-3^2=9+6h+h^2-9=6h+h^2\)
\(\Delta_{9}f(h)=f(9+h)-f(9)=\sqrt{9+h}-\sqrt{9}=(\sqrt{9+h}-3)\cdot \tfrac{\sqrt{9+h}+3}{\sqrt{9+h}+3}=\tfrac{9+h-9}{\sqrt{9+h}+3}=\tfrac{h}{\sqrt{9+h}+3}\)
\[\begin{align*}\Delta_{\tfrac{\pi}{6}}f(h)&=f(\tfrac{\pi}{6}+h)-f(\tfrac{\pi}{6})\\ &=\sin(\tfrac{\pi}{6}+h)-\sin(\tfrac{\pi}{6})\\&=\sin(\tfrac{\pi}{6})\cos(h)+\sin(h)\cos(\tfrac{\pi}{6})-\sin(\frac{\pi}{6})\\&=\frac{1}{2}\cos(h)+\tfrac{\sqrt{3}}{2}\sin(h)-\frac{1}{2}\\&=\tfrac{1}{2}(\cos(h)-1)+\tfrac{\sqrt{3}}{2}\sin(h)\end{align*}\]
Composite Errors
It is important to understand the local properties of functions that are sums and products of functions.
Big and Little O Theorems
For any functions \(f\) and \(g\),
- if \(f\) is \(\displaystyle o(x-a)\) and \(g\) is \(\displaystyle o(x-a)\), then \(f+g\) is \(\displaystyle o(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\);
- if \(f\) is \(\displaystyle o(x-a)\) and \(g\) is \(\displaystyle O(x-a)\), then \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\);
- if \(f\) is \(\displaystyle O(x-a)\) and \(g\) is \(\displaystyle O(x-a)\), then \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle O((x-a)^2)\).
In this next example, we prove the first statement of the Big and Little O Theorems.
Example 7
Show that for any real valued functions \(f\) and \(g\), if \(f\) is \(\displaystyle o(x-a)\) and \(g\) is \(\displaystyle o(x-a)\), then \(f+g\) is \(\displaystyle o(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\)
Since \(f\) and \(g\) are \(\displaystyle o(x-a)\), there are open intervals \(I_1\) and \(I_2\) that contain \(a\) and functions \(\eta_1\) and \(\eta_2\) with \(\displaystyle\lim_{x\to a}\eta_1(x)=0\) and \(\displaystyle\lim_{x\to a}\eta_2(x)=0\) so that \[f(x)=\eta_1(x)(x-a)\] and \[g(x)=\eta_2(x)(x-a)\]. Therefore,
\[f(x)+g(x)=\eta_1(x)(x-a)+\eta_2(x)(x-a)=(\eta_1(x)+\eta_2(x))\cdot (x-a)\] and \[f(x)\cdot g(x)=\eta_1(x)(x-a)\cdot\eta_2(x)(x-a)=(\eta_1(x)\eta_2(x))\cdot (x-a)^2\]
for an open interval that is a subset of \(I_1\cap I_2\).
Since \(\eta_1\) and \(\eta_2\) are functions with \(\displaystyle\lim_{x\to a}\eta_1(x)=0\) and \(\displaystyle\lim_{x\to a}\eta_2(x)=0\), \(\displaystyle\lim_{x\to a}(\eta_1+\eta_2)=0\) and \(\displaystyle\lim_{x\to a}\eta_1\eta_2=0\).
Therefore \(f+g\) is \(\displaystyle o(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\)
In this next example, we prove the second statement of the Big and Little O Theorems.
Example 8
Show that for any real valued functions \(f\) and \(g\), if \(f\) is \(\displaystyle o(x-a)\) and \(g\) is \(\displaystyle O(x-a)\), then \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\).
Since \(f\) is \(\displaystyle o(x-a)\), there is an open intervals \(I_1\) that contain \(a\) and a function \(\eta_1\) with \(\displaystyle\lim_{x\to a}\eta_1(x)=0\) so that \[f(x)=\eta_1(x)(x-a)\].
Since \(g\) is \(\displaystyle O(x-a)\), there is an open intervals \(I_2\) that contain \(a\) and a bounded function \(\eta_2\) so that \[g(x)=\eta_2(x)(x-a)\].
Therefore,
\[f(x)+g(x)=\eta_1(x)(x-a)+\eta_2(x)(x-a)=(\eta_1(x)+\eta_2(x))\cdot (x-a)\] and \[f(x)\cdot g(x)=\eta_1(x)(x-a)\cdot\eta_2(x)(x-a)=(\eta_1(x)\eta_2(x))\cdot (x-a)^2.\]
Since \(\eta_1\) satisfies \(\displaystyle\lim_{x\to a}\eta_1(x)=0\) and \(\eta_2\) is a bounded function, then \(\eta_1+\eta_2\) is bounded and \(\displaystyle\lim_{x\to a}\eta_1\eta_2=0\) (use the squeeze theorem).
Therefore \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle o((x-a)^2)\)
In this next example, we prove the third statement of the Big and Little O Theorems.
Example 9
Show that for any real valued functions \(f\) and \(g\), if \(f\) is \(\displaystyle O(x-a)\) and \(g\) is \(\displaystyle O(x-a)\), then \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle O((x-a)^2)\).
Since \(f\) and \(g\) are \(\displaystyle O(x-a)\), there are open intervals \(I_1\) and \(I_2\) that contain \(a\) and bounded functions \(\eta_1\) and \(\eta_2\) so that \[f(x)=\eta_1(x)(x-a)\] and \[g(x)=\eta_2(x)(x-a)\]. Therefore,
\[f(x)+g(x)=\eta_1(x)(x-a)+\eta_2(x)(x-a)=(\eta_1(x)+\eta_2(x))\cdot (x-a)\] and \[f(x)\cdot g(x)=\eta_1(x)(x-a)\cdot\eta_2(x)(x-a)=(\eta_1(x)\eta_2(x))\cdot (x-a)^2\]
for an open interval that is a subset of \(I_1\cap I_2\).
Since \(\eta_1\) and \(\eta_2\) are bounded functions, \(\eta_1+\eta_2\) and \(\eta_1\eta_2\) are also bounded functions.
Therefore \(f+g\) is \(\displaystyle O(x-a)\) and \(f\cdot g\) is \(\displaystyle O((x-a)^2)\)
In this example, pay attention to how the sum and products of two functions local behavior changes.
Example 10
Take \(f\) and \(g\) to be given by \[f(x)=(x+3)(x-1) \quad \text{ and} \quad g(x)=(x+2)(x-1).\] Demonstrate the following:
- \(f\) and \(g\) are \(\displaystyle O(x-1)\);
- \(f+g\) is \(\displaystyle O(x-1)\) but not \(\displaystyle O(x+3)\) and not \(\displaystyle o(x-1)\);
- \(f\cdot g\) is \(\displaystyle o(x-1)\) and \(\displaystyle O(x+3)\), but not \(\displaystyle o(x+2)\).
\(f(x)=(x+3)(x-1)=\eta_f(x)(x-1)\), where \(\eta_f(x)=(x+3)\) is bounded on \((0,1)\cup(1,2)\), and \(g(x)=(x+2)(x-1)=\eta_g(x)(x-1)\), where \(\eta_g(x)=(x+2)\) is bounded on \((0,1)\cup(1,2)\), Thus \(f\) and \(g\) are both \(\displaystyle O(x-1)\).
By the above theorem, since \(f\) and \(g\) are \(\displaystyle O(x-1)\), then \(f+g\) is \(\displaystyle O(x-1)\). However, \(f+g\) is not \(\displaystyle O(x+3)\) since \(g\) doesn’t have an \((x+3)\) factor. Also \(f+g\) is not \(\displaystyle o(x-1)\) since the \(\eta\) does not have a limit equal to zero \(x=1\).
\(f(x)\cdot g(x)=(x-1)(x+3)(x+2)\cdot(x-1)=\eta_{fg}(x)\cdot(x-1)\) where \(\eta_{fg}(x)=(x-1)(x+3)(x+2)\). Since \(\displaystyle\lim_{x\to 1}\eta_{fg}(x)=0\), we have that \(f\cdot g\) is \(\displaystyle o(x-1)\). It is \(\displaystyle O(x+3)\) since \[f(x)\cdot g(x)=[(x-1)^2(x+2)]\cdot(x+3)=\eta_{fgO}(x)\cdot (x+3)\] and the function \(\eta_{fgO}(x)\) is bounded in \((2,4)\). However, it is not \(o(x+2)\) because there is no function \(\eta\) such that \(f(x)\cdot g(x)=\eta(x) (x+2)\) for which the function \(\eta(x)\) has a limit of zero as \(x\) approaches \(-2\).
In this next theorem, we discuss how composition can affect Big and Little O behavior.
Theorem on Big and Little O Compostion
For any real number \(x_0\) and any real valued functions \(f\) and \(g\), if there is an open interval \(I\) that contains \(x_0\) and
- \(I\) is contained in \(\mathcal D(g)\),
- \(g - g(x_0)\) is \(\displaystyle O(x-x_0)\),
- \(g(x_0)\) is a limit point of \(g(I)\),
- \(g(I)\setminus\{g(x_0)\}\) is a subset of \(\mathcal D(f)\), and \(f\) is \(\displaystyle o(x-g(x_0))\),
then the composite function \(f\circ g\) is \(\displaystyle o(x-x_0)\).
Less precisely, but more memorably, we may recall this fact by saying that if \(g\) is \(\displaystyle O(x-x_0)\) and \(f\) is \(\displaystyle o(x-g(x_0))\), then \(f\circ g\) is \(\displaystyle o(x-x_0)\).
Example 11
Take \(f\) and \(g\) to be the functions that are given by \[g(x) = x^2 +1\quad \text{ and}\quad f(x) = (x-5)^2.\] Perform the appropriate calculations in order to justify the following statements:
- \(g-g(2)\) is \(\displaystyle O(x-2)\);
- \(f\) is \(\displaystyle o(x-g(2))\);
- \(f\circ g\) is \(\displaystyle o(x-2)\).
Notice that \(g(x)-g(2)=x^2+1-g(2)=x^2+1-5=x^2-4=(x+2)(x-2)\). Hence \(g(x)-g(2)=(x+2)(x-2)=\eta(x)\cdot(x-2)\), where \(\eta(x)=(x+2)\) is a bounded function in \((1,2)\cup(2,3)\). Thus \(g-g(2)\) is \(\displaystyle O(x-2)\);
Notice that \(x-g(2)=x-5\) and \(f(x)=(x-5)^2=(x-5)\cdot(x-5)=\eta(x)\cdot(x-5)\) where \(\eta(x)=(x-5)\) is a function with \(\displaystyle\lim_{x\to 5}\eta(x)=0\). Thus \(f\) is \(\displaystyle o(x-g(2))=o(x-5)\).
Since part a and part b are true, then by the above theorem we can conclude that \(f\circ g\) is \(\displaystyle o(x-2)\). Alternatively, do a direction calculation: \[(f\circ g)(x)=f(g(x))=(x^2+1-5)^2=(x^2-4)^2=(x+2)^2(x-2)^2=(x-2)(x+2)^2\cdot(x-2)\] and split it into \((x-2)\) and the rest is a function with a limit of zero as \(x\) approaches \(2\).
In this next example, we show the little behavior of a composite function involving sine and cosine.
Example 12
Take \(f\) and \(g\) to be the functions that are given by \[g(x) = 3+\sin(x) \quad \text{ and}\quad f(x) = 1-\cos(x-3).\] Perform the appropriate calculations in order to justify the following statements:
- \(g-g(0)\) is \(\displaystyle O(x)\);
- \(f\) is \(\displaystyle o(x-g(0))\);
- \(f\circ g\) is \(\displaystyle o(x)\).
Notice that \(g(x)-g(0)=3+\sin(x)-g(0)=3+\sin(x)-3-\sin(0)=\sin(x)=\tfrac{\sin(x)}{x}\cdot x\). Hence \(g(x)-g(0)=\tfrac{\sin(x)}{x}\cdot x=\eta(x)\cdot x\), where \(\eta(x)=\tfrac{\sin(x)}{x}\) is a bounded function in \((-1,0)\cup(0,1)\) since \(\eta\) has a convergent limit at \(x=0\). Thus \(g-g(0)\) is \(\displaystyle O(x)\);
Notice that \(x-g(0)=x-3\) and \(f(x)=1-\cos(x-3)=\tfrac{1-\cos(x-3)}{x-3}\cdot(x-3)=\eta(x)\cdot(x-3)\) where \(\eta(x)=\tfrac{1-\cos(x-3)}{x-3}\) is a function with \(\displaystyle\lim_{x\to 3}\eta(x)=0\) (since \(\displaystyle\lim_{\star\to 0}\tfrac{1-\cos(\star)}{\star}=0)\). Thus \(f\) is \(\displaystyle o(x-g(0))=o(x-3)\).
Since part a and part b are true, then by the above theorem we can conclude that \(f\circ g\) is \(\displaystyle o(x)\). Alternatively, do a direct calculation: \[(f\circ g)(x)=f(g(x))=1-\cos(3+\sin(x)-3)=1-\cos(\sin(x))=\tfrac{1-\cos(\sin(x))}{\sin(x)}\cdot\tfrac{\sin(x)}{x}\cdot x=\left[\tfrac{1-\cos(\sin(x))}{\sin(x)}\cdot\tfrac{\sin(x)}{x}\right]\cdot x\] and split it into \(x\) and the rest is a function with a limit of zero as \(x\) approaches \(0\).