Functions Crash Course for Calculus
Goals:
- Describe the object we are going to use calculus on and how it appears in our everyday lives.
- Learn how to mathematically represent a function and manipulate them while avoiding common mistakes.
Functions All Around Us
The word function describes a dependence of one quantity on another. For example:
- The current room temperature is a function of time.
- After a flight takes off, the total distance a plane travels is a function of time since takeoff.
Functions should be thought of as a machine.
For example, when you input time, you get out the current temperature. Any temperature app you have uses this idea.
Notice that at a single time point, only one output is returned. This leads us to the mathematical definition of a function.
A function $f$ is a rule that assigns to each element $x$ in a set $A$ to exactly one element, called $f(x)$ in a set $B$.
What are some examples of functions you can think of?
Evaluating a Function
A simple way to mathematically represent input-output is with the notation $f(x)$.
Here, the $x$ between the parenthesis is your input variable, and $f(x)$ is your output.
A function is defined by the formula \[f(x) = x^2 - 2\]
Evaluate the following:
- $f(0)$
- $f(-1)$
- $f(-a)$
- $f(x + h)$
- $f(x + h) - f(x)$
Beware: everything between the parenthesis must be treated as input.
From now on, when instructed to perform something, like "evaluate $f(x + h)$" you must fully simplify.
For example, this can mean:
-
expand then combine like terms whenever you can
-
use Fraction Law 5 to cancel factors if applicable
-
multiply all fractional expressions together to write your answer as one fraction
- etc.
A function is defined by \[g(x) = x^2 - x\] Evaluate the following:
- $g(0)$
- $g(-1)$
- $g(-a)$
- $g(x + h)$
- $g(x + h) - g(x)$
Domain of a Function
The domain of a function is the set of all inputs you can input to get out a valid real number.
For the function $f(x) = \dfrac{1}{x}$, which of the following numbers are in the domain?
- $-2$
- $-1$
- $0$
- $\frac{1}{2}$
- $2$
When finding domain, follow two steps:
- Look for problems. These are numbers, when evaluated, result in something that is not a real number. Problems are
- Plugging a number where you end up dividing by zero.
- Plugging a number where you end up taking the square root of a negative number.
- Remove the problems from $\mathbb{R}$ and write your answer in interval notation.
What is the domain of $f(x) = \dfrac{1}{x}$?
What is the domain of $f(x) = \sqrt{x - 1}$?
What is the domain of $g(x) = \dfrac{1}{x^2 - x}$?
Piecewise Functions
Piecewise functions are functions where you have multiple different functions on different parts of the domain.
For example, \[f(x) = \begin{cases} x^2 & x \leq 1 \\ -2x + 3 & x > 1\end{cases}\] is a piecewise function.
Here's how to read this: If your input $x$ is less than or equal to 1, then you need to plug it into $x^2$.
If your input $x$ is strictly greater than 1, plug it into $-2x + 3$.
For the above function, evaluate $f(0), f(1)$ and $f(2)$.
Graph of a Function
You can describe a function like \[f(x) = x^2 + 2\] in four different ways.
- In English: Square the input and add two
- Algebraically: $x^2 + 2$
- With a table of values
- With a graph in the coordinate plane
The graph of a function with domain $A$ is formally defined as a set of coordinates \[\{(x, f(x)) : x \in A\}\]
The graph is especially important because you can quickly spot visual patterns in certain types of functions.
It also gives us an intuitive understanding of calculus concepts instead of just looking at a bunch of messy algebra like \[f(x) = \sin(x)\tan(x)e^{4x}(x^4 - x^2)\]
What is the geometric intution behind the symbol $f(x)$?
Graph the piecewise function \[f(x) = \begin{cases} x^2 & x \leq 1 \\ 2x - 3 & x > 1\end{cases}\] by hand.
Graph the function $y = \lvert x \rvert$.
The graph can also determine if a curve in the plane is actually a function.
Vertical Line Test
A curve in the $xy$-plane is the graph of a function of $x$ if and only if no vertical line intersects the curve more than once.