Stewart Precalculus — Chapter 2

Piecewise Functions

A piecewise function uses different formulas on different parts of its domain. Master the notation, evaluating, graphing, continuity, and real-world models—all of Chapter 2 in one place.

Quick Reference

Standard notation

f(x) = { formula_1   if condition_1
        formula_2   if condition_2
        formula_3   if condition_3 }

Absolute value as piecewise

|x| = {  x    if x ≥ 0
      −x   if x < 0 }

Continuity condition at x = c

limₐ→ₑ⁻ f(x) = limₐ→ₑ⁺ f(x) = f(c)

Floor (greatest integer) function

⌊x⌋ = greatest integer ≤ x
⌊3.7⌋ = 3    ⌊−1.2⌋ = −2

1Definition and Notation

A piecewise function (also called a piecewise-defined function) is a function whose formula changes depending on which part of the domain you are in. Instead of a single equation, you get a list of equations, each paired with an interval condition. The curly-brace notation makes this explicit:

f(x) =

x²               if x < 0

x + 1           if 0 ≤ x ≤ 3

2x − 5        if x > 3

Reading this definition: for any input x you first check which condition is satisfied, then apply only that formula. Each condition describes an interval—the domain piece. The union of all the pieces must cover the entire domain of f.

Key vocabulary

  • Piece — one formula together with its associated interval condition.
  • Boundary point — an x-value where the formula switches from one piece to another.
  • Overlapping vs. disjoint — the intervals must be disjoint (no x-value satisfies two conditions). If they overlap, the function is not well-defined at the overlap.
  • Inclusive endpoint — a condition with ≤ or ≥ includes the boundary. An exclusive endpoint uses strict < or >.

Why piecewise functions matter in precalculus

Piecewise functions appear constantly in calculus (limits and derivatives at corners), economics (marginal cost and tax schedules), engineering (signals defined differently on intervals), and statistics (probability density functions). Stewart Chapter 2 introduces them as the first serious example of how a single function can have radically different behavior on different parts of its domain.

2Evaluating Piecewise Functions

Evaluating a piecewise function is a two-step process: identify the piece, then substitute. Never substitute into the wrong piece, even if the arithmetic would be simpler there.

Algorithm: Evaluating f(a)

  1. 1.Write down the value a you are plugging in.
  2. 2.Read the condition for each piece and check: does a satisfy this condition?
  3. 3.Identify the unique piece whose condition is satisfied. (Exactly one piece should qualify for a well-defined function.)
  4. 4.Substitute a into that piece's formula and simplify.
  5. 5.State your answer clearly: f(a) = [value].

Worked Example 1

Let f(x) be defined as: 3x − 1 if x < 2, and x² + 1 if x ≥ 2. Find f(−4), f(2), and f(5).

f(−4):

Check: is −4 < 2? Yes. Use the first piece: 3(−4) − 1 = −12 − 1 = −13.

f(2):

Check: is 2 < 2? No. Is 2 ≥ 2? Yes. Use the second piece: (2)² + 1 = 4 + 1 = 5.

f(5):

Check: is 5 ≥ 2? Yes. Use the second piece: (5)² + 1 = 25 + 1 = 26.

Worked Example 2 — Three Pieces

Let g(x) be: −x if x < 0,   4 if x = 0,   x² − 1 if x > 0. Find g(−3), g(0), and g(2).

g(−3):

−3 < 0, so use −x: −(−3) = 3.

g(0):

x = 0 exactly, so use the middle piece: g(0) = 4. (The function has a special value defined right at x = 0.)

g(2):

2 > 0, so use x² − 1: (2)² − 1 = 4 − 1 = 3.

Common mistake: using the wrong piece

Students frequently substitute into the first formula they see, ignoring the condition. Always check the condition before substituting. At a boundary value like x = 2, carefully determine whether the condition uses strict < or non-strict ≤. The boundary belongs to exactly one piece.

3Graphing Piecewise Functions

