Math 242: Calculus I
1.1 Functions
1.1.1 Functions¶
$$ \require{color} \definecolor{brightblue}{rgb}{.267, .298, .812} \definecolor{darkblue}{rgb}{0.0, 0.0, 1.0} \definecolor{palepink}{rgb}{1, .73, .8} \definecolor{softmagenta}{rgb}{.99,.34,.86} \definecolor{blueviolet}{rgb}{.537,.192,.937} \definecolor{jonquil}{rgb}{.949,.792,.098} \definecolor{shockingpink}{rgb}{1, 0, .741} \definecolor{royalblue}{rgb}{0, .341, .914} \definecolor{alien}{rgb}{.529,.914,.067} \definecolor{crimson}{rgb}{1, .094, .271} \def\ihat{\mathbf{\hat{\unicode{x0131}}}} \def\jhat{\mathbf{\hat{\unicode{x0237}}}} \def\khat{\mathbf{\hat{\unicode{x1d458}}}} \def\tombstone{\unicode{x220E}} \def\contradiction{\unicode{x2A33}} $$
In the first two semesters of the study of Calculus, one focuses on functions of one real variable. We need to carefully define and understand exactly what we mean.
Variables are symbols, usually letters, that are used to represent mathematical objects. This is a very powerful idea.
Example 1¶
Consider the function $f\,:\,\mathbb{R}\rightarrow\mathbb{R}^+$, defined by $f(x) = \ln(x)$.
In this example three symbols or variables are employed.
First we have a letter that represents our function $f$. This variable allows one to refer to the entire clause
$$ \text{a function with domain $\mathbb{R}$ and codomain $\mathbb{R}^+$ that assigns to every element of the domain its natural logarithm} $$
with a single letter, $f$. This letter is technically a variable because we will use this letter very often to represent many functions.The second symbol is $\mathbb{R}$. This symbol represents the set of all real numbers, or interval $\mathbb{R} = (-\infty, \infty)$. We denote the codomain by decorating our special symbol which indicates only the positive real numbers, $\mathbb{R}^+ = (0, \infty)$.
Finally the letter $x$ represents any element of the domain $\mathbb{R}$. Variables of this type generally represent either an unknown element of a set like a domain, or may be replaced by any element of the set producing a true mathematical statement.
The assignment that describes the relation for the output of any input from the domain is the equation
$$ f(x) = \ln(x) $$
This is read, "f of $x$ equals the natural logarithm of $x$". This is a mathematical sentence because it has
- a predicate, the algebraic expression $f(x)$
- an intransitive verb, the mathematical relation $=$
- a direct object, the algebraic expression $\ln(x)$.
The variable $x$ may be replaced by any element of the domain and the output will be $\ln(x)$. Here $\ln$ is the common abbreviation of the natural logarithm function. One may also consider it to be a symbol with a unique meaning.
Definition¶
A variable is a letter or symbol that represents a mathematical object such as an element of a class or set. For example in the definitions above we use the letter $x$ to represent an element of the domain, $x\in D$; and the letter $y$ to represent an element of the codomain $y\in E$.
A variable that represents an element of the domain is called an independent variable.
A variable that represents an element of the codomain is called a dependent variable.
This course concentrates on the study of functions and using calculus to analyze and understand functions.
Definition¶
A function is a relation between two sets called the domain and the codomain. The relation assigns to each element of the domain, exactly one element of the codomain.
The element $y\in E$ assigned to an element of the domain $x\in D$ is called the image of $x$.
The elements of $x\in D$ that gets assigned to an element of the codomain $y\in E$ are called the pre-images of $y$.
Note¶
Every element of the domain has exactly one image in the codomain, so we write $y = f(x)$.
The pre-images of an element of the codomain may have one, many, or even no elements of the domain assigned to it. The pre-image $f^{-1}(y)$ is a subset of the domain, $f^{-1}(y)\subset D$.
The notation for pre-images is confusing only if the pre-images of every element of the codomain is a singleton set. In this case we say that there is an inverse function $f^{-1}:E\rightarrow D$ defined by $x = f^{-1}(y)$ if and only if $y=f(x)$.
Functions of one real variable¶
Definition¶
A real-valued function or function of a real variable consists of
a domain that is a subset $D$ of the real number line $\mathbb{R}$
a codomain that is a subset $E$ of the real number line
a relation that assigns to every element of the domain, $x\in D$, exactly one element of the codomain $y\in E$.
The first two semesters of calculus exclusively studies analysis of real-valued functions using differential and integral calculus.
1.1.2 Graphing¶
Functions in this course have one real input and one real output. This allows in inputs and outputs to be represented in two important ways.
1. Using an algebraic expression¶
In Example 1, the definition of the function yields the algebraic expression for computing the output represented by the dependent variable $y$ using the input represented by the independent variable $x$,
$$ y = \ln(x) $$
The algebraic expression referred to here is the direct object $\ln(x)$.
2. Using an ordered pair¶
An ordered pair or tuple is a comma delimited list of two real number $(x,y)$. It is ordered because
the first element of the list must be an independent variable or a value from the domain of a function, and
the second element of the list must be the associated dependent variable, algebraic expression, or value as defined by the function.
Input | Output | Expression | Tuple |
---|---|---|---|
1 | 0 | ln(1) | (1,0) |
2 | 0.693... | ln(2) | (2, 0.693...) |
e | 1 | ln(e) | (e,1) |
x | y | ln(x) | (x,y) |
From this tabular view one sees that $0=\ln(1)$ or $0=f(1)$, and $1=\ln(e)$, or $1=\ln(e)$.
We can graph all of the ordered pairs in the Cartesian Plane.
This picture of the relationship between the inputs and outputs illustrates several properties of the natural logarithm function. The natural logarithm function has a vertical asymptote.
Example 2¶
Consider $g\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x)=x^2-3x+2$.
Input | Output | Equation | Tuple |
---|---|---|---|
-1 | 6 | 6 = g(-1) | (-1,6) |
0 | 2 | 2 = g(0) | (0,2) |
1 | 0 | 0 = g(1) | (1,0) |
2 | 0 | 0 = g(2) | (2,0) |
x | y | y = x^2 - 3x + 2 | (x,y) |
Exercise 1¶
Using the definition of function $g$ in Example 2, find the values for $g(-2)$ and $g(4)$.
Check Your Work
$$ \begin{align*} g(-2) &= 12 \\ g(4) &= 6 \end{align*} $$
Follow Along
$$ \begin{array}{rrrrr} -2 & | & 1 & -3 & 2 \\ & & & -2 & 10 \\ \hline & & 1 & -5 & 12 \end{array} $$
$$ \begin{array}{rrrrr} 4 & | & 1 & -3 & 2 \\ & & & 4 & 4 \\ \hline & & 1 & 1 & 6 \end{array} $$
Notice that in this example many of the elements of the codomain have no element of the domain mapped to them. For example there is no value $x$ so that $g(x) = -1$. In this course one uses differential calculus to determine the minimum value of the output, and the input that produces that minimum value. The input that produces the minimum value is $x=\frac{3}{2}$, and the output can be determined,
$$ \begin{array}{rrrrr} \frac{3}{2} & | & 1 & -3 & 2 \\ & & & \frac{3}{2} & -\frac{9}{4} \\ \hline & & 1 & -\frac{3}{2} & -\frac{1}{4} \\ \end{array} $$
We will learn that all values of the outputs are greater than or equal to $-\frac{1}{4}$. The pre-image of any element of the codomain less that $-\frac{1}{4}$ is an empty set because there are no elements of the domain that get mapped to any number less that $-\frac{1}{4}$.
$$ g^{-1}(-1) = \left\{\ \right\} = \emptyset $$
The graph also illustrates that every element of of the codomain greater than $-\frac{1}{4}$ in fact has two elements of the domain that get mapped to it. Everyone already knows how to solve for these values algebraically.
$$ \begin{align*} x^2 - 3x + 2 &= y \ge -\frac{1}{4} \\ \\ x^2 - 3x &= y - 2 \ge -\frac{9}{4} \\ \\ x^2 - 3x + \frac{9}{4} &= y + \frac{1}{4} \ge 0 & \qquad &\text{complete the square} \\ \\ \left( x - \frac{3}{2} \right)^2 &= y + \frac{1}{4} \ge 0 & \qquad &\longleftarrow\text{ this is important!} \\ \\ x - \frac{3}{2} &= \pm\sqrt{y + \frac{1}{4}} \\ \\ x &= \frac{3}{2} \pm\sqrt{y + \frac{1}{4}} \end{align*} $$
We have that $\left( \frac{3}{2} - \sqrt{y + \frac{1}{4}}, y \right)$ and $\left( \frac{3}{2} + \sqrt{y + \frac{1}{4}}, y \right)$ are on the graph of $g$. If $y=\frac{1}{4}$, then both ordered pairs are the same point.
One can look at the graph and use the algebra detailed here to conclude that only real values in the interval $\left[ -\frac{1}{4}, \infty \right)$ of the codomain have pre-images in the domain of $g$.
Definition¶
The subset of all values in the codomain of a function that have nonempty pre-images is called the range of the function.
Exercise 2¶
In Example 2, find the range of function $g$.
Check Your Work
The range of function $g$ is the interval $\left[ -\frac{1}{4}, \infty \right)$.
Note¶
There is no rule that every element of the codomain must have a pre-image. There is a rule that every element of the domain must have exactly one image in the codomain.
1.1.3 Evaluating Functions¶
In our first two examples, we replaced the independent variable with a value from the domain, and obtained the value of the codomain associated with the input.
Now let us replace the independent variable with variable with an algebraic expression.
Example 3¶
Consider the function $f\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x) = x^2 - 3x + 4$.
What is $f(a+h)$, where $a$, $h$ and $a+h$ are elements of the domain of $f$?
Solution¶
$$ \begin{align*} f(a+h) &= (a+h)^2 - 3(a+h) + 4 \\ \\ &= \left(a^2 + 2ah + h^2\right) - 3a - 3h + 4 \\ \\ &= a^2 + 2ah + h^2 - 3a - 3h + 4 \end{align*} $$
Example 4¶
Using function $f$ defined in Example 3, evaluate the difference quotient $\ \dfrac{f(a+h)-f(a)}{h}$.
Solution¶
$$ \begin{align*} \dfrac{f(a+h)-f(a)}{h} &= \frac{a^2 + 2ah + h^2 - 3a - 3h + 4 - \left( a^2 - 3a + 4 \right)}{h} \\ \\ &= \frac{h^2 + 2ah - 3h}{h} \\ \\ &= h + 2a - 3 \end{align*} $$
1.1.4 Representations of Functions¶
There are generally four different ways to describe a function:
- linguistically
- numerically
- graphically
- algebraically
A Linguistic Description¶
A linguistic description may be written, communicated verbally, or stored in a file. A linguistic description uses a common language such as Arabic, English, German, French, or Mandarin to communicate the definition.
Example 5¶
Boyle's empirical gas law states that the absolute pressure exerted by an ideal gas is inversely proportional to the volume it occupies if the temperature and mass remain unchanged within a closed system.
Robert Boyle describes the relationship between the input volume and output pressure as along as the temperature and mass remain unchanged in a closed system. We would state that pressure is a function of volume.
A Numerical Description¶
We all typically describe a function linguistically, and then perform experiments, or collect data. One either measures the inputs and outputs themselves, or computes them from measurements. This yields a table of input/output ordered pairs or numerical description of a function
Carmen J.Giunta collects classical chemistry papers and results for the website Classic Chemistry. This includes Robert Boyle's paper and data A Defence of the Doctrine Touching the Spring And Weight of the Air ...
Notice that by plotting $\dfrac{1}{\text{Volume}}$ instead of volume in the verticle axis, we see the trend line for the data. On the graph in Figure 3 the input is pressure but the output is computed from the measured volume. The associated output is $\dfrac{1}{V}$. The slope of this line is the proportionality constant for Boyle's Law.
A Graphical Description¶
On this graph, the data collected for the ordered pairs $(P,V)$ are plotted. Here we find an interpolating hyperbolic curve. In Figure 3, the interpolating curve or interpolant is a line. In the applications of calculus called numerical analysis and statistics one studies the various ways to obtain an interpolant that best approximates collected data. This is as much art as science. Boyle's goal was to show that the interpolant for pressure and volume was a hyperbolic curve; and determine with carefully measured data, a good approximation of the proportionality constant $k$. In Boyle's paper, the proportionality constant is the slope of the trend line or linear interpolant.
An Algebraic Description¶
Robert Boyle hypothesized that, when temperature and mass of a closed system are constant, the pressure and volume of an ideal gas would be inversely related.
$$ P = \frac{k}{V} $$
He performed several experiments and carefully measured volume for different pressures of a closed system with constant temperature and the same mass of air trapped in a column of mercury. After collecting data, creating his graph of data points, and computing the least squares line, he was ready to compute the slope of the line $k$. Using this algebraic equation, Boyle could predict the height (pressure) of the mercury column as more mercury as added to the column.
1.1.5 Definition of Functions¶
What linguistic, tabular, graphical, or algebraic descriptions describe functions? This requires the reader to ponder the information presented and compare it to the definition in 1.1.1.
Example 6¶
x | -9 | -5 | -4 | -1 | 1 | 2 | 2 | 3 | 5 | 6 |
---|---|---|---|---|---|---|---|---|---|---|
y | -8 | -3 | 0 | 3 | 5 | 6 | 7 | 4 | -2 | -9 |
The data in table 3 does not describe a function where $y$ is a function of $x$ because it assigns two values to input $x=2$. This violates the definition of a function. However notice that each value of $y$ appears only once in the table. One could define $x$ a function of $y$ because the table assigns exactly one value from the domain
$$ \{ -9, -8, -3, -2, 0, 3, 5, 6, 7 \} $$
to an element of the codomain
$$ \{ -9, -5, -4, -1, 1, 2, 3, 5, 6 \} $$
Example 7¶
Figure 5 depicts a function because it passes the vertical line test. If we draw a vertical line $x=a$ anywhere on the graph, the vertical line will intersect the curve exactly once, or not at all.
In Figure 6, the graph of the relation $x^2 + y^2=9$ is not a function because the vertical line $x=\frac{\pi}{2}$ intersects the circle at two points.
How will we deal with algebraic equations whose graph shows that it is not a function?¶
In the calculus series, we will discover several methods to think of the circle as a function of the correct independent variable. In our first calculus class, one usually consider two functions separately,
$$ \begin{align*} x^2 + y^2 &= 9 \\ \\ y^2 &= 9 - x^2 \\ \\ y &= \sqrt{9 - x^2}\qquad\text{ the top half of the circle, and } \\ \\ y &= -\sqrt{9 - x^2}\qquad\text{ the bottom half of the circle.} \end{align*} $$
Now we consider two functions
$$ \begin{align*} f\,:\,[-3,3] &\rightarrow [0, 3],\ \text{defined by }y = \sqrt{9-x^2},\ \text{and,} \\ \\ g\,:\,[-3,3] &\rightarrow [-3, 0],\ \text{defined by }y = -\sqrt{9-x^2}. \end{align*} $$
Functions Defined by Algebraic Equations¶
In the rest of your STEM education and beyond, functions are never so carefully defined. Quite often on is simply given an algebraic equation
$$ y = -\sqrt{9 - x^2} $$
From this equation, a student is expected to infer the domain and the codomain. In your previous mathematics texts, the codomain was often called the range because students were expected to infer the smallest set of values necessary for the codomain. When presented with such an equation a student needs to ask,
For now we are not concerned with complex numbers so any expression that appears in a square root must be non-negative. This linguistic description may be expressed algebraically as
$$ 9 - x^2 \ge 0 $$
Now students must get start working with this equation to obtain an interval of the real line for which this statement must be true.
$$ \begin{align*} 9 - x^2 &\ge 0 \\ \\ 9 &\ge x^2 \\ \\ x^2 &\le 9 \\ \\ \sqrt{x^2} &\le \sqrt{9} \\ \\ \left|x\right| &\le 3 \\ \end{align*} $$
Now we have that the interval of real numbers for which the algebraic statement $9 - x^2 \ge 0$ is true. It is the interval $-3 \le x \le 3$, or $[-3,3]$. One of the most important applications of differential calculus we will learn is to find maximums and minimums of a function. In this example the largest value of $y$ is zero, and the smallest is -3. Thus the smallest codomain available for which the equation describes a function becomes $[-3, 0]$. When we see the equation $y=-\sqrt{9-x^2}$, everyone should infer the following function.
$$ f\,:\,[-3,3]\rightarrow[-3, 0]\ \text{defined by}\ y = -\sqrt{9 - x^2} $$
Throughout all STEM research and coursework, sources describe functions by presenting a linguistic description, a graph, an algebraic equation, or just an algebraic expression. The student must take the necessary time to construct the intended domain and codomain from the description.
1.1.6 Piecewise Defined Functions¶
Definition¶
A function that is defined differently, or by different formulas, on distinct parts (subsets) of their domain is called a piecewise defined function.
Example 8¶
Consider a function $f\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by
$$ f(x) = \left\{\begin{array}{lcr} x+1 & \text{ if } & x\le -1 \\ \\ (x+1)^3 & \text{ if } & x > -1 \end{array}\right. $$
Exercise 3¶
For Example 8, evaluate $f(-3)$, $f(-1)$, and $f(0)$. Sketch the graph of $f$.
Check Your Work
$$ \begin{align*} f(-3) &= (-3)+1 = -2 &\ &\text{because }-3\le -1 \\ \\ f(-1) &= (-1)+1 = 0 &\ &\text{because }-1\le -1 \\ \\ f(0) &= (0+1)^3 = 1 &\ &\text{because }0 > -1 \end{align*} $$
Exercise 4¶
Consider the function $g\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by
$$ y = \left\{\begin{array}{lcr} 2x-1 & \text{ if } & x < 1 \\ -(x-1)^2 & \text{ if } & x \ge 1 \end{array}\right. $$
Evaluate $g(0)$, $g(1)$, and $g(0)$. Sketch the graph of $g$. what is the range of $g$?
Check Your Work
$$ \begin{align*} g(0) &= 2(0)-1 = -1 &\ &\text{because } 0 < 1 \\ \\ g(1) &= -(1-1)^2 = 0 &\ &\text{because } 1 \ge 1 \\ \\ g(3) &= -(3-1)^2 = -4 &\ &\text{because } 3 \ge 1 \end{align*} $$
Looking at the graph, all of the values on the vertical axis $< 1$ have pre-images; however values $\ge 1$ do not. So the range of $g$ is the interval $(-\infty,1)$.
1.1.7 Even and Odd Functions¶
Definition¶
A function whose graph is symmetric with respect to the $y$-axis has the same symmetry as the polynomial function $y=x^2$. This includes the polynomials $y = x^n$ where $n$ is an even number $n=2k$ for some positive integer $k$, $k\in\mathbb{Z}^+$.
Any function $f\,:\,[-a,a]\rightarrow\mathbb{R}$ defined so that
$$ f(-x) = f(x) $$
has the same output for both $x$ and $-x$. Thus it also has the same symmetry. These functions are called even functions.
Example 9¶
The polynomial function $h\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by $y = x^8 - x^6 + 2x^4 - x^2 + 2(x^0)$ is an even function too!
Definition¶
A function whose graph is symmetric with respect to the origin has the same symmetry as the polynomial function $y=x^3$. This includes the polynomials $y = x^n$ where $n$ is an odd number $n=2k+1$ for some positive integer $k$, $k\in\mathbb{Z}^+$.
Any function $f\,:\,[-a,a]\rightarrow\mathbb{R}$ defined so that
$$ f(-x) = -f(x) $$
has the opposite output for both $-x$ than it had for $x$. Thus it also has the same symmetry. These functions are called odd functions.
Example 10¶
The polynomial function $h\,:\,\mathbb{R}\rightarrow\mathbb{R}$ defined by $y = x^5 - 3x^3 + x$ is an odd function.
Example 11¶
The function $y=\sin(x)$ is an odd function, while the function $y=cos(x)$ is an even function.
1.1.8 Increasing and Decreasing Functions¶
Definition¶
A function is said to be increasing on the interval $[a,b]$ if for any two numbers $x_1$ and $x_2$, $a \le x_1 < x_2 \le b$ implies $f(x_1) < f(x_2)$.
A function is said to be decreasing on the interval $[c,d]$ if for any two numbers $x_1$ and $x_2$, $c \le x_1 < x_2 \le d$ implies $f(x_1) > f(x_2)$.
Example 12¶
Consider the function $g$ with graph in Figure 11.
- Function $g$ is decreasing on the interval $(-\infty,-2]$.
- Function $g$ is increasing on the interval $[-2,-1]$.
- Function $g$ is decreasing on the interval $[-1,1]$.
- Function $g$ is increasing on the interval $[1,\infty)$.
We will learn in this course how to use differential calculus to compute these intervals.
Your use of this self-initiated mediated course material is subject to our Creative Commons License 4.0