5. Functions & Modeling

Piecewise

Work with piecewise-defined functions, evaluate values, and interpret situations requiring different rules across domains.

Piecewise Functions

Hey students! šŸ‘‹ Ready to dive into one of the coolest types of functions in math? Today we're exploring piecewise functions - functions that literally change their rules depending on where you are! Think of them like a chameleon that adapts to different environments. By the end of this lesson, you'll understand what piecewise functions are, how to evaluate them, and why they're incredibly useful for modeling real-world situations that don't follow just one simple rule.

What Are Piecewise Functions? 🧩

A piecewise function is essentially a function that's made up of multiple "pieces" - each piece has its own rule or formula, and which piece you use depends on the input value. It's like having a toolbox where you pick different tools for different jobs!

Imagine you're at an amusement park, students, and the ticket prices work like this:

  • Kids under 12: $15
  • Teens 12-17: $25
  • Adults 18+: $35

This pricing system is a perfect example of a piecewise function! The price depends on which age group you fall into.

Mathematically, we write piecewise functions using this format:

$$f(x) = \begin{cases}

\text{formula 1} & \text{if condition 1} \\

\text{formula 2} & \text{if condition 2} \\

\text{formula 3} & \text{if condition 3}

$\end{cases}$$$

Let's look at a simple mathematical example:

$$f(x) = \begin{cases}

x + 2 & \text{if } x < 0 \\

x^2 & \text{if } x $\geq 0$

$\end{cases}$$$

This function has two pieces: when x is negative, we use the linear function $x + 2$, and when x is zero or positive, we use the quadratic function $x^2$.

Evaluating Piecewise Functions šŸŽÆ

The key to evaluating piecewise functions is determining which piece to use based on your input value. Here's your step-by-step process, students:

  1. Look at your input value
  2. Check which condition it satisfies
  3. Use the corresponding formula
  4. Calculate the result

Let's practice with our function from above:

$$f(x) = \begin{cases}

x + 2 & \text{if } x < 0 \\

x^2 & \text{if } x $\geq 0$

$\end{cases}$$$

Example 1: Find $f(-3)$

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

Example 2: Find $f(4)$

Since $4 \geq 0$, we use the second piece: $f(4) = 4^2 = 16$

Example 3: Find $f(0)$

Since $0 \geq 0$ (remember, the symbol ≄ includes zero!), we use the second piece: $f(0) = 0^2 = 0$

Notice how the same function gives completely different results depending on which piece we're using! This flexibility makes piecewise functions incredibly powerful.

Real-World Applications šŸŒ

Piecewise functions are everywhere in real life, students! They're used whenever different rules apply to different situations or ranges of values.

Tax Brackets: The U.S. tax system is a classic piecewise function. For 2023, a single filer's federal income tax works like this:

  • 10% on income up to $11,000
  • 12% on income from $11,001 to $44,725
  • 22% on income from $44,726 to $95,375
  • And so on...

Shipping Costs: Many online retailers use piecewise pricing:

  • Free shipping on orders over $50
  • $5.99 shipping on orders $25-$49.99
  • $8.99 shipping on orders under $25

Utility Bills: Your electricity bill often uses tiered pricing:

  • First 500 kWh: $0.12 per kWh
  • Next 500 kWh: $0.15 per kWh
  • Above 1000 kWh: $0.18 per kWh

Cell Phone Plans: Data usage charges are typically piecewise:

  • First 2GB: included in base plan
  • Next 3GB: $10 per GB
  • Unlimited after 5GB at reduced speed

Graphing Piecewise Functions šŸ“Š

When you graph a piecewise function, you're essentially drawing multiple function pieces on the same coordinate plane. Each piece only exists within its specified domain.

Let's graph our example function:

$$f(x) = \begin{cases}

x + 2 & \text{if } x < 0 \\

x^2 & \text{if } x $\geq 0$

$\end{cases}$$$

For $x < 0$: Draw the line $y = x + 2$, but only for negative x-values. Use an open circle at $(0, 2)$ because $x = 0$ isn't included in this piece.

For $x \geq 0$: Draw the parabola $y = x^2$, but only for non-negative x-values. Use a closed circle at $(0, 0)$ because $x = 0$ is included in this piece.

The result is a graph that looks like a line on the left side and a parabola on the right side, meeting at the y-axis!

Domain and Range Considerations šŸŽŖ

The domain of a piecewise function includes all x-values for which the function is defined. You need to consider all the pieces together!

For our example function, the domain is all real numbers because:

  • The first piece covers all $x < 0$
  • The second piece covers all $x \geq 0$
  • Together, they cover all real numbers

The range requires more careful analysis. You need to look at what y-values each piece can produce within its domain:

  • First piece: $y = x + 2$ for $x < 0$ produces $y < 2$
  • Second piece: $y = x^2$ for $x \geq 0$ produces $y \geq 0$
  • Combined range: $y \geq 0$ (since the parabola piece covers $[0, \infty)$ and the line piece covers $(-\infty, 2)$)

Working with Discontinuities šŸ”—

Piecewise functions can be continuous or discontinuous. A function is continuous if you can draw it without lifting your pencil. At the boundary points where pieces meet, you need to check if the function "jumps."

Consider this function:

$$g(x) = \begin{cases}

2x + 1 & \text{if } x $\leq 2$ \\

x + 3 & \text{if } x > 2

$\end{cases}$$$

At $x = 2$:

  • Left piece gives: $g(2) = 2(2) + 1 = 5$
  • Right piece would give: $2 + 3 = 5$

Since both pieces give the same value at $x = 2$, the function is continuous there!

But if we had:

$$h(x) = \begin{cases}

2x + 1 & \text{if } x < 2 \\

x + 4 & \text{if } x $\geq 2$

$\end{cases}$$$

At $x = 2$:

  • Left piece approaches: $2(2) + 1 = 5$
  • Right piece gives: $h(2) = 2 + 4 = 6$

There's a jump from 5 to 6, so this function is discontinuous at $x = 2$.

Conclusion

Piecewise functions are incredibly versatile mathematical tools that allow us to model complex real-world situations where different rules apply to different ranges of input values. You've learned how to evaluate these functions by identifying which piece to use based on the input value, and you've seen how they appear everywhere from tax systems to shipping costs. Remember that the key is always to first determine which condition your input satisfies, then apply the corresponding formula. Whether you're calculating your phone bill or analyzing a company's pricing structure, piecewise functions help us understand and work with systems that change their behavior based on different circumstances.

Study Notes

• Piecewise Function Definition: A function made up of multiple pieces, each with its own formula for different intervals of the domain

• Evaluation Process:

  1. Identify your input value
  2. Determine which condition it satisfies
  3. Use the corresponding formula
  4. Calculate the result

• Notation Format: $$f(x) = \begin{cases} \text{formula 1} & \text{if condition 1} \\ \text{formula 2} & \text{if condition 2} \end{cases}$$

• Domain: All x-values for which any piece of the function is defined

• Range: All possible y-values from all pieces combined within their respective domains

• Continuity: Function is continuous if there are no jumps at boundary points between pieces

• Discontinuity: Occurs when pieces don't connect smoothly at boundary points

• Graphing: Draw each piece only within its specified domain, use open/closed circles to show inclusion/exclusion of boundary points

• Real-World Examples: Tax brackets, shipping costs, utility bills, cell phone plans, parking fees

• Boundary Points: Special x-values where the function changes from one piece to another - check carefully which piece applies

Practice Quiz

5 questions to test your understanding