Solved Exercises on Piecewise and Absolute Value Modeling

Master piecewise and absolute value functions: domain restrictions, absolute value equations, and real-world applications through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic Piecewise Function
Exercise 1
Evaluate the piecewise function f(x) = { 2x + 1 if x < 0, x² if x ≥ 0 } at x = -2, x = 0, and x = 3.
Definition:

Piecewise Function: A function defined by different expressions over different intervals of the domain.

Domain Restrictions: Each piece of the function applies only to its specified domain.

Piecewise Evaluation Method:
  1. Identify which domain condition applies to the given x-value
  2. Select the appropriate function piece
  3. Substitute the x-value into the selected expression
  4. Calculate the result
Function definition
f(x) = {2x+1 if x<0, x² if x≥0}
Evaluations
f(-2)=-3, f(0)=0, f(3)=9
Step 1: Evaluate f(-2)

Since -2 < 0, use the first piece: f(x) = 2x + 1

f(-2) = 2(-2) + 1 = -4 + 1 = -3

Step 2: Evaluate f(0)

Since 0 ≥ 0, use the second piece: f(x) = x²

f(0) = (0)² = 0

Step 3: Evaluate f(3)

Since 3 ≥ 0, use the second piece: f(x) = x²

f(3) = (3)² = 9

Step 4: Check boundary conditions

At x = 0: Left piece would give 2(0) + 1 = 1

At x = 0: Right piece gives (0)² = 0

Since the condition is x ≥ 0, f(0) = 0 (from the right piece)

Step 5: Verify continuity at boundary

lim(x→0⁻) f(x) = lim(x→0⁻) (2x + 1) = 1

lim(x→0⁺) f(x) = lim(x→0⁺) (x²) = 0

Since left and right limits are different, function is discontinuous at x = 0

f(-2) = -3, f(0) = 0, f(3) = 9
Final answer:

f(-2) = -3, f(0) = 0, f(3) = 9.

Applied rules:

• Domain Check: Always verify which condition applies to x-value

• Boundary Conditions: Pay attention to ≤ vs < in definitions

• Function Continuity: Discontinuous when left and right limits differ

2 Absolute Value Function
Exercise 2
Solve the absolute value equation |x - 3| = 5 and graph the solution on a number line.
Definition:

Absolute Value: The distance of a number from zero on the number line, always non-negative.

Absolute Value Equation: An equation of the form |A| = B where B ≥ 0 has solutions A = B or A = -B.

Equation
|x - 3| = 5
Cases
x-3 = 5 or x-3 = -5
Solutions
x = 8 or x = -2
Step 1: Apply the absolute value property

If |A| = B where B > 0, then A = B or A = -B

So |x - 3| = 5 means: x - 3 = 5 or x - 3 = -5

Step 2: Solve Case 1

x - 3 = 5

x = 5 + 3 = 8

Step 3: Solve Case 2

x - 3 = -5

x = -5 + 3 = -2

Step 4: Verify both solutions

Check x = 8: |8 - 3| = |5| = 5 ✓

Check x = -2: |-2 - 3| = |-5| = 5 ✓

Step 5: Graph the solutions

Mark points x = -2 and x = 8 on the number line

These are the points that are exactly 5 units away from x = 3

x = -2 and x = 8
Final answer:

The solutions to |x - 3| = 5 are x = -2 and x = 8.

Applied rules:

• Absolute Value Property: |x| = a → x = a or x = -a (when a > 0)

• Geometric Interpretation: |x - a| = b means x is b units from a

• Verification: Always check solutions in original equation

3 Real-World Application
Exercise 3
A parking garage charges $3 for the first hour and $2 for each additional hour or fraction thereof. Write a piecewise function for the cost C(h) where h is the number of hours parked.
Definition:

Step Function: A piecewise function where each piece is a constant value over an interval.

Real-World Constraints: Practical limitations that affect the domain and range of a function.

