Functions Crash Course for Calculus

Goals:

Functions All Around Us


The word function describes a dependence of one quantity on another. For example:

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:

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:

A function is defined by \[g(x) = x^2 - x\] Evaluate the following:

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?

When finding domain, follow two steps:

  1. Look for problems. These are numbers, when evaluated, result in something that is not a real number. Problems are
  2. 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.

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.