Calculus · Chapter 1 — Functions and Models
0%
Chapter 1

Functions and Models

Functions are the central objects of calculus. This chapter sets the stage: what a function is, the four ways to describe one, the families of functions used to model the real world, and how to build new functions by transforming, combining, and inverting old ones.

Before we touch a single derivative, make peace with functions. Almost every mistake I see later in the course traces back to shaky ground here — domain errors, forgetting that a function gives exactly one output, or treating fg and f∘g as the same thing. Spend real time on 1.1 and 1.3.

SECTION 1.1

Four Ways to Represent a Function

A function relationship appears whenever one quantity is determined by another: the area of a circle by its radius, world population by year, postage cost by weight, ground acceleration by elapsed time during a quake. In each case a rule assigns to every allowed input exactly one output.

Function

A function f is a rule that assigns to each element x in a set D (the domain) exactly one element f(x) in a set E. The key word is exactly one: an input can never produce two different outputs.

Domain, Range, and Variables

The domain is the set of permitted inputs. The range is the set of all outputs f(x) as x runs through the domain. A symbol for an arbitrary input is the independent variable; a symbol for the corresponding output is the dependent variable. When the domain is not stated, take it to be every real number for which the rule produces a real value.

The four representations

The same function can be presented in four complementary ways, and moving between them deepens understanding:

  • Verbally — a description in words.
  • Numerically — a table of input–output pairs.
  • Visually — a graph in the coordinate plane.
  • Algebraically — an explicit formula.

A function defined by a table is called a tabular function; one fitted to data is a mathematical model. Some situations favour one representation: a seismograph trace is most naturally a graph, while the area of a circle is cleanest as a formula.

Graph of a Function

The graph of f is the set of points (x, y) with y = f(x) and x in the domain. The height of the graph above a point on the horizontal axis reads off the value f(x). The graph lets you see the domain projected onto the x-axis and the range onto the y-axis.

x f(x) y=f(x) x y
FIGURE 1.1.1Reading a value from a graph: the output f(x) is the height of the curve above the input x. (Original diagram.)
EXAMPLE 1 Difference quotient
For \( f(x) = 2x^2 - 5x + 1 \) and \( h \neq 0 \), evaluate the difference quotient \( \dfrac{f(a+h) - f(a)}{h} \).
Solution
First expand \( f(a+h) = 2(a+h)^2 - 5(a+h) + 1 = 2a^2 + 4ah + 2h^2 - 5a - 5h + 1. \)
Subtract \( f(a) = 2a^2 - 5a + 1 \) to clear all terms without an \( h \): \[ f(a+h)-f(a) = 4ah + 2h^2 - 5h. \]
Divide by \( h \) (legal since \( h \neq 0 \)): \[ \frac{f(a+h)-f(a)}{h} = 4a + 2h - 5. \]
This quantity is the average rate of change of \( f \) between \( x=a \) and \( x=a+h \) — the seed of the derivative in Chapter 2.
Piecewise definitions and the vertical line test

Some functions use different rules on different parts of the domain. The absolute value is the prototype.

Absolute value as a piecewise function
\[ |x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases} \]
TEST

The Vertical Line Test

A curve in the xy-plane is the graph of a function of x if and only if no vertical line meets the curve more than once. The reasoning is direct: if a vertical line x = a hits the curve twice, the input a would have two outputs, which a function forbids.

EXAMPLE 2 A piecewise rule
Let \( f(x) = \begin{cases} 1 - x & \text{if } x \le 1 \\ x^2 & \text{if } x > 1 \end{cases} \). Find \( f(0),\, f(1),\, f(2) \).
Solution
Check which branch each input falls in. Since \( 0 \le 1 \): \( f(0) = 1 - 0 = 1. \)
Since \( 1 \le 1 \): \( f(1) = 1 - 1 = 0. \)
Since \( 2 > 1 \): \( f(2) = 2^2 = 4. \)
The graph is the line \( y = 1 - x \) up to \( x = 1 \) (closed dot at \( (1,0) \)) and the parabola \( y = x^2 \) beyond it (open dot at \( (1,1) \)).
Symmetry

Even and Odd Functions

A function is even if \( f(-x) = f(x) \) for every x in its domain; its graph is symmetric about the y-axis (for example \( x^2 \)). It is odd if \( f(-x) = -f(x) \); its graph is symmetric about the origin (for example \( x^3 \)). Most functions are neither.