Domain consideration
h ≥ 0 (hours cannot be negative)
Cost function
C(h) = {3 if 0<h≤1, 3+2(h-1) if h>1}
Simplified
C(h) = {3 if 0<h≤1, 2h+1 if h>1}
Step 1: Identify the rate structure

First hour: $3

Each additional hour: $2 (or fraction thereof)

Step 2: Determine the domain

h > 0 (you can't park for negative hours)

h = 0 is not applicable (no charge for zero time)

Step 3: Define the first piece

If 0 < h ≤ 1, you pay for exactly one hour

C(h) = $3

Step 4: Define the second piece

If h > 1, you pay $3 for first hour + $2 for each additional hour

Additional hours: (h - 1)

Cost: 3 + 2(h - 1) = 3 + 2h - 2 = 2h + 1

Step 5: Write the complete function

C(h) = { 3 if 0 < h ≤ 1, 2h + 1 if h > 1 }

Step 6: Verify with examples

For h = 0.5: C(0.5) = 3 (0 < 0.5 ≤ 1) ✓

For h = 1: C(1) = 3 (0 < 1 ≤ 1) ✓

For h = 2: C(2) = 2(2) + 1 = 5 ✓

For h = 3.5: C(3.5) = 2(3.5) + 1 = 8 ✓

C(h) = { 3 if 0 < h ≤ 1, 2h + 1 if h > 1 }
Final answer:

The piecewise function for parking cost is C(h) = { 3 if 0 < h ≤ 1, 2h + 1 if h > 1 }.

Applied rules:

• Real-World Modeling: Consider practical constraints and conditions

• Step Functions: Common in pricing structures with tiered rates

• Domain Restrictions: Always consider realistic domain limitations

Piecewise and Absolute Value: Rules and Methods
f(x) = \begin{cases} g(x) & \text{if } x \in D_1 \\ h(x) & \text{if } x \in D_2 \end{cases}
General Piecewise Form
Absolute Value
|x| = x if x≥0, -x if x<0
Distance from zero
Piecewise
Different rules for different intervals
Conditional function definition
Domain Restrictions
x ∈ [a,b], x > c, etc.
Specify where each piece applies
Piecewise Functions: Use different expressions based on the input value. Always check which condition applies.
Absolute Value: Always non-negative. Represents distance from zero on number line.
Real-World Applications: Step functions, pricing models, tax brackets, shipping costs.
Solution: Exercises 4 to 5
4 Absolute Value Inequality
Exercise 4
Solve the absolute value inequality |2x - 5| < 3 and express the solution in interval notation.
Definition:

Absolute Value Inequality: An inequality involving absolute value expressions.

Compound Inequality: An inequality that combines two conditions with "and" or "or".

Inequality
|2x - 5| < 3
Equivalent form
-3 < 2x - 5 < 3
Solution
1 < x < 4
Step 1: Apply the absolute value inequality property

For |A| < B (where B > 0), the solution is -B < A < B

So |2x - 5| < 3 becomes -3 < 2x - 5 < 3

Step 2: Add 5 to all parts

-3 + 5 < 2x - 5 + 5 < 3 + 5

2 < 2x < 8

Step 3: Divide all parts by 2

2/2 < 2x/2 < 8/2

1 < x < 4

Step 4: Express in interval notation

Solution: x ∈ (1, 4)

This means x is between 1 and 4, excluding endpoints

Step 5: Verify with test values

Test x = 2: |2(2) - 5| = |4 - 5| = |-1| = 1 < 3 ✓

Test x = 0 (outside interval): |2(0) - 5| = 5 > 3 ✓

Test x = 5 (outside interval): |2(5) - 5| = 5 > 3 ✓

x ∈ (1, 4) or 1 < x < 4
Final answer:

The solution to |2x - 5| < 3 is (1, 4) in interval notation.

Applied rules:

• Absolute Value Inequality: |x| < a → -a < x < a (when a > 0)

• Compound Inequality: Operations applied to all parts

• Interval Notation: Parentheses for strict inequalities

5 Complex Piecewise Function
Exercise 5
Graph the piecewise function f(x) = { -x + 2 if x ≤ -1, x² if -1 < x < 2, 4 if x ≥ 2 } and identify its domain and range.
Definition:

Multi-Piece Function: A function defined by three or more different expressions over different intervals.

Domain: The set of all possible input values.

Range: The set of all possible output values.

Function definition
f(x) = {-x+2 if x≤-1, x² if -1<x<2, 4 if x≥2}
Domain
(-∞, ∞)
Range
[0, ∞)
Step 1: Analyze each piece separately

For x ≤ -1: f(x) = -x + 2 (linear function)

For -1 < x < 2: f(x) = x² (quadratic function)

For x ≥ 2: f(x) = 4 (constant function)

Step 2: Evaluate key points for each piece

At x = -1: f(-1) = -(-1) + 2 = 3 (from first piece)

At x = -1: f(-1) = (-1)² = 1 (from second piece, but x = -1 not in (-1,2))

At x = 2: f(2) = (2)² = 4 (from second piece, but x = 2 not in (-1,2))

At x = 2: f(2) = 4 (from third piece)

Step 3: Determine behavior at boundaries

At x = -1: Use first piece (x ≤ -1 includes x = -1)

So f(-1) = 3, point (-1, 3) is included

At x = 2: Use third piece (x ≥ 2 includes x = 2)

So f(2) = 4, point (2, 4) is included

Step 4: Analyze each interval

For x ≤ -1: f(x) = -x + 2, decreasing line passing through (-1, 3)

For -1 < x < 2: f(x) = x², parabola opening upward

For x ≥ 2: f(x) = 4, horizontal line

Step 5: Determine domain and range

Domain: All real numbers covered by the pieces: (-∞, ∞)

Range: Combine ranges from each piece:

  • First piece: x ≤ -1 → -x + 2 ≥ 3, so range [3, ∞)
  • Second piece: -1 < x < 2 → 0 ≤ x² < 4, so range [0, 4)
  • Third piece: x ≥ 2 → constant value 4

Combined range: [0, ∞)

Domain: (-∞, ∞), Range: [0, ∞)
Final answer:

The domain is all real numbers (-∞, ∞) and the range is [0, ∞).

Applied rules:

• Piecewise Boundaries: Check which condition includes the boundary point

• Domain Union: Combine all intervals where function is defined

• Range Union: Combine all possible output values from all pieces

Complete Guide to Piecewise and Absolute Value Functions
|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}
Absolute Value Definition
Key definitions:

