The Central Idea

Consider the function

\[ f(x)= \begin{cases} x+2, & x<1,\\ -2x+5, & x\ge1. \end{cases} \]

This is one function, but it uses two affine rules.

For inputs less than \(1\), use

\[ f(x)=x+2. \]

For inputs at least \(1\), use

\[ f(x)=-2x+5. \]

At the boundary \(x=1\), the second rule applies because it contains

\[ x\ge1. \]

Piecewise notation lets a function change its rule when the input enters a different region.

What Is a Piecewise Function?

A piecewise function is defined by different formulas on different parts of its domain.

A typical form is

\[ f(x)= \begin{cases} f_1(x), & \text{condition 1},\\ f_2(x), & \text{condition 2},\\ \vdots \end{cases} \]

Each formula is called a piece or branch.

The accompanying condition tells us where that piece applies.

Piecewise-Linear Functions

A piecewise-linear function uses linear or affine rules on its separate intervals.

For example,

\[ f(x)= \begin{cases} 2x+1, & x<0,\\ -x+4, & x\ge0. \end{cases} \]

Each branch graphs as part of a straight line.

The complete graph is assembled from those line pieces.

The Conditions Are Part of the Definition

In

\[ f(x)= \begin{cases} 2x+1, & x<0,\\ -x+4, & x\ge0, \end{cases} \]

the first formula is not used when \(x=3\), even though we could algebraically substitute \(3\) into it.

The condition says that branch applies only when

\[ x<0. \]

Piecewise functions require us to use both the formula and its domain condition.

Evaluating a Piecewise Function

Consider

\[ f(x)= \begin{cases} 3x-1, & x<2,\\ x+5, & x\ge2. \end{cases} \]

Find \(f(1)\).

Because

\[ 1<2, \]

use the first branch:

\[ f(1)=3(1)-1=2. \]

Thus,

\[ \boxed{f(1)=2}. \]

Evaluating at the Boundary

For the same function, find \(f(2)\).

The first condition is

\[ x<2, \]

which excludes \(2\).

The second is

\[ x\ge2, \]

which includes \(2\).

Therefore,

\[ f(2)=2+5=7. \]

So

\[ \boxed{f(2)=7}. \]

Open and Closed Endpoints

When graphing piecewise functions:

Thus, \(x<2\) uses an open endpoint at \(x=2\), while \(x\ge2\) uses a closed endpoint there.

Graph One Piece at a Time

For

\[ f(x)= \begin{cases} x+1, & x<2,\\ -2x+7, & x\ge2, \end{cases} \]

first graph

\[ y=x+1 \]

only for

\[ x<2. \]

Then graph

\[ y=-2x+7 \]

only for

\[ x\ge2. \]

The domain restrictions determine which portions of the full lines remain in the final graph.

Boundary Values from Each Formula

At the shared boundary \(x=2\), the first formula would give

\[ 2+1=3. \]

The second gives

\[ -2(2)+7=3. \]

Both approach the same point

\[ (2,3). \]

Because the second branch includes the endpoint, the graph contains

\[ \boxed{(2,3)}. \]

Continuous Piecewise-Linear Graphs

A piecewise-linear graph is continuous at a joining point when the pieces meet without a gap or jump.

In the previous example, both formulas agree at

\[ x=2. \]

So the pieces meet at the same point.

A Jump Discontinuity

Consider

\[ f(x)= \begin{cases} x+1, & x<2,\\ x+4, & x\ge2. \end{cases} \]

At \(x=2\), the first line approaches

\[ 3, \]

while the second branch gives

\[ 6. \]

The graph jumps from one height to another.

There is no continuous connection at \(x=2\).

A Hole Can Occur

Consider

\[ f(x)= \begin{cases} 2x, & x<1,\\ 2x, & x>1. \end{cases} \]

Both branches follow the same line, but neither condition includes

\[ x=1. \]

So the graph is the line

\[ y=2x \]

with the point

\[ (1,2) \]

removed.

Overlapping Conditions Require Care

A function should assign only one output to each input.

If two piecewise conditions overlap and their formulas give different outputs on that overlap, the definition fails to describe a function.

For example,

\[ f(x)= \begin{cases} x, & x\le2,\\ x+5, & x\ge2 \end{cases} \]

