Sub topic 2
Modulus functions and their V-shaped graphs
This chapter assumes you can solve linear and quadratic equations, plot points on the coordinate plane, and evaluate absolute values. Each section covers one part of the plan, in order.
Modulus functions and their V-shaped graphs
The modulus of x, written |x|, is its distance from zero. So |x| = x when x ≥ 0, and |x| = -x when x < 0. The graph of y = |x| is a V with its vertex at the origin. For y = |x - 2| + 1, the vertex moves to (2, 1): the term inside the bars shifts the graph right, and the term outside shifts it up.
Greatest-integer and ceiling functions
The greatest-integer function, written floor(x), gives the largest integer less than or equal to x. Its graph is a staircase. The ceiling function, written ceil(x), gives the smallest integer greater than or equal to x. The two differ for negative inputs: floor(-2.3) = -3, but ceil(-2.3) = -2.
import math
def f(x):
return abs(x - 2) + 1
def g(x):
return 2 * x + 3
print(f(2)) # 1, the vertex of the V
print(math.floor(-2.3)) # -3
print(math.ceil(-2.3)) # -2
print(g(f(1))) # f(1) = 2, then g(2) = 7Piecewise functions and breakpoints
A piecewise function applies different formulas on different intervals. The point where the rule changes is the breakpoint. Evaluate both formulas at the breakpoint, and confirm that the graph joins or jumps there as the definition requires.
Shifting, reflecting and scaling graphs
For a function f, the graph of y = f(x - h) + k is the graph of f shifted right by h and up by k. The graph of y = -f(x) reflects in the x-axis. The graph of y = f(-x) reflects in the y-axis. The graph of y = a·f(x) stretches vertically by a factor of a.
Even and odd functions and symmetry
A function is even when f(-x) = f(x), so its graph is symmetric about the y-axis. It is odd when f(-x) = -f(x), so its graph is symmetric about the origin. The function |x| is even, and x³ is odd. The floor function is neither.
Composite functions f(g(x))
To compute f(g(x)), apply g first, then apply f to the result. Order matters. With f(x) = 2x + 3 and g(x) = x², f(g(1)) = 5 but g(f(1)) = 25.
Exercise
Let f(x) = |x - 2| + 1 and g(x) = 2x + 3. What is f(g(-1))?
Show answer
g(-1) = 2(-1) + 3 = 1, and f(1) = |1 - 2| + 1 = 2. So f(g(-1)) = 2.