To graph a piecewise function, graph each piece only over its specified interval. At every boundary point, mark the endpoint with the correct circle type.

Open vs. Closed Circles

Closed circle (filled)

The point IS included. Used when the condition is ≤ or ≥ at that endpoint. The function value is defined there.

Open circle (hollow)

The point is NOT included. Used when the condition is strict < or > at that endpoint. The function approaches but does not reach this value.

Graphing Procedure

  1. 1.List all boundary points. These are the x-values where one condition ends and another begins.
  2. 2.For each piece, identify its formula and its interval. Determine whether each endpoint is included (closed) or excluded (open).
  3. 3.Sketch each piece over its interval as if it were a stand-alone function, but only within the interval. Draw the rest of the curve faintly, then erase what falls outside the interval.
  4. 4.At each left endpoint, place a closed circle if included or an open circle if excluded. Do the same for right endpoints.
  5. 5.Check: if two pieces share a boundary, exactly one should have a closed circle there (or both open if neither includes it, which creates a genuine hole).

Worked Example 3 — Graphing a Three-Piece Function

Graph h(x) = −1 if x < −1,   x if −1 ≤ x ≤ 2,   3 if x > 2.

Piece 1: y = −1, for x < −1

Horizontal line at y = −1, extending left from x = −1 to −∞. Open circle at (−1, −1) because x = −1 is excluded (strict <).

Piece 2: y = x, for −1 ≤ x ≤ 2

Line y = x (slope 1) from (−1, −1) to (2, 2). Closed circles at both endpoints because the condition is ≤ on both sides.

Piece 3: y = 3, for x > 2

Horizontal line at y = 3, extending right from x = 2 to +∞. Open circle at (2, 3) because x = 2 is excluded (strict >).

Circle check at boundary x = −1:

Piece 1 has an open circle at (−1, −1); Piece 2 has a closed circle at (−1, −1). The closed circle wins—the point (−1, −1) IS on the graph.

Circle check at boundary x = 2:

Piece 2 has a closed circle at (2, 2); Piece 3 has an open circle at (2, 3). There is a closed circle at (2, 2) and an open circle at (2, 3)—these are at different y-values, so both markings appear on the graph.

What to look for on the graph

  • Jumps: a jump discontinuity shows up as two endpoints at the same x-value but different y-values—one open, one closed (or both open).
  • Corners: the graph is continuous but the two pieces meet at an angle (not smooth). This is a removable or non-removable corner depending on derivatives, but for precalculus just note the kink.
  • Holes: if both pieces use strict inequalities at a boundary and a third piece defines a single isolated point there, the graph shows an isolated dot.

4Continuity of Piecewise Functions

A function is continuous at x = c if three conditions hold simultaneously:

1

f(c) is defined

The function value exists at x = c.

2

The limit exists

Left-hand and right-hand limits both equal the same number L.

3

Limit equals value

L = f(c). The limit and the function value agree.

For a piecewise function, you only need to check continuity at boundary points. Each piece is typically a polynomial or simple function that is already continuous on its open interval; the only potential breaks are where pieces join.

Checking continuity at a boundary

At boundary x = c, with left piece L(x) and right piece R(x):

Left-hand limit = lim of L(x) as x approaches c from the left = L(c) (plug c into L)

Right-hand limit = lim of R(x) as x approaches c from the right = R(c) (plug c into R)

The function is continuous at c if and only if L(c) = R(c) AND f(c) equals that common value.

(If the boundary belongs to L by an ≤ condition, then f(c) = L(c) automatically. If it belongs to R by ≥, then f(c) = R(c). Either way, continuity still requires L(c) = R(c).)

Worked Example 4 — Finding a for Continuity

Find the value of a that makes f continuous everywhere, where f(x) = ax + 5 if x < 1, and 3x² + 2 if x ≥ 1.

Step 1. Identify the boundary: x = 1.

Step 2. Left-hand limit: plug x = 1 into the left piece: a(1) + 5 = a + 5.

