Precalculus · Chapter 2
READ
Precalculus — Chapter 2

Functions

A function is a rule that describes how one quantity depends on another. This chapter develops functions and their graphs — how to evaluate them, read information from their graphs, measure their rate of change, model with linear functions, transform and combine functions, and invert one-to-one functions.

2.1Functions

Definition of a Function · Evaluating Functions · Domain · Piecewise Defined Functions · Net Change · Difference Quotient · Four Representations

Definition of a Function

A function \(f\) is a rule that assigns to each element \(x\) in a set \(A\) exactly one element, called \(f(x)\), in a set \(B\). The set \(A\) is the domain; the range is the set of all output values \(f(x)\) as \(x\) varies over the domain. We call \(x\) the independent variable and \(y=f(x)\) the dependent variable.

It helps to picture a function as a machine: an input \(x\) enters, the rule is applied, and the output \(f(x)\) emerges. An arrow diagram is also useful — but a diagram only represents a function when each input maps to exactly one output.

EXAMPLE 1Analyzing a Function
A function is defined by \(f(x)=x^2+4\). Evaluate \(f(3)\), \(f(-2)\), and \(f(-\sqrt5)\); find the domain and range.
Solution
The rule is "square, then add 4."
\(f(3)=3^2+4=13\), \(\;f(-2)=(-2)^2+4=8\), \(\;f(-\sqrt5)=(-\sqrt5)^2+4=9\)
Domain: all real numbers, \(\mathbb{R}\). Since \(x^2\ge0\), \(f(x)\ge4\), so the range is \([4,\infty)\).

Evaluating Functions & the Difference Quotient

To evaluate \(f\) at a quantity, substitute that quantity for the placeholder variable everywhere it appears.

The Difference Quotient
\[ \frac{f(a+h)-f(a)}{h},\qquad h\neq 0 \]
EXAMPLE 5Evaluating a Difference Quotient
If \(f(x)=2x^2+3x-1\), find the difference quotient \(\dfrac{f(a+h)-f(a)}{h}\).
Solution
\(f(a+h)=2(a+h)^2+3(a+h)-1=2a^2+4ah+2h^2+3a+3h-1\)
Subtract \(f(a)=2a^2+3a-1\): numerator \(=4ah+2h^2+3h\)
Divide by \(h\): \(\dfrac{4ah+2h^2+3h}{h}=4a+2h+3\)
Net ChangeThe net change in \(f\) as the input goes from \(a\) to \(b\) is \(f(b)-f(a)\). It can be positive, negative, or zero.

Piecewise Defined Functions

Piecewise Defined Function

A piecewise defined function uses different formulas on different parts of its domain. To evaluate it, first check which interval the input falls in, then apply the matching formula.

EXAMPLE 3A Piecewise Defined Cost Function
A cell plan costs $39/month including 2 GB of data, plus $15 per additional GB: \(C(x)=\begin{cases}39 & 0\le x\le 2\\ 39+15(x-2) & x>2\end{cases}\). Find \(C(0.5)\), \(C(2)\), \(C(4)\).
Solution
\(0.5\le2\Rightarrow C(0.5)=39\)
\(2\le2\Rightarrow C(2)=39\)
\(4>2\Rightarrow C(4)=39+15(4-2)=69\)

The Domain of a Function

When the domain isn't stated, it is taken to be all real numbers for which the formula yields a real value — excluding values that make a denominator zero or put a negative number under an even root.

EXAMPLE 7Finding Domains
Solution
\(f(x)=\dfrac{1}{x^2-x}=\dfrac{1}{x(x-1)}\): exclude \(x=0,1\). Domain \(\{x\mid x\neq0,\,x\neq1\}\).
\(g(x)=\sqrt{9-x^2}\): need \(9-x^2\ge0\), so domain \([-3,3]\).
\(h(t)=\dfrac{1}{\sqrt{t+1}}\): need \(t+1>0\), so domain \((-1,\infty)\).
Four Ways to Represent a FunctionA function can be described verbally (in words), algebraically (a formula), visually (a graph), and numerically (a table). For example, "multiply Celsius by \(\tfrac95\), then add 32" becomes \(F(C)=\tfrac95 C+32\).
Instructor Note