assigns both

\[ 2 \]

and

\[ 7 \]

to \(x=2\).

That is not a valid function definition unless the two values agree.

Gaps in the Domain

Piecewise conditions may also leave inputs undefined.

For example,

\[ f(x)= \begin{cases} x+1, & x<0,\\ 2x, & x>3 \end{cases} \]

has no defined values for

\[ 0\le x\le3. \]

The domain is

\[ \boxed{(-\infty,0)\cup(3,\infty)}. \]

Slopes Can Change from Piece to Piece

Consider

\[ f(x)= \begin{cases} 2x+1, & x<3,\\ -4x+19, & x\ge3. \end{cases} \]

The first branch has slope

\[ 2. \]

The second has slope

\[ -4. \]

The function therefore increases before the boundary and decreases afterward.

A Corner

If two continuous line pieces meet but have different slopes, the graph forms a corner.

For example, one piece may approach the joining point with slope \(2\), while the next leaves with slope \(-4\).

The function can be continuous even though its direction changes abruptly.

Constant Pieces

A piecewise-linear function may include horizontal segments.

For example,

\[ f(x)= \begin{cases} 2x, & x<1,\\ 2, & 1\le x\le4,\\ x-2, & x>4. \end{cases} \]

The middle branch has slope

\[ 0. \]

Piecewise-linear does not require every piece to have nonzero slope.

Real-World Example: Tiered Pricing

Suppose parking costs \$5 for up to two hours and then \$3 for each additional hour.

A simplified model might be

\[ C(t)= \begin{cases} 5, & 02. \end{cases} \]

The first branch is constant.

The second branch increases linearly from the two-hour threshold.

Why Point-Slope Thinking Helps

The second pricing branch begins at the known point

\[ (2,5) \]

with rate

\[ 3. \]

So

\[ C-5=3(t-2). \]

This is point-slope form embedded inside a piecewise model.

Earlier line tools therefore remain useful when constructing piecewise relationships.

Real-World Example: Tax Brackets

Progressive tax systems are often piecewise-defined because different portions of income may be taxed at different marginal rates.

Each bracket can contribute a line segment with a different slope.

A properly constructed model preserves continuity at bracket boundaries by carrying forward the tax already accumulated in earlier brackets.

Real-World Example: Shipping Cost

A shipping company might charge:

Such schedules naturally produce piecewise-linear cost functions.

Real-World Example: Motion

A vehicle may move at one constant velocity for several minutes, stop, then move at another constant velocity.

Its position-time graph can be piecewise linear:

Absolute Value

The absolute value of a real number measures its distance from zero:

\[ \boxed{|x|}. \]

Distance is never negative.

For example,

\[ |5|=5 \]

and

\[ |-5|=5. \]

Absolute Value as a Piecewise Function

The absolute-value function can be defined by

\[ \boxed{ |x|= \begin{cases} -x, & x<0,\\ x, & x\ge0. \end{cases} } \]

If \(x\) is negative, negating it makes the output positive.

If \(x\) is nonnegative, the output is unchanged.

The Graph of \(y=|x|\)

For

\[ x<0, \]

the graph follows

\[ y=-x. \]

For

\[ x\ge0, \]

it follows

\[ y=x. \]

The two lines meet at

\[ \boxed{(0,0)}. \]

The result is a V-shaped graph.

The Vertex

The point where the two branches of an absolute-value graph meet is called the vertex.

For

\[ y=|x|, \]

the vertex is

\[ \boxed{(0,0)}. \]

Slopes of \(y=|x|\)

On the left branch,

\[ y=-x, \]

so the slope is

\[ -1. \]

On the right branch,

\[ y=x, \]

so the slope is

\[ 1. \]

The slope changes abruptly at the vertex.

Absolute Value Is Continuous but Has a Corner

The two pieces of

\[ y=|x| \]

meet at the same point.

So the graph is continuous.

However, the slopes on the two sides are different:

\[ -1 \]

and

\[ 1. \]

This creates a corner at the origin.

Translated Absolute-Value Graphs

Consider

\[ \boxed{y=|x-h|+k}. \]

The graph of

\[ y=|x| \]

is shifted:

The vertex becomes

\[ \boxed{(h,k)}. \]