Piecewise Function: A function defined by different expressions over different intervals of its domain.

Absolute Value: The distance of a number from zero on the number line, denoted |x|.

Domain: The set of all possible input values for which the function is defined.

Range: The set of all possible output values the function can produce.

Complete evaluation methodology:
  1. Identify the piecewise definition: Note all intervals and corresponding expressions
  2. Determine which piece applies: Check which condition contains the input value
  3. Substitute into the correct expression: Use the appropriate function piece
  4. Evaluate: Calculate the result
  5. Verify: Check that the input falls within the correct domain
Tip 1: Always check boundary conditions carefully. Pay attention to ≤ vs <.
Tip 2: For absolute value equations, consider both positive and negative cases.
Tip 3: Graph each piece separately and then combine for complete picture.
Tip 4: Remember |x| is always non-negative, even when x itself is negative.
Common errors: Misidentifying which piece to use, forgetting to consider domain restrictions, not checking boundary conditions.
Exam preparation: Practice with various piecewise definitions, master absolute value properties, work with real-world applications.
Essential Rules:

• Absolute Value Property: |x| = a → x = a or x = -a (when a > 0)

• Absolute Value Inequality: |x| < a → -a < x < a; |x| > a → x < -a or x > a

• Piecewise Evaluation: Always check which domain condition applies