Reserved for instructor notes on Section 2.1. (Add your guidance here.)

2.2Graphs of Functions

Graphing by Plotting Points · Graphing Calculators · Piecewise Defined Graphs · Greatest Integer Function · The Vertical Line Test · Which Equations Define Functions

The Graph of a Function

If \(f\) has domain \(A\), the graph of \(f\) is the set of ordered pairs \(\{(x,f(x))\mid x\in A\}\) plotted in the coordinate plane. Equivalently, it is the graph of the equation \(y=f(x)\). The value \(f(x)\) is the height of the graph above the point \(x\).

FamilyFormGraph
Constant\(f(x)=b\)Horizontal line \(y=b\)
Linear\(f(x)=mx+b\)Line, slope \(m\), intercept \(b\)
Power\(f(x)=x^n\)Parabola-like (even \(n\)) or cubic-like (odd \(n\))
Root\(f(x)=\sqrt[n]{x}\)Half-parabola shape
EXAMPLE 1Graphing by Plotting Points
Sketch \(f(x)=x^2\), \(g(x)=x^3\), and \(h(x)=\sqrt{x}\).
Solution
Build a table of values for each, plot the points, and join them with a smooth curve.
\(y=x^2\) is a parabola; \(y=x^3\) rises through the origin with an S-shape; \(y=\sqrt{x}\) is defined only for \(x\ge0\).

The Greatest Integer (Step) Function

Greatest Integer Function
\[ [\![x]\!]=\text{greatest integer} \le x \]

For example \([\![2.3]\!]=2\), \([\![-0.5]\!]=-1\). Its graph is a series of horizontal steps — the prototype of a step function, used to model costs that jump at thresholds.

The Vertical Line Test

The Vertical Line Test

A curve in the coordinate plane is the graph of a function if and only if no vertical line intersects the curve more than once. If a vertical line met the curve twice, that input would have two outputs — which a function cannot have.

EXAMPLE 9Which Equations Define Functions
Does each equation define \(y\) as a function of \(x\)?
Solution
\(y-x^2=2\Rightarrow y=x^2+2\): one \(y\) per \(x\) — yes, \(f(x)=x^2+2\).
\(x^2+y^2=4\Rightarrow y=\pm\sqrt{4-x^2}\): two \(y\)-values for most \(x\) — no, not a function.
ContinuityA function is informally continuous if its graph has no breaks or holes. Power and root functions are continuous; piecewise and step functions often are not.
Instructor Note

Reserved for instructor notes on Section 2.2. (Add your guidance here.)

2.3Getting Information from the Graph of a Function

Reading Values · Domain & Range from a Graph · Solving Equations & Inequalities Graphically · Increasing & Decreasing Functions · Local Maxima & Minima

Reading a Graph

A complete graph carries all the information about a function: the height of the graph above \(x\) is the value \(f(x)\). The domain is the set of \(x\)-values the graph covers (read horizontally) and the range is the set of \(y\)-values it covers (read vertically).

EXAMPLE 1Finding Values from a Graph
A temperature graph \(T\) runs from noon to 6 p.m. Read \(T(1)\), \(T(3)\), \(T(5)\) and the net change from 1 p.m. to 3 p.m.
Solution
Heights give \(T(1)=25\), \(T(3)=30\), \(T(5)=20\).
Net change \(=T(3)-T(1)=30-25=5\) — a \(5^\circ\)F increase.

Increasing and Decreasing Functions