Step 3. Right-hand limit (and f(1)): plug x = 1 into the right piece: 3(1)² + 2 = 5.

Step 4. Set equal and solve: a + 5 = 5, so a = 0.

Verify: With a = 0, the left piece is just 5 for x near 1. The right piece gives 5 at x = 1. Both sides meet at y = 5. Continuous.

Worked Example 5 — Two Constants, Two Boundaries

Find a and b so that g(x) = 2x + a if x < 0,   bx² + 3 if 0 ≤ x ≤ 1,   x + 4 if x > 1   is continuous everywhere.

Boundary x = 0:

Left piece at 0: 2(0) + a = a.

Right piece (and f(0)): b(0)² + 3 = 3.

Continuity: a = 3, so a = 3.

Boundary x = 1:

Left piece (f(1)): b(1)² + 3 = b + 3.

Right piece at 1: (1) + 4 = 5.

Continuity: b + 3 = 5, so b = 2.

Types of discontinuities in piecewise functions

Jump discontinuity

Left and right limits both exist but are not equal. The graph literally jumps to a different height at the boundary.

Removable discontinuity

Left and right limits agree, but f(c) is either undefined or differs from that common limit. A single isolated point is missing or misplaced.

Infinite discontinuity

Rare in simple piecewise functions, but possible if one piece involves 1/x and the boundary is x = 0. One or both one-sided limits go to infinity.

5Absolute Value as a Piecewise Function

The absolute value function is the most important built-in piecewise function in precalculus. Its piecewise definition is:

|x| = {  x      if x ≥ 0

        −x    if x < 0 }

The second piece (−x when x < 0) does not produce a negative output—since x is already negative, −x is positive. For example, |−7| = −(−7) = 7.

Expressions involving absolute value

You can rewrite any expression |f(x)| as a piecewise function by setting f(x) ≥ 0 and f(x) < 0 as your two cases.

Worked Example 6 — Rewriting |2x − 6| as Piecewise

Step 1. Find where 2x − 6 = 0: x = 3. This is the boundary point.

Step 2. When x ≥ 3: 2x − 6 ≥ 0, so |2x − 6| = 2x − 6.

Step 3. When x < 3: 2x − 6 < 0, so |2x − 6| = −(2x − 6) = −2x + 6.

|2x − 6| = {  −2x + 6    if x < 3

              2x − 6     if x ≥ 3 }

The graph is a V-shape with vertex at (3, 0).

Graph of |x| and transformations

  • The parent graph y = |x| is a V-shape with vertex at the origin, slope −1 on the left and slope +1 on the right.
  • y = |x − h| + k shifts the vertex to (h, k).
  • y = a|x| stretches vertically by factor |a|; if a < 0 the V flips downward.
  • y = |ax + b| has vertex at x = −b/a and the graph narrows or widens depending on |a|.

6The Greatest Integer Function (Floor Function)

The greatest integer function, denoted ⌊x⌋ (or sometimes written as INT(x) or floor(x)), returns the largest integer that is less than or equal to x. It is a piecewise function with infinitely many pieces—one constant piece for each unit interval.

⌊x⌋ = {

−2     if −2 ≤ x < −1

−1     if −1 ≤ x < 0

 0      if  0 ≤ x < 1

 1      if  1 ≤ x < 2

 2      if  2 ≤ x < 3

}

Evaluating the floor function

Positive and zero inputs

  • ⌊3.7⌋ = 3    (drop the decimal)
  • ⌊5⌋ = 5     (integer, keep it)
  • ⌊0.9⌋ = 0   (less than 1)
  • ⌊0⌋ = 0     (zero itself)

Negative inputs (most common error)

  • ⌊−1.2⌋ = −2   (NOT −1)
  • ⌊−3.0⌋ = −3   (exact integer)
  • ⌊−0.5⌋ = −1   (just below 0)
  • ⌊−4.9⌋ = −5   (between −5 and −4)

Critical point: negatives go DOWN