Why \(x-h\) Moves the Vertex to \(x=h\)

The absolute-value expression reaches its minimum when

\[ x-h=0. \]

Therefore,

\[ x=h. \]

At that input,

\[ y=|0|+k=k. \]

So the vertex is

\[ (h,k). \]

Example: Translation

Consider

\[ y=|x-3|+2. \]

The vertex is

\[ \boxed{(3,2)}. \]

The graph has the same V-shape as \(y=|x|\), shifted right \(3\) and up \(2\).

Horizontal-Shift Sign

Be careful with the sign inside the absolute value.

For

\[ y=|x+4|, \]

rewrite

\[ x+4=x-(-4). \]

So the vertex occurs at

\[ \boxed{(-4,0)}. \]

Vertical Scaling

Consider

\[ \boxed{y=a|x|}. \]

The parameter \(a\) changes the slopes of the branches.

For \(x<0\),

\[ y=-ax. \]

For \(x\ge0\),

\[ y=ax. \]

The branch slopes are therefore

\[ -a \]

and

\[ a. \]

Opening Upward or Downward

If

\[ a>0, \]

the graph opens upward.

If

\[ a<0, \]

the graph is reflected across the \(x\)-axis and opens downward.

Example: Steeper Absolute-Value Graph

Consider

\[ y=3|x|. \]

The left slope is

\[ -3, \]

and the right slope is

\[ 3. \]

The graph is narrower-looking than \(y=|x|\) under equal axis scaling because its branches change more rapidly.

Example: Downward V

Consider

\[ y=-2|x|+5. \]

The vertex is

\[ (0,5). \]

The left branch has slope

\[ 2, \]

and the right branch has slope

\[ -2. \]

The graph opens downward.

General Vertex Form

A transformed absolute-value function is commonly written

\[ \boxed{ y=a|x-h|+k }. \]

Its vertex is

\[ \boxed{(h,k)}. \]

Its branch slopes are

\[ -a \]

on the left and

\[ a \]

on the right.

Piecewise Form of \(a|x-h|+k\)

Because the sign of

\[ x-h \]

changes at

\[ x=h, \]

we may write