Increasing and decreasing

Monotonicity

On an interval I, a function is increasing if \( f(x_1) < f(x_2) \) whenever \( x_1 < x_2 \) in I, and decreasing if \( f(x_1) > f(x_2) \) under the same condition. The inequality must hold for every such pair, not just a sampled few.

Domain hunting is a recurring exam skill. Two rules cover almost everything: you cannot divide by zero, and you cannot take an even root of a negative. Set those expressions safe and solve the inequality. Write the domain in interval notation — graders expect it.

SECTION 1.2

Mathematical Models: A Catalog of Essential Functions

Mathematical Model

A mathematical model is a function or equation that describes a real-world phenomenon — population, demand, a falling object — in order to understand it and predict its behaviour. Modelling runs in a cycle: formulate a model from the real problem, solve it mathematically, interpret the conclusions back in the real world, then test against fresh data and refine. A model is always an idealization; a good one is simple enough to compute yet accurate enough to be useful.

Linear functions

Linear Model

A linear function has a straight-line graph and grows at a constant rate. The slope is precisely that rate of change of y with respect to x.

Slope–intercept form
\[ y = f(x) = mx + b \]
EXAMPLE 1 Temperature with altitude
Dry air cools as it rises. If ground temperature is \( 20^\circ\text{C} \) and the temperature at \( 1\text{ km} \) is \( 10^\circ\text{C} \), model temperature \( T \) as a linear function of height \( h \) (km), then find \( T \) at \( 2.5\text{ km} \).
Solution
Assume \( T = mh + b \). At \( h = 0 \), \( T = 20 \), so \( b = 20 \).
At \( h = 1 \), \( T = 10 \): \( 10 = m + 20 \Rightarrow m = -10. \) The slope is \( -10^\circ\text{C/km} \), the rate of cooling with altitude.
Model: \( T = -10h + 20 \). At \( h = 2.5 \): \( T = -10(2.5) + 20 = -5^\circ\text{C}. \)

When no physical law guides the choice, an empirical model is fitted directly to data — often the least-squares regression line, which minimizes the total squared vertical distance from the points to the line. Estimating inside the data range is interpolation; predicting outside it is extrapolation, which is far less reliable.

Polynomials

Polynomial

A polynomial has the form below, with constant coefficients and a domain of all real numbers. If the leading coefficient is nonzero, its index n is the degree. Degree 1 is linear; degree 2 is quadratic (a parabola, opening up if the leading coefficient is positive, down if negative); degree 3 is cubic.

General polynomial of degree n
\[ P(x) = a_n x^n + a_{n-1}x^{n-1} + \cdots + a_2 x^2 + a_1 x + a_0,\quad a_n \neq 0 \]
EXAMPLE 2 Fitting a falling ball
A ball is dropped from \( 450\text{ m} \); its height is recorded each second. A quadratic fit gives \( h = 449.36 + 0.96t - 4.90t^2 \). Predict when it lands.
Solution
The ball hits the ground when \( h = 0 \): \( -4.90t^2 + 0.96t + 449.36 = 0. \)
Apply the quadratic formula: \[ t = \frac{-0.96 \pm \sqrt{(0.96)^2 - 4(-4.90)(449.36)}}{2(-4.90)}. \]
The positive root is \( t \approx 9.67 \), so the ball lands after roughly \( 9.7 \) seconds.
Power, root, and rational functions

Power Function

A power function has the form \( f(x) = x^a \) for a constant exponent a. When a = n is a positive integer the graph resembles a parabola (for even n) or a cubic (for odd n). When \( a = 1/n \) it is a root function. When \( a = -1 \) it is the reciprocal function \( 1/x \), a hyperbola — the form behind Boyle's Law, where volume is inversely proportional to pressure.

Rational and Algebraic Functions

A rational function is a ratio of two polynomials \( P(x)/Q(x) \); its domain excludes the zeros of Q. An algebraic function is anything built from polynomials using addition, subtraction, multiplication, division, and roots. Every rational function is algebraic.

degree 1 degree 2 degree 3
FIGURE 1.2.1Characteristic shapes of polynomials by degree: line, parabola, cubic. (Original schematic.)
Trigonometric, exponential, and logarithmic functions

Trigonometric Functions