For negative non-integers, the floor always goes to the more-negative integer. ⌊−1.2⌋ = −2, not −1. Think of it as: which integer is to the LEFT of −1.2 on the number line? That is −2.

Graph of the floor function

The graph of y = ⌊x⌋ is a staircase: horizontal segments at each integer height, with a closed circle at the left endpoint of each step and an open circle at the right endpoint. The function jumps up by 1 at every integer x-value.

  • Domain: all real numbers (−∞, +∞).
  • Range: all integers ℤ.
  • Jump discontinuities at every integer x-value; continuous everywhere else.

Ceiling function (related)

The ceiling function ⌈x⌉ returns the smallest integer greater than or equal to x. ⌈3.2⌉ = 4, ⌈5⌉ = 5, ⌈−1.3⌉ = −1. Its graph is the staircase flipped: closed circles on the right endpoint of each step, open on the left.

7Step Functions and Real-World Applications

A step function is any piecewise constant function—each piece is a horizontal segment. The greatest integer function is the prototypical step function, but many real-world models have the same staircase structure.

Application 1 — Simplified Tax Bracket

A hypothetical tax system charges: 10% on income from $0 to $10,000; 20% on income from $10,001 to $40,000; 30% on income above $40,000. Define T(x) as the tax rate function (as a decimal):

T(x) = {  0.10     if 0 ≤ x ≤ 10000

          0.20     if 10000 < x ≤ 40000

          0.30     if x > 40000 }

Note: this is the marginal rate function. Total tax owed requires integrating T(x) (or computing it piecewise), which is why real tax calculations use bracket tables. A taxpayer with x = $50,000 pays 10% on the first $10,000 + 20% on the next $30,000 + 30% on the remaining $10,000—not 30% on the entire $50,000.

Application 2 — Shipping Rate

A shipping company charges $5 for packages up to 1 lb, $8 for packages over 1 lb up to 5 lb, and $15 for packages over 5 lb up to 20 lb. Define S(w) for weight w in pounds:

S(w) = {  5     if 0 < w ≤ 1

          8     if 1 < w ≤ 5

          15    if 5 < w ≤ 20 }

Evaluate S(0.5) = $5. S(1) = $5 (closed at 1). S(1.01) = $8. S(5) = $8 (closed at 5). S(5.5) = $15. The jump discontinuities at w = 1 and w = 5 represent the price steps.

Application 3 — Overtime Pay

An employee earns $20/hr for up to 40 hours, and $30/hr (time-and-a-half) for every hour over 40. Weekly pay P(h) as a function of hours h:

P(h) = {  20h                    if 0 ≤ h ≤ 40

          800 + 30(h − 40)    if h > 40 }

P(40) = 20(40) = $800. P(45) = 800 + 30(5) = 800 + 150 = $950. Check continuity: the left piece at h = 40 gives 20(40) = 800, and the right piece at h = 40 gives 800 + 30(0) = 800. Continuous at h = 40—no jump in pay at exactly 40 hours.

Application 4 — Cell Phone Billing

A phone plan charges $30 flat for up to 500 minutes, then $0.10 per additional minute. If data overages apply a separate fee d, the total bill B(m) for m minutes:

B(m) = {  30                         if 0 ≤ m ≤ 500

          30 + 0.10(m − 500)      if m > 500 }

8Domain and Range of Piecewise Functions

Finding domain and range of a piecewise function requires examining each piece separately, then combining the results.

Finding the Domain

Procedure

  1. 1.Look at each condition (interval) listed in the piecewise definition. These are the allowed inputs for each piece.
  2. 2.Check whether any piece has additional restrictions within its interval (e.g., a square root requires the radicand ≥ 0, a logarithm requires a positive argument).
  3. 3.The domain is the union of all allowed input intervals across all pieces.

Example: Finding Domain

f(x) = √(x + 2) if x < 1,   1/(x − 4) if x ≥ 1.