• Domain Restrictions: Each piece applies only to its specified interval

Exercise with Visualization: Function Model Comparison
Exercise 6: Comparing Function Types
Visualize the differences between function types:
\(f_1(x) = |x|\) (Absolute value)
\(f_2(x) = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}\) (Piecewise)
\(f_3(x) = x^2\) (Quadratic)

Analysis: The chart shows how different function types exhibit different behaviors.

  • Absolute value function: V-shaped with sharp corner at origin
  • Piecewise function: Defined differently over intervals
  • Quadratic function: Smooth parabolic curve
  • Each model is appropriate for different real-world situations

Questions & Answers

Question: How do I know which piece of a piecewise function to use when evaluating? I always get confused at the boundary points.

Answer: Look carefully at the domain conditions for each piece:

The key is to examine the inequality signs:

  • Less than or equal (≤): The boundary point is included in that piece
  • Greater than or equal (≥): The boundary point is included in that piece
  • Strict inequality (< or >): The boundary point is NOT included in that piece

Example: For f(x) = { x² if x ≤ 2, 3x - 1 if x > 2 }

  • At x = 2: Use x² (because x ≤ 2 includes x = 2)
  • At x = 2: f(2) = 2² = 4
  • At x = 2.1: Use 3x - 1 (because x > 2)

Always check which condition the specific x-value satisfies first.

Question: Why does |x| = -x when x is negative? That seems counterintuitive.

Answer: Remember that absolute value represents distance from zero, which is always non-negative:

Example with x = -5:

  • Since x = -5 is negative, we use the second case: |x| = -x
  • |(-5)| = -(-5) = 5
  • This gives the positive distance of 5 units from zero

The minus sign in "-x" doesn't make the result negative:

  • When x is positive: |x| = x (already positive)
  • When x is negative: |x| = -x (double negative makes positive)
  • When x = 0: |x| = 0

The absolute value is always non-negative, regardless of the sign of x.

Question: What's the difference between |x| < a and |x| > a? How do I solve them?

Answer: The solutions have opposite structures:

For |x| < a (where a > 0):

  • Solution: -a < x < a
  • Geometrically: x is within a units of zero
  • Example: |x| < 3 → -3 < x < 3

For |x| > a (where a > 0):

  • Solution: x < -a OR x > a
  • Geometrically: x is more than a units away from zero
  • Example: |x| > 3 → x < -3 OR x > 3

Remember: "Less than" gives a bounded interval, "Greater than" gives unbounded intervals in both directions.

Question: How do I find the domain and range of a piecewise function?

Answer: For piecewise functions, analyze each piece separately:

Finding Domain:

  1. Identify the domain of each piece
  2. Combine all the intervals where the function is defined
  3. Domain = union of all piece domains

Finding Range:

  1. Find the range of each piece individually
  2. Combine all possible output values
  3. Range = union of all piece ranges

Example: For f(x) = {x² if x ≤ 1, 2x if x > 1}

  • Domain: (-∞, 1] ∪ (1, ∞) = (-∞, ∞)
  • Range of first piece (x² for x ≤ 1): [0, ∞)
  • Range of second piece (2x for x > 1): (2, ∞)
  • Combined range: [0, ∞) ∪ (2, ∞) = [0, ∞)

Question: Where do piecewise and absolute value functions appear in real life?

Answer: These functions model many real-world situations:

Piecewise Functions:

  • Tax brackets: Different rates for different income levels
  • Shipping costs: Different rates for different weight categories
  • Utility billing: Tiered pricing based on usage
  • Phone plans: Fixed cost up to a limit, then per-minute charges

Absolute Value Functions:

  • Error measurement: Deviation from expected value (always positive)
  • Distance calculations: Distance from a reference point
  • Deviation from target: Quality control in manufacturing
  • Stock price changes: Magnitude of change regardless of direction

Both function types are essential for modeling real-world phenomena with different behaviors under different conditions.