In calculus, angles are measured in radians by default. Sine and cosine have domain all reals, range \( [-1, 1] \), and period \( 2\pi \); they model repetitive phenomena such as tides and waves. Tangent equals \( \sin x / \cos x \), is undefined where \( \cos x = 0 \), and has period \( \pi \).

Bounds and periodicity of sine and cosine
\[ -1 \le \sin x \le 1, \qquad -1 \le \cos x \le 1 \] \[ \sin(x + 2\pi) = \sin x, \qquad \cos(x + 2\pi) = \cos x \]

Exponential and Logarithmic Functions

An exponential function \( f(x) = a^x \) has a positive constant base and the variable in the exponent; with \( a > 1 \) it models growth, with \( a < 1 \) decay. Logarithmic functions \( f(x) = \log_a x \) are their inverses (Section 1.6). Transcendental functions are those that are not algebraic — the trigonometric, exponential, logarithmic functions, and more.

SECTION 1.3

New Functions from Old Functions

Starting from the catalog of Section 1.2, we generate new functions by shifting, stretching, and reflecting graphs, and by combining functions arithmetically or through composition.

Translations
RULE

Vertical and Horizontal Shifts

Suppose \( c > 0 \). Then \( y = f(x) + c \) shifts the graph up by c; \( y = f(x) - c \) shifts it down by c; \( y = f(x - c) \) shifts it right by c; and \( y = f(x + c) \) shifts it left by c. Horizontal shifts run opposite to intuition: subtracting inside the function moves the graph rightward.

Stretches and reflections
RULE

Stretching, Compressing, and Reflecting

Suppose \( c > 1 \). Then \( y = cf(x) \) stretches vertically by c and \( y = \tfrac{1}{c}f(x) \) compresses vertically by c; \( y = f(cx) \) compresses horizontally by c and \( y = f(x/c) \) stretches horizontally by c; \( y = -f(x) \) reflects across the x-axis and \( y = f(-x) \) reflects across the y-axis.

EXAMPLE 1 Completing the square to shift
Sketch \( f(x) = x^2 + 6x + 10 \) using transformations.
Solution
Complete the square: \( x^2 + 6x + 10 = (x + 3)^2 + 1. \)
Start with \( y = x^2 \), shift left 3 units to get \( (x+3)^2 \), then up 1 unit.
The vertex sits at \( (-3, 1) \) and the parabola opens upward.
EXAMPLE 2 Modelling daylight hours
At roughly \( 40^\circ\text{N} \), daylight runs about \( 14.8 \) h at the summer peak and \( 9.2 \) h at the winter low, with a yearly cycle beginning near day 80. Model the length of daylight \( L \) on day \( t \).
Solution
Amplitude is half the range: \( \tfrac{1}{2}(14.8 - 9.2) = 2.8. \)
A 365-day period needs a horizontal factor \( 2\pi/365 \); shift right 80 days and up 12 units.
\[ L(t) = 12 + 2.8\,\sin\!\left[\frac{2\pi}{365}(t - 80)\right]. \]
Combining functions

Arithmetic Combinations

Two functions combine pointwise into the sum, difference, product, and quotient. The domain of a combination is the intersection of the two domains — and for the quotient we must additionally discard points where the denominator is zero.

Sum, difference, product, quotient
\[ (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)} \]

Composition

The composite \( f \circ g \) feeds the output of g into f. Order matters: in \( (f \circ g)(x) \), g acts first and f second. The domain consists of those x in the domain of g whose output \( g(x) \) lands in the domain of f.

Composite function
\[ (f \circ g)(x) = f\big(g(x)\big) \]
EXAMPLE 3 Order matters in composition
If \( f(x) = x^2 \) and \( g(x) = x - 3 \), find \( f \circ g \) and \( g \circ f \).
Solution
\( (f \circ g)(x) = f(x - 3) = (x - 3)^2 \) — subtract first, then square.
\( (g \circ f)(x) = g(x^2) = x^2 - 3 \) — square first, then subtract.
The two results differ, confirming that \( f \circ g \neq g \circ f \) in general.

Composition is where students lose marks by reading inside-out the wrong way. My trick: read \( f \circ g \) right-to-left as "g, then f." When asked to decompose a messy function, work from the outermost operation inward and name each layer as a separate function before you write anything down.

SECTION 1.4

Graphing Calculators and Computers