Piece 1: condition says x < 1. But √(x + 2) requires x + 2 ≥ 0, i.e., x ≥ −2. Combined: −2 ≤ x < 1.

Piece 2: condition says x ≥ 1. But 1/(x − 4) requires x ≠ 4. Combined: x ≥ 1 and x ≠ 4.

Domain: [−2, 1) ∪ [1, 4) ∪ (4, ∞) = [−2, 4) ∪ (4, ∞).

Finding the Range

Procedure

  1. 1.For each piece, determine the range of outputs when the formula is restricted to its interval. Treat it like finding the range of a function on a closed or half-open interval.
  2. 2.At the endpoints of each piece, compute the function value (or the limit if the endpoint is open) to find the boundary of the output range.
  3. 3.Take the union of the output ranges of all pieces.

Example: Finding Range

g(x) = x + 3 if x < 0,   x² if x ≥ 0.

Piece 1: y = x + 3 for x < 0. As x → −∞, y → −∞. At x = 0 (excluded): y → 3 (open). Range of piece 1: (−∞, 3).

Piece 2: y = x² for x ≥ 0. At x = 0 (included): y = 0. As x → +∞, y → +∞. Range of piece 2: [0, +∞).

Total range: (−∞, 3) ∪ [0, +∞) = (−∞, +∞)—all real numbers. (The overlap [0, 3) is covered by both pieces.)

9Writing Piecewise Functions from Graphs

Given a graph of a piecewise function, you work backwards: identify the pieces, find each formula, and state the domain interval for each.

Procedure: Graph to Formula

  1. 1.Identify boundary x-values. Look for where the graph changes character: a corner, a jump, or a transition between two different curve types. Note whether each boundary has an open or closed circle.
  2. 2.Identify the shape of each piece. Is it a straight line? A parabola? A horizontal segment? A square root curve?
  3. 3.Find the formula for each piece. For a line, use two points to find slope and y-intercept. For a parabola, identify the vertex form. For a constant, just read the y-value.
  4. 4.State each interval. Use the boundary x-values and the open/closed circle information to write correct inequality conditions (≤ vs. <).
  5. 5.Assemble the piecewise definition with each formula paired to its interval.

Worked Example 7 — Writing from a Described Graph

A graph has: a line segment from (−3, 5) (closed) to (0, 2) (open); a horizontal segment y = 1 from (0, 1) (closed) to (2, 1) (closed); a ray starting at (2, 4) (open) going up and to the right following y = x + 2.

Piece 1: −3 ≤ x < 0

Line through (−3, 5) and approaching (0, 2). Slope = (2 − 5)/(0 − (−3)) = −3/3 = −1. Using point (−3, 5): y = −(x + 3) + 5 = −x + 2. Formula: −x + 2.

Piece 2: 0 ≤ x ≤ 2

Horizontal segment at y = 1. Formula: 1.

Piece 3: x > 2

Ray y = x + 2, starting at x = 2 (excluded, open circle). Formula: x + 2.

f(x) = {  −x + 2    if −3 ≤ x < 0

          1          if 0 ≤ x ≤ 2

          x + 2      if x > 2 }

10Piecewise Polynomial Pieces

Many piecewise functions use polynomial formulas on each piece. Important skills include finding where two polynomial pieces agree (equal each other), analyzing behavior near boundary points, and working with piecewise quadratics.

Where two pieces agree

To find x-values where formula 1 = formula 2 (ignoring the domain restrictions for a moment), set the two expressions equal and solve. The solutions show you where the two pieces would naturally cross if extended. This is relevant for:

  • Verifying that a piecewise function is continuous (the pieces agree at the boundary).
  • Finding the intersection of the two piece formulas when asked to graph both on the same axes.
  • Determining where a given output value y = k is achieved by either piece.

Worked Example 8 — Solving Across Pieces

Find all x such that f(x) = 5, where f(x) = x² if x < 0, and 2x + 3 if x ≥ 0.

Piece 1: x² = 5, with x < 0