Definition of Increasing / Decreasing
\[ f \text{ is increasing on } I \text{ if } f(x_1)f(x_2) \text{ whenever } x_1

Graphically, a function increases where its graph rises (left to right) and decreases where its graph falls.

Local Maxima and Minima

Local Maxima and Minima
\[ f(a) \text{ is a local maximum if } f(a)\ge f(x) \text{ for } x \text{ near } a \]\[ f(a) \text{ is a local minimum if } f(a)\le f(x) \text{ for } x \text{ near } a \]
Engineering LinkLocal maxima and minima locate peak stresses, optimal operating points, and turning points in a response curve — the graphical foundation for the optimization studied in calculus.
EXAMPLE 6Intervals of Increase and Decrease
From the graph of a function \(f\), state where it increases and decreases.
Solution
Reading the rises and falls: \(f\) is increasing on \((-\infty,-1)\) and \((0,2)\).
\(f\) is decreasing on \((-1,0)\) and \((2,\infty)\). The turning points at \(x=-1,2\) are local maxima; \(x=0\) is a local minimum.
Instructor Note

Reserved for instructor notes on Section 2.3. (Add your guidance here.)

2.4Average Rate of Change of a Function

Average Rate of Change · The Secant Line · Linear Functions Have Constant Rate of Change

Average Rate of Change

The average rate of change of a function measures how fast its output changes relative to its input over an interval. Geometrically, it is the slope of the secant line joining the two points on the graph.

Average Rate of Change
\[ \text{average rate of change}=\frac{f(b)-f(a)}{b-a} \]

The numerator \(f(b)-f(a)\) is the net change in the output; the denominator \(b-a\) is the change in the input.

EXAMPLE 1Calculating Average Rate of Change
For \(f(x)=(x-3)^2\), find the average rate of change between \(x=1\) and \(x=3\).
Solution
\(f(1)=4\), \(f(3)=0\).
\(\dfrac{f(3)-f(1)}{3-1}=\dfrac{0-4}{2}=-2\)
Sign of the RateIf a function is increasing on an interval, its average rate of change there is positive; if decreasing, it is negative. The difference quotient of Section 2.1 is the average rate of change between \(x\) and \(x+h\).

Linear Functions Have Constant Rate of Change

A linear function changes by the same amount for each unit increase in \(x\). Its average rate of change is the same between any two points and equals the slope of its graph. Conversely, a function with constant rate of change must be linear.

Instructor Note

Reserved for instructor notes on Section 2.4. (Add your guidance here.)

2.5Linear Functions and Models

Linear Functions · Slope and Rate of Change · Linear Models · Making Linear Models from Verbal Descriptions

Linear Function
\[ f(x)=ax+b \]

The graph of a linear function is a line with slope \(a\) and \(y\)-intercept \(b\).

EXAMPLE 1Identifying Linear Functions
Which of \(f(x)=3x-2\), \(g(x)=x(4-x)\), \(h(x)=\tfrac12 x+1\) are linear?
Solution
\(f\) and \(h\) have the form \(ax+b\) — linear.
\(g(x)=4x-x^2\) contains \(x^2\) — not linear.
Slope and Rate of Change
\[ \text{for } f(x)=ax+b:\quad a=\text{slope}=\text{rate of change of } f \]

Slope vs. Rate of Change

"Slope" and "rate of change" describe the same number from two viewpoints. Slope emphasizes the geometric steepness of the line; rate of change emphasizes how fast the modeled quantity grows per unit of input. For a linear function they are equal and constant.

EXAMPLE 3Slope as a Rate of Change
A water tank's depth is modeled by \(d(t)=4.5t+15\) (cm, with \(t\) in minutes). Interpret the slope.
Solution
The graph is a line with slope \(4.5\).
So the water level rises at a constant rate of \(4.5\) cm per minute.
Engineering LinkLinear models describe constant-rate processes everywhere in engineering — steady flow, uniform velocity, linear thermal expansion, and Hooke's-law spring force \(F=kx\). The slope is the physical rate (flow rate, speed, stiffness).
Instructor Note

Reserved for instructor notes on Section 2.5. (Add your guidance here.)

2.6Transformations of Functions

Vertical Shifting · Horizontal Shifting · Reflecting Graphs · Vertical Stretching & Shrinking · Horizontal Stretching & Shrinking · Even & Odd Functions

Transformations

Starting from the graph of a known function \(y=f(x)\), we can produce related graphs by shifting (translating), reflecting, and stretching or shrinking. Recognizing these transformations lets us graph many functions quickly without plotting points.

Vertical & Horizontal Shifts (\(c>0\))
\[ y=f(x)+c \ \text{(up } c\text{)},\qquad y=f(x)-c \ \text{(down } c\text{)} \]\[ y=f(x-c) \ \text{(right } c\text{)},\qquad y=f(x+c) \ \text{(left } c\text{)} \]
EXAMPLE 3Combining Horizontal and Vertical Shifts
Sketch the graph of \(f(x)=\sqrt{x-3}+4\).
Solution
Start with \(y=\sqrt{x}\).
Shift right 3 units: \(y=\sqrt{x-3}\).
Shift up 4 units: \(y=\sqrt{x-3}+4\), with starting point \((3,4)\).
Reflections
\[ y=-f(x) \ \text{(reflect in the } x\text{-axis)},\qquad y=f(-x) \ \text{(reflect in the } y\text{-axis)} \]
Vertical Stretching & Shrinking
\[ y=c\,f(x):\quad c>1 \text{ stretches vertically},\quad 0
Horizontal Stretching & Shrinking
\[ y=f(cx):\quad c>1 \text{ shrinks by factor } 1/c,\quad 0
EXAMPLE 6Combining Shifting, Stretching, and Reflecting
Sketch the graph of \(f(x)=1-2(x-3)^2\).
Solution
Begin with \(y=x^2\); shift right 3 to get \(y=(x-3)^2\).
Reflect in the \(x\)-axis and stretch by 2: \(y=-2(x-3)^2\).
Shift up 1 (done last): \(f(x)=1-2(x-3)^2\), vertex \((3,1)\).
Order MattersApply transformations following the order of operations on the function value — in particular, a final vertical shift is performed last.

Even and Odd Functions

Even and Odd Functions
\[ f \text{ even}:\ f(-x)=f(x) \ \text{(symmetric about } y\text{-axis)} \]\[ f \text{ odd}:\ f(-x)=-f(x) \ \text{(symmetric about the origin)} \]
EXAMPLE 8Even, Odd, or Neither
Solution
\(f(x)=x^5+x\): \(f(-x)=-x^5-x=-f(x)\) — odd.
\(g(x)=1-x^4\): \(g(-x)=1-x^4=g(x)\) — even.
\(h(x)=2x-x^2\): \(h(-x)=-2x-x^2\neq \pm h(x)\) — neither.
Instructor Note

Reserved for instructor notes on Section 2.6. (Add your guidance here.)

2.7Combining Functions

Sums, Differences, Products & Quotients · Composition of Functions · Applications of Composition

Algebra of Functions

Two functions \(f\) and \(g\) (with domains \(A\) and \(B\)) combine arithmetically, with domain \(A\cap B\) in each case — and, for the quotient, excluding points where \(g(x)=0\).

Algebra of Functions
\[ (f+g)(x)=f(x)+g(x),\qquad (f-g)(x)=f(x)-g(x) \]\[ (fg)(x)=f(x)g(x),\qquad \left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)} \]
EXAMPLE 1Combinations and Their Domains
Let \(f(x)=\dfrac{1}{x-2}\) and \(g(x)=\sqrt{x}\). Find \(f/g\) and its domain.
Solution
\(\left(\dfrac{f}{g}\right)(x)=\dfrac{1}{(x-2)\sqrt{x}}\)
Domain: \(x\ge0\) (for \(\sqrt{x}\)), \(x\neq2\), and \(x\neq0\) (since \(g(0)=0\)), i.e. \((0,2)\cup(2,\infty)\).

Composition of Functions

Composition of Functions
\[ (f\circ g)(x)=f\big(g(x)\big) \]

The domain of \(f\circ g\) is the set of all \(x\) in the domain of \(g\) for which \(g(x)\) lies in the domain of \(f\). In general \(f\circ g\neq g\circ f\) — order matters.

EXAMPLE 3Finding Compositions
Let \(f(x)=x^2\) and \(g(x)=x-3\). Find \(f\circ g\), \(g\circ f\), and \((f\circ g)(5)\).
Solution
\((f\circ g)(x)=f(x-3)=(x-3)^2\)
\((g\circ f)(x)=g(x^2)=x^2-3\)
\((f\circ g)(5)=(5-3)^2=4\)
EXAMPLE 6Recognizing a Composition
Given \(F(x)=\sqrt[4]{x+9}\), find \(f\) and \(g\) with \(F=f\circ g\).
Solution
Inner operation first: \(g(x)=x+9\).
Outer operation: \(f(x)=\sqrt[4]{x}\), so \((f\circ g)(x)=\sqrt[4]{x+9}=F(x)\).
Engineering LinkComposition models chained dependencies: a balloon's radius depends on its volume, and volume depends on time, so radius as a function of time is \(R=f(g(t))\). Decomposing complicated functions into simpler pieces is also the basis of the chain rule in calculus.
Instructor Note

Reserved for instructor notes on Section 2.7. (Add your guidance here.)

2.8One-to-One Functions and Their Inverses

One-to-One Functions · The Inverse of a Function · Finding the Inverse · Graphing the Inverse · Applications

One-to-One Function

A function \(f\) is one-to-one if it never takes the same value twice: \(f(x_1)\neq f(x_2)\) whenever \(x_1\neq x_2\). Equivalently, if \(f(x_1)=f(x_2)\) then \(x_1=x_2\). Only one-to-one functions have inverses.

Horizontal Line Test
\[ f \text{ is one-to-one} \iff \text{no horizontal line meets the graph of } f \text{ more than once} \]

Every increasing function and every decreasing function is one-to-one. For example, \(f(x)=x^3\) passes the test, while \(g(x)=x^2\) fails it (since \(g(-1)=g(1)\)).

Definition of the Inverse Function
\[ f^{-1}(y)=x \iff f(x)=y \]\[ \text{domain}(f^{-1})=\text{range}(f),\qquad \text{range}(f^{-1})=\text{domain}(f) \]
CautionThe notation \(f^{-1}\) does not mean \(1/f\). The reciprocal is written \((f(x))^{-1}\).
Inverse Function Property
\[ f^{-1}\big(f(x)\big)=x \ \text{for } x \text{ in domain of } f \]\[ f\big(f^{-1}(x)\big)=x \ \text{for } x \text{ in domain of } f^{-1} \]

How to Find an Inverse

1. Write \(y=f(x)\). 2. Solve for \(x\) in terms of \(y\). 3. Interchange \(x\) and \(y\); the result is \(y=f^{-1}(x)\).

EXAMPLE 9Inverse of a Rational Function
Find the inverse of \(f(x)=\dfrac{2x+3}{x-1}\).
Solution
Set \(y=\dfrac{2x+3}{x-1}\), so \(y(x-1)=2x+3\).
Expand and collect: \(yx-2x=y+3\Rightarrow x(y-2)=y+3\).
Solve: \(x=\dfrac{y+3}{y-2}\). Interchange: \(f^{-1}(x)=\dfrac{x+3}{x-2}\).

Graphing the Inverse

Reflection in \(y=x\)The graph of \(f^{-1}\) is the reflection of the graph of \(f\) in the line \(y=x\): if \((a,b)\) lies on \(f\), then \((b,a)\) lies on \(f^{-1}\).
EXAMPLE 11An Inverse in Context
A pizza costs $12 plus $2 per topping: \(f(n)=12+2n\). Find \(f^{-1}\) and use it for a $22 pizza.
Solution
Set \(p=12+2n\); solve for \(n\): \(n=\dfrac{p-12}{2}\), so \(f^{-1}(p)=\dfrac{p-12}{2}\).
\(f^{-1}\) gives the number of toppings for a given price.
For \(p=22\): \(n=\dfrac{22-12}{2}=5\) toppings.
Instructor Note

Reserved for instructor notes on Section 2.8. (Add your guidance here.)