\[ a|x-h|+k = \begin{cases} -a(x-h)+k, & xThis exposes the two affine branches directly.

Example: Convert Absolute Value to Piecewise Form

Rewrite

\[ f(x)=2|x-3|+1. \]

For

\[ x<3, \]

we have

\[ |x-3|=-(x-3), \]

so

\[ f(x)=-2(x-3)+1=-2x+7. \]

For

\[ x\ge3, \]

we have

\[ f(x)=2(x-3)+1=2x-5. \]

Thus,

\[ \boxed{ f(x)= \begin{cases} -2x+7, & x<3,\\ 2x-5, & x\ge3. \end{cases} } \]

Convert a V-Shaped Piecewise Function to Absolute Value

Suppose

\[ f(x)= \begin{cases} -3x+6, & x<2,\\ 3x-6, & x\ge2. \end{cases} \]

The pieces meet at

\[ (2,0), \]

and the slopes are

\[ -3 \]

and

\[ 3. \]

Therefore,

\[ \boxed{ f(x)=3|x-2| }. \]

Not Every Piecewise V Is an Absolute-Value Function

For a graph to have the form

\[ a|x-h|+k, \]

its two branches must have equal slope magnitudes and opposite signs.

If the left slope is

\[ -2 \]

and the right slope is

\[ 5, \]

the graph may still be piecewise linear and V-like, but it is not a simple transformed absolute-value graph.

Absolute Value as Distance from a Point

The expression

\[ \boxed{|x-h|} \]

measures the distance between \(x\) and \(h\) on the number line.

For example,

\[ |x-4| \]

is the distance from \(x\) to \(4\).

Example: Equal Distance

Solve

\[ |x-4|=3. \]

This asks for points that are \(3\) units from \(4\).

So

\[ x=4-3=1 \]

or

\[ x=4+3=7. \]

Therefore,

\[ \boxed{x=1\text{ or }x=7}. \]

Graph Interpretation of \(|x-h|\)

In the function

\[ y=|x-h|, \]

the vertical output gives the distance from the input \(x\) to the reference point \(h\).

The vertex occurs where that distance is zero:

\[ x=h. \]

Absolute Value of an Affine Expression

Consider

\[ y=|2x-6|. \]

Factor:

\[ |2x-6| = |2(x-3)| = 2|x-3|. \]

So the vertex is

\[ \boxed{(3,0)} \]

and the branch slopes have magnitudes

\[ 2. \]

Piecewise Form of \(|2x-6|\)

The inside expression changes sign when

\[ 2x-6=0, \]

so

\[ x=3. \]

Thus,

\[ |2x-6|= \begin{cases} -(2x-6), & x<3,\\ 2x-6, & x\ge3. \end{cases} \]

Therefore,

\[ \boxed{ |2x-6|= \begin{cases} -2x+6, & x<3,\\ 2x-6, & x\ge3. \end{cases} } \]

Absolute Value and Reflection

One way to understand

\[ y=|f(x)| \]

is:

This works because absolute value changes negative outputs to positive ones.

Example: \(y=|x-2|\)

Start with

\[ y=x-2. \]

The line crosses the \(x\)-axis at

\[ x=2. \]

For \(x\ge2\), the line is already nonnegative and remains unchanged.

For \(x<2\), the negative portion is reflected upward.

The result is the V-shaped graph of

\[ y=|x-2|. \]

Minimum and Maximum Values

For

\[ y=a|x-h|+k, \]

if

\[ a>0, \]

the vertex gives the minimum value:

\[ \boxed{y_{\min}=k}. \]

If

\[ a<0, \]

the vertex gives the maximum value:

\[ \boxed{y_{\max}=k}. \]

Domain and Range

For an unrestricted absolute-value function

\[ f(x)=a|x-h|+k, \qquad a\ne0, \]

the domain is

\[ \boxed{\mathbb{R}}. \]

If \(a>0\), the range is

\[ \boxed{[k,\infty)}. \]

If \(a<0\), the range is

\[ \boxed{(-\infty,k]}. \]

Symmetry

The graph of

\[ y=a|x-h|+k \]

is symmetric about the vertical line

\[ \boxed{x=h}. \]

Inputs equally far from \(h\) produce the same output.

Example of Symmetry

For

\[ f(x)=2|x-3|+1, \]

the inputs

\[ x=1 \]

and

\[ x=5 \]

are both \(2\) units from \(3\).

So

\[ f(1)=f(5)=5. \]

Absolute-Value Zeros

Consider

\[ a|x-h|+k=0. \]

The number of real zeros depends on the vertical position and orientation of the graph.

A V-shaped graph may have:

Example: Two Zeros

Solve

\[ |x-3|-2=0. \]

Then

\[ |x-3|=2. \]

So

\[ x-3=2 \]

or

\[ x-3=-2. \]

Thus,

\[ \boxed{x=5\text{ or }x=1}. \]

Example: One Zero

Consider

\[ y=|x-4|. \]

The graph touches the \(x\)-axis only at its vertex:

\[ \boxed{(4,0)}. \]

So there is one zero:

\[ \boxed{x=4}. \]

Example: No Zeros

Consider

\[ y=|x|+3. \]

Because

\[ |x|\ge0, \]

we have

\[ |x|+3\ge3. \]

The graph never reaches the \(x\)-axis.

So there are no real zeros.

Absolute-Value Inequality Preview

The inequality

\[ |x|<3 \]

asks for points whose distance from zero is less than \(3\).

Therefore,

\[ \boxed{-3The inequality

\[ |x|\le3 \]

becomes

\[ \boxed{-3\le x\le3}. \]

Distance from a General Center

The inequality

\[ |x-h|means that \(x\) lies within distance \(r\) of \(h\).

Therefore,

\[ \boxed{ h-r

Example: Tolerance

A manufactured part should be within \(0.2\) millimeter of a target length of \(10\) millimeters.

The condition is

\[ |L-10|\le0.2. \]

Equivalent compound inequality:

\[ \boxed{ 9.8\le L\le10.2 }. \]

Piecewise Models from Thresholds

Many real-world piecewise models change rule at thresholds.

Examples include:

  • overtime pay after a certain number of hours;
  • shipping charges after a weight threshold;
  • parking rates after a time limit;
  • utility pricing tiers;
  • tax brackets;
  • discount schedules.

Overtime Pay Example

Suppose a worker earns \$20 per hour for the first \(40\) hours and \$30 per hour for additional hours.

Total weekly pay \(P(h)\) can be written

\[ P(h)= \begin{cases} 20h, & 0\le h\le40,\\ 800+30(h-40), & h>40. \end{cases} \]

The second branch begins from the accumulated regular pay

\[ 20(40)=800. \]

Why the Overtime Model Is Continuous

At

\[ h=40, \]

the first branch gives

\[ 20(40)=800. \]

The second branch begins from

\[ 800+30(0)=800. \]

The pieces meet at

\[ (40,800). \]

The pay rate changes, but total pay does not jump.

Marginal Rate Versus Total Amount

In tiered pricing or pay schedules, the slope of each piece represents the marginal rate within that interval.

The intercept of a later branch may not represent an actual starting charge at \(x=0\).

It is often an algebraic consequence of making the pieces meet correctly.

Constructing a Continuous Second Branch

Suppose the first branch is

\[ f(x)=2x+1 \]

for

\[ x<4, \]

and the second branch must have slope \(5\) and join continuously at \(x=4\).

First find the joining point:

\[ f(4)=2(4)+1=9. \]

The second branch should pass through

\[ (4,9) \]

with slope \(5\).

So

\[ y-9=5(x-4). \]

Complete the Continuous Model

From

\[ y-9=5(x-4), \]

we get

\[ y=5x-11. \]

Thus, a continuous piecewise function is

\[ \boxed{ f(x)= \begin{cases} 2x+1, & x<4,\\ 5x-11, & x\ge4. \end{cases} } \]

Constructing a Jump Intentionally

Some real systems genuinely include jumps.

For example, a fixed penalty may apply suddenly once a threshold is crossed.

A piecewise model can represent that discontinuity directly rather than forcing the pieces to meet.

Piecewise-Linear Interpolation Revisited

Suppose data are

\[ (0,2),\qquad(5,12),\qquad(10,17). \]

Between \(0\) and \(5\), the slope is

\[ 2. \]

Between \(5\) and \(10\), the slope is

\[ 1. \]

Connecting the data with straight segments produces a continuous piecewise-linear interpolation.

Piecewise-Linear Does Not Mean Globally Affine

A globally affine function has one constant slope across its domain.

A piecewise-linear function may use several slopes.

Each branch is affine locally, while the overall function may change rate at one or more breakpoints.

Breakpoints

A breakpoint is an input where the active piece changes.

At a breakpoint, the graph may:

  • continue smoothly in position;
  • form a corner;
  • jump;
  • contain a hole;
  • change from one constant rate to another.

Graphing a Piecewise-Linear Function Efficiently

For each branch:

  1. identify its domain interval;
  2. identify the affine rule;
  3. graph only the portion allowed by the condition;
  4. mark endpoints as open or closed;
  5. repeat for the remaining branches.

Graphing Absolute Value Efficiently

For

\[ y=a|x-h|+k, \]

a fast workflow is:

  1. plot the vertex \((h,k)\);
  2. use slope \(a\) on the right branch;
  3. use slope \(-a\) on the left branch;
  4. use symmetry about \(x=h\) as a check.

Example: Graph from Vertex and Slopes

Consider

\[ y=2|x+1|-3. \]

The vertex is

\[ \boxed{(-1,-3)}. \]

The right branch has slope

\[ 2. \]

The left branch has slope

\[ -2. \]

The axis of symmetry is

\[ \boxed{x=-1}. \]

Table for an Absolute-Value Function

For

\[ f(x)=|x-2|, \]

choose inputs around the vertex:

\(x\) \(f(x)\)
02
11
20
31
42

The symmetric outputs reveal the V-shape.

Recognizing Absolute Value from a Table

If outputs decrease at a constant rate toward one input, reach a minimum or maximum, and then change at the opposite rate, an absolute-value model may be appropriate.

For example:

\(x\) \(y\)
06
14
22
34
46

This pattern fits

\[ \boxed{y=2|x-2|+2}. \]

Recognizing Absolute Value from a Graph

Look for:

  • two straight branches;
  • a common vertex;
  • vertical symmetry;
  • equal slope magnitudes on the two sides.

If these features are absent, another piecewise-linear model may be more appropriate.

A Reliable Piecewise-Evaluation Workflow

  1. Locate the input in the piecewise conditions.
  2. Select the one rule that applies.
  3. Substitute into that rule only.
  4. Check boundary symbols carefully.

A Reliable Piecewise-Graphing Workflow

  1. Separate the branches.
  2. Graph each affine rule as if it were a full line.
  3. Keep only the domain portion allowed by the branch condition.
  4. Mark excluded boundaries with open endpoints.
  5. Mark included boundaries with closed endpoints.
  6. Check whether pieces meet, jump, or leave gaps.

A Reliable Absolute-Value Workflow

  1. Identify \(a\), \(h\), and \(k\) in \(y=a|x-h|+k\).
  2. Plot the vertex \((h,k)\).
  3. Use slopes \(-a\) and \(a\) on the left and right branches.
  4. Check symmetry about \(x=h\).
  5. Determine minimum or maximum behavior from the sign of \(a\).
  6. Find zeros or intercepts when needed.

A Reliable Piecewise-Modeling Workflow

  1. Identify where the rule changes.
  2. Define each input interval clearly.
  3. Build the affine rule for each interval.
  4. Determine whether the model should be continuous at each breakpoint.
  5. Use accumulated values when later pieces must join earlier ones.
  6. Check units and practical domain restrictions.

Common Errors

Ignoring the Piece Conditions

A formula applies only on the interval stated beside it.

Using the Wrong Branch at a Boundary

Symbols such as \(<\), \(\le\), \(>\), and \(\ge\) determine which piece owns the endpoint.

Using Two Closed Endpoints with Different Values at the Same Input

That would assign two outputs to one input and fail the function definition.

Assuming Piecewise-Linear Means One Constant Slope

Each piece is linear or affine, but slopes may change between pieces.

Confusing \(x+h\) with a Shift Right

In \(|x-h|\), the vertex is at \(x=h\). Thus \(|x+4|=|x-(-4)|\) has vertex at \(-4\).

Forgetting the Left-Branch Sign

For \(|x|\), the left branch is \(y=-x\), not \(y=x\).

Assuming Every V-Shaped Piecewise Graph Is an Absolute-Value Transformation

The two slope magnitudes must match for the form \(a|x-h|+k\).

Forgetting Accumulated Value in Tiered Models

Later branches often need to begin from what has already been accumulated at the threshold.

Practice

1. Evaluate a Piecewise Function

Let

\[ f(x)= \begin{cases} 2x+1, & x<3,\\ x-4, & x\ge3. \end{cases} \]

Find \(f(2)\).

Check Answer

Because

\[ 2<3, \]

use the first branch:

\[ f(2)=2(2)+1=5. \] \[ \boxed{f(2)=5}. \]

2. Evaluate at the Boundary

Using the same function, find \(f(3)\).

Check Answer

The condition \(x\ge3\) includes \(3\), so use the second branch:

\[ f(3)=3-4=-1. \] \[ \boxed{f(3)=-1}. \]

3. Continuous or Jump?

Determine whether

\[ f(x)= \begin{cases} x+2, & x<1,\\ 2x+1, & x\ge1 \end{cases} \]

is continuous at \(x=1\).

Check Answer

The first branch approaches

\[ 1+2=3. \]

The second branch gives

\[ 2(1)+1=3. \]

The pieces meet at the same value, so the function is

\[ \boxed{\text{continuous at }x=1}. \]

4. Identify a Jump

Determine whether

\[ f(x)= \begin{cases} x, & x<2,\\ x+4, & x\ge2 \end{cases} \]

is continuous at \(x=2\).

Check Answer

The left branch approaches

\[ 2. \]

The right branch gives

\[ 6. \]

They do not agree, so there is a

\[ \boxed{\text{jump discontinuity}}. \]

5. Absolute Value as Piecewise

Write

\[ |x-5| \]

as a piecewise function.

Check Answer \[ \boxed{ |x-5|= \begin{cases} -(x-5), & x<5,\\ x-5, & x\ge5. \end{cases} } \]

Equivalently,

\[ \boxed{ |x-5|= \begin{cases} -x+5, & x<5,\\ x-5, & x\ge5. \end{cases} } \]

6. Find the Vertex

Find the vertex of

\[ y=3|x+2|-7. \]
Check Answer \[ x+2=x-(-2). \]

So

\[ \boxed{(h,k)=(-2,-7)}. \]

7. Find the Branch Slopes

Find the left and right slopes of

\[ y=-4|x-1|+3. \]
Check Answer

Here

\[ a=-4. \]

The left slope is

\[ -a=4, \]

and the right slope is

\[ a=-4. \]

Thus,

\[ \boxed{m_{\text{left}}=4,\qquad m_{\text{right}}=-4}. \]

8. Solve an Absolute-Value Equation

Solve

\[ |x-2|=5. \]
Check Answer \[ x-2=5 \]

or

\[ x-2=-5. \]

So

\[ \boxed{x=7\text{ or }x=-3}. \]

9. Tolerance Inequality

Rewrite

\[ |x-10|\le0.5 \]

as a compound inequality.

Check Answer \[ \boxed{ 9.5\le x\le10.5 }. \]

10. Construct a Continuous Branch

Complete the piecewise function so it is continuous at \(x=2\):

\[ f(x)= \begin{cases} 3x+1, & x<2,\\ mx+b, & x\ge2, \end{cases} \]

where the second branch must have slope \(-1\).

Check Answer

The first branch reaches

\[ 3(2)+1=7. \]

The second branch must pass through

\[ (2,7) \]

with slope \(-1\):

\[ y-7=-(x-2). \]

So

\[ y=-x+9. \]

Thus,

\[ \boxed{m=-1,\qquad b=9}. \]

11. Overtime Pay

A worker earns \$18 per hour for the first \(40\) hours and \$27 per hour afterward. Write a continuous piecewise model for weekly pay \(P(h)\).

Check Answer

Regular pay at \(40\) hours is

\[ 18(40)=720. \]

Therefore,

\[ \boxed{ P(h)= \begin{cases} 18h, & 0\le h\le40,\\ 720+27(h-40), & h>40. \end{cases} } \]

12. Recognize an Absolute-Value Model

A continuous piecewise-linear graph has vertex \((4,2)\), left slope \(-3\), and right slope \(3\). Write its equation.

Check Answer

The equal opposite slopes give an absolute-value form with

\[ a=3, \qquad h=4, \qquad k=2. \]

Thus,

\[ \boxed{ y=3|x-4|+2 }. \]

Key Ideas

  • A piecewise function uses different formulas on different parts of its domain.
  • A piecewise-linear function uses linear or affine rules on its separate pieces.
  • Branch conditions are part of the function definition and determine which rule applies.
  • Open and closed endpoints record whether boundary inputs are excluded or included.
  • Piecewise-linear graphs may be continuous, contain corners, jump, or have holes.
  • A globally affine function has one constant slope; a piecewise-linear function may change slope at breakpoints.
  • The absolute-value function satisfies \(\displaystyle |x|=\begin{cases}-x,&x<0\\x,&x\ge0\end{cases}\).
  • The graph of \(y=|x|\) is V-shaped with vertex at the origin.
  • For \(y=a|x-h|+k\), the vertex is \((h,k)\).
  • The left and right branch slopes are \(-a\) and \(a\).
  • Absolute value measures distance, so \(|x-h|\) is the distance from \(x\) to \(h\).
  • Absolute-value graphs are symmetric about \(x=h\).
  • Tiered pricing, overtime pay, motion, tax schedules, and interpolation naturally produce piecewise-linear models.
  • Continuous tiered models must carry accumulated values across breakpoints.
  • Not every V-shaped piecewise-linear graph is a transformed absolute-value graph; its branch slopes must have equal magnitudes and opposite signs.

Where This Leads

Piecewise-linear functions extend affine thinking to relationships whose rules change across the domain. Absolute value shows how a simple geometric idea—distance—can be represented by two affine branches joined at a vertex. These structures preserve much of the simplicity of lines while allowing corners, thresholds, tiers, and changing rates.

From here, the section concludes with linear modeling, where the tools developed throughout Linear and Affine Relationships are combined to construct, interpret, test, and communicate useful models of real situations. Piecewise thinking will also reappear later in optimization, numerical methods, calculus, probability, and applied mathematics.