x = &pm;√5. Only x = −√5 satisfies x < 0. So x = −√5 &approx; −2.24 is one solution.

Piece 2: 2x + 3 = 5, with x ≥ 0

2x = 2, x = 1. Since 1 ≥ 0, this is valid. So x = 1 is a second solution.

f(x) = 5 at x = −√5 and x = 1.

11Transformations of Piecewise Functions

Transformations (shifts, reflections, stretches) apply to piecewise functions in the same way they apply to any function. The key is to apply the transformation to every piece simultaneously, and also to update the domain intervals if the transformation involves a horizontal change.

Vertical shift: y = f(x) + k

Add k to each formula. Domain intervals are unchanged.

If f(x) = { x if x < 0, x+1 if x≥0 }

then f(x)+3 = { x+3 if x<0, x+4 if x≥0 }

Vertical reflection: y = −f(x)

Negate each formula. Domain intervals are unchanged.

If piece formula is x², −f gives −x².

If piece formula is 2x+1, −f gives −2x−1.

Horizontal shift: y = f(x − h)

Replace x with (x − h) in each formula AND shift each interval right by h.

If original piece uses x < 0, the shifted piece uses x − h < 0, i.e., x < h.

Horizontal reflection: y = f(−x)

Replace x with (−x) in each formula AND reverse each interval (left becomes right, flip inequalities).

If original piece has x < 0, −x < 0 means x > 0.

Worked Example 9 — Horizontal Shift

Given f(x) = x + 1 if x < 2, and x² if x ≥ 2. Find g(x) = f(x − 3).

Replace x with (x − 3) in each formula, and shift each interval right by 3:

Piece 1: formula becomes (x − 3) + 1 = x − 2. Interval x < 2 becomes (x − 3) < 2, i.e., x < 5.

Piece 2: formula becomes (x − 3)². Interval x ≥ 2 becomes (x − 3) ≥ 2, i.e., x ≥ 5.

g(x) = {  x − 2         if x < 5

          (x − 3)²    if x ≥ 5 }

12Additional Worked Examples

Worked Example 10 — Temperature Model

The temperature T (in °F) in a town is modeled by: T(h) = 50 + 3h if 0 ≤ h ≤ 8 (rising from midnight to 8 AM), 74 − 2(h − 8) if 8 < h ≤ 20 (falling from 8 AM to 8 PM), and 50 if 20 < h ≤ 24 (stable overnight). Here h is hours after midnight.

T(0) = 50 + 3(0) = 50°F (midnight)

T(8) = 50 + 3(8) = 50 + 24 = 74°F (8 AM peak)

T(14) = 74 − 2(14 − 8) = 74 − 12 = 62°F (2 PM)

T(20) = 74 − 2(20 − 8) = 74 − 24 = 50°F (8 PM)

T(22) = 50°F (10 PM, stable piece)

Continuity check at h = 8: left piece gives 50 + 3(8) = 74. Right piece gives 74 − 2(0) = 74. Continuous. At h = 20: left piece gives 74 − 2(12) = 50. Right piece gives 50. Continuous.

Worked Example 11 — Is f Continuous? Identify Discontinuity Type

f(x) = x² + 1 if x < 2,   6 − x if x > 2. (No formula given for x = 2.)

f(2): undefined (x = 2 satisfies neither condition).

Left-hand limit: plug x = 2 into x² + 1: 4 + 1 = 5.

Right-hand limit: plug x = 2 into 6 − x: 6 − 2 = 4.

Conclusion: left limit (5) ≠ right limit (4), so f has a jump discontinuity at x = 2. The function is also undefined at x = 2, so this is a non-removable discontinuity.

Worked Example 12 — Using the Floor Function

A parking garage charges $3 per hour or fraction thereof (ceiling billing). Model the cost C(t) for t hours parked, where 0 < t ≤ 8.

“Fraction thereof” means you always round up to the next whole hour. This is the ceiling function: C(t) = 3 ⋅ ⌈t⌉.