Graphing devices draw a function by plotting many evenly spaced points inside a chosen rectangle and joining them. They are powerful but fallible: the wrong window can hide a graph entirely, manufacture false vertical lines, or alias a rapidly oscillating curve into nonsense.

Viewing Rectangle

The visible region is the set of points with the x-values between a chosen minimum and maximum and the y-values between their own minimum and maximum. Choosing this window well is the whole skill: too small and you miss features, too large and you blur them.

The [a, b] by [c, d] viewing rectangle
\[ [a,b] \times [c,d] = \{(x,y) \mid a \le x \le b,\ c \le y \le d\} \]
EXAMPLE 1 A window that hides the graph
Why does \( f(x) = x^2 + 3 \) appear blank in the \( [-2,2] \) by \( [-2,2] \) window?
Solution
Since \( x^2 \ge 0 \) for all x, we have \( x^2 + 3 \ge 3 \), so the range is \( [3, \infty) \).
Every output is at least 3, which lies above the window's top edge of 2 — the curve is entirely outside the rectangle.
Knowing the range first tells you to raise the upper y-bound; analysis beats guessing windows.
EXAMPLE 2 Aliasing a fast oscillation
Why do plots of \( f(x) = \sin 50x \) look wildly different in different windows?
Solution
Sine has period \( 2\pi \); compressing the input by 50 gives period \( \dfrac{2\pi}{50} = \dfrac{\pi}{25} \approx 0.126. \)
In a wide window the device samples too coarsely, missing peaks and troughs, so the curve is rendered falsely.
A narrow window such as \( [-0.25, 0.25] \) shows just a few true oscillations cleanly.

Treat the calculator as a draftsman, not an oracle. Before plotting, work out the domain, range, and any period by hand — then pick the window. Half the "weird graph" questions in homework are really "did you analyze the function first?" questions in disguise.

SECTION 1.5

Exponential Functions

Exponential Function

An exponential function \( f(x) = a^x \) has a positive constant base a and the variable as the exponent — do not confuse it with the power function \( x^2 \), where the variable is the base. The definition extends from integer to rational to irrational exponents by filling the gaps so the function stays increasing; the domain becomes all reals and the range is \( (0, \infty) \).

LAWS

Laws of Exponents

For positive bases a, b and any real exponents x, y, the familiar algebraic rules continue to hold:

\[ a^{x+y} = a^x a^y, \quad a^{x-y} = \frac{a^x}{a^y}, \quad (a^x)^y = a^{xy}, \quad (ab)^x = a^x b^x \]

Three behaviours occur: if \( 0 < a < 1 \) the function decreases, if \( a = 1 \) it is constant, and if \( a > 1 \) it increases. All graphs of \( a^x \) pass through \( (0,1) \), and larger bases grow faster for \( x > 0 \). Reflecting \( y = a^x \) across the y-axis gives \( y = (1/a)^x \).