C(0.5) = 3 ⋅ ⌈0.5⌉ = 3 ⋅ 1 = $3 (started the first hour).

C(1) = 3 ⋅ ⌈1⌉ = 3 ⋅ 1 = $3 (exactly 1 hour, no fraction).

C(1.1) = 3 ⋅ ⌈1.1⌉ = 3 ⋅ 2 = $6 (started the second hour).

C(3) = 3 ⋅ ⌈3⌉ = 3 ⋅ 3 = $9.

13Exam Strategy and Common Mistakes

Do This

  • Always check the condition before substituting.
  • At boundary points, determine which piece owns the point by the ≤ or < condition.
  • When graphing, place your circles carefully—open for strict inequality, closed for non-strict.
  • For continuity problems, set up the equation left-piece = right-piece at the boundary, then solve.
  • For floor function with negatives, always go to the MORE negative integer.
  • When finding range, analyze each piece separately on its restricted interval.

Avoid This

  • Using the first formula you see without checking the condition.
  • Putting closed circles at both ends of a boundary (only one piece can claim the boundary).
  • Thinking ⌊−2.3⌋ = −2 (it's −3).
  • Forgetting to check domain restrictions within a piece (like square root or denominator).
  • Concluding continuity just because the formulas look similar near the boundary.
  • Forgetting to shift intervals when applying a horizontal transformation.

Checklist for Every Piecewise Problem

Frequently Asked Questions

What is a piecewise function?
A piecewise function is a function defined by two or more formulas, each applying to a specific interval of the domain. You check which interval contains your input x, then apply only that formula. The conditions must be mutually exclusive so that each x falls into exactly one piece.
How do you evaluate a piecewise function at a given x-value?
First check which condition is satisfied by your x-value. Then substitute x into that formula only. For example, if f(x) equals x squared for x less than 0, and 2x plus 1 for x greater than or equal to 0, then f(-3) = (-3) squared = 9, and f(4) = 2(4) + 1 = 9.
When do you use an open circle vs a closed circle on a piecewise graph?
Use a closed (filled) circle when the endpoint IS included in the piece&apos;s domain&mdash;indicated by a less-than-or-equal or greater-than-or-equal condition. Use an open (hollow) circle when the endpoint is excluded&mdash;indicated by a strict less-than or greater-than. At a shared boundary, exactly one piece can have a closed circle.
How do you find the constant that makes a piecewise function continuous?
Set the two pieces equal at the boundary x-value and solve for the unknown constant. For example, if the left piece gives a value of 2a + 3 at the boundary and the right piece gives 7, set 2a + 3 = 7 and solve: a = 2. Always verify by plugging back in.
How is absolute value defined as a piecewise function?
The absolute value |x| is defined as x when x is greater than or equal to 0, and as negative x when x is less than 0. The second piece removes the negative sign for negative inputs, so the output is always non-negative. For any expression |f(x)|, find where f(x) equals zero to locate the boundary, then split into two pieces.
What is the greatest integer function and why does it floor negative numbers to the more negative integer?
The greatest integer function floor(x) returns the largest integer that is less than or equal to x. For positive numbers this is simple truncation: floor(3.7) = 3. For negatives, you must go to the more negative integer because the largest integer still to the left (less than) of -1.2 on the number line is -2, not -1. Floor(-1.2) = -2.
What are step functions and where do they appear in real life?
Step functions are piecewise constant functions whose graphs look like staircases. Real-world examples include US federal tax brackets (constant marginal rate per income interval), postal shipping rates (flat fee per weight threshold), parking garage fees (flat rate per hour started), and utility billing tiers. The greatest integer and ceiling functions are the mathematical prototypes.
How do you find the domain and range of a piecewise function?
For the domain, take the union of all the condition intervals, after also applying any within-piece restrictions such as square root requires non-negative radicand. For the range, analyze the output of each formula restricted to its interval, find the range of each piece separately, then take the union of all those output sets.

Related Precalculus Topics