(0,1) a>1 0<a<1
FIGURE 1.5.1Exponential growth (\( a>1 \)) and decay (\( 0
EXAMPLE 1 Reflect and shift
Sketch \( y = 3 - 2^x \) and state its domain and range.
Solution
Begin with \( y = 2^x \); reflect across the x-axis to get \( y = -2^x. \)
Shift up 3 units to get \( y = 3 - 2^x. \)
Domain is all reals; the horizontal asymptote moves to \( y = 3 \), so the range is \( (-\infty, 3). \)

The Number e

Among all bases, one is most convenient for calculus: the base e for which the tangent line to \( y = a^x \) at \( (0,1) \) has slope exactly 1. This number lies between 2 and 3 and is approximately \( 2.71828 \). The resulting natural exponential function \( y = e^x \) crosses the y-axis with slope 1, which simplifies the calculus to come.

Exponential functions outpace power functions: for large x, \( 2^x \) eventually exceeds \( x^2 \) and stays above it. Constant multiples of \( e^x \) (or any \( a^x \)) describe bacterial growth, radioactive decay, and population trends under ideal conditions.

SECTION 1.6

Inverse Functions and Logarithms

An inverse function reverses a rule: where f turns inputs into outputs, \( f^{-1} \) turns those outputs back into the original inputs. Not every function has one — only the one-to-one functions.

One-to-One Function

A function is one-to-one if it never produces the same output twice: \( f(x_1) \neq f(x_2) \) whenever \( x_1 \neq x_2 \). Each output corresponds to exactly one input.

TEST

The Horizontal Line Test

A function is one-to-one if and only if no horizontal line meets its graph more than once. If a horizontal line crossed the graph twice, two inputs would share an output, breaking the one-to-one condition.

Inverse Function

Let f be one-to-one with domain A and range B. Its inverse \( f^{-1} \) has domain B and range A, defined by \( f^{-1}(y) = x \iff f(x) = y \). The domain and range simply swap. Caution: the \( -1 \) is notation for "inverse," not a reciprocal exponent.

Cancellation equations
\[ f^{-1}\big(f(x)\big) = x \ \text{ for all } x \in A, \qquad f\big(f^{-1}(x)\big) = x \ \text{ for all } x \in B \]
EXAMPLE 1 Finding an inverse
Find the inverse of \( f(x) = x^3 + 2 \).
Solution
Write \( y = x^3 + 2. \)
Solve for x: \( x^3 = y - 2 \Rightarrow x = \sqrt[3]{y - 2}. \)
Interchange variables: \( f^{-1}(x) = \sqrt[3]{x - 2}. \) The graph of \( f^{-1} \) is the reflection of f across the line \( y = x. \)
Logarithms

Logarithmic Function

For \( a > 0,\ a \neq 1 \), the logarithm \( \log_a x \) is the inverse of \( a^x \): it answers "to what power must a be raised to give x?" It has domain \( (0, \infty) \), range all reals, and its graph is the reflection of \( a^x \) across \( y = x \). Every logarithmic graph passes through \( (1, 0) \).

LAWS

Laws of Logarithms

For positive numbers x, y and any real r:

\[ \log_a(xy) = \log_a x + \log_a y, \quad \log_a\!\left(\frac{x}{y}\right) = \log_a x - \log_a y, \quad \log_a(x^r) = r\log_a x \]

Natural Logarithm and Change of Base

The logarithm with base e is the natural logarithm, written \( \ln x \). Its defining relations are \( \ln x = y \iff e^y = x \), with \( \ln e = 1 \). Any logarithm converts to natural logs through the change-of-base formula, which is how calculators evaluate \( \log_a x \).

Change of base
\[ \log_a x = \frac{\ln x}{\ln a} \]
EXAMPLE 2 Solving an exponential equation
Solve \( e^{5 - 3x} = 10 \).
Solution
Take \( \ln \) of both sides: \( \ln(e^{5-3x}) = \ln 10. \)
By cancellation, \( 5 - 3x = \ln 10 \Rightarrow 3x = 5 - \ln 10. \)
\[ x = \tfrac{1}{3}(5 - \ln 10) \approx 0.8991. \]
Inverse trigonometric functions

Restricting the Domain

The trigonometric functions repeat, so they fail the Horizontal Line Test and have no inverse as given. We restrict each to an interval where it is one-to-one. The inverse sine (arcsine) uses \( [-\pi/2,\ \pi/2] \); the inverse cosine (arccosine) uses \( [0,\ \pi] \); the inverse tangent (arctangent) uses \( (-\pi/2,\ \pi/2) \).

Defining relations of the inverse trig functions
\[ \sin^{-1}x = y \iff \sin y = x,\ -\tfrac{\pi}{2} \le y \le \tfrac{\pi}{2} \] \[ \cos^{-1}x = y \iff \cos y = x,\ 0 \le y \le \pi \] \[ \tan^{-1}x = y \iff \tan y = x,\ -\tfrac{\pi}{2} < y < \tfrac{\pi}{2} \]
EXAMPLE 3 Simplify with a right triangle
Simplify \( \cos(\tan^{-1}x) \).
Solution
Let \( y = \tan^{-1}x \), so \( \tan y = x \) with \( -\pi/2 < y < \pi/2. \)
Use \( \sec^2 y = 1 + \tan^2 y = 1 + x^2 \); since \( \cos y > 0 \) on this interval, \( \sec y = \sqrt{1 + x^2}. \)
\[ \cos(\tan^{-1}x) = \cos y = \frac{1}{\sec y} = \frac{1}{\sqrt{1 + x^2}}. \]

Two habits will save you all term. First, logs and exponentials are inverse operations — when you see one trapping a variable, hit it with the other. Second, for any inverse-trig simplification, draw the right triangle implied by the inner function and read the answer off the sides. It is faster and far less error-prone than chasing identities.