Piecewise Functions | Brilliant Math & Science Wiki (2024)

Sign up with Facebook or Sign up manually

Already have an account? Log in here.

Janae Pritchett contributed

Piecewise functions are functions that have multiple pieces, or sections. They are defined piece by piece, with various functions defining each interval. Piecewise Functions | Brilliant Math & Science Wiki (1)

Contents

  • Introduction
  • Evaluating Piecewise Functions
  • Graphing Piecewise Functions

Introduction

Piecewise functions can be split into as many pieces as necessary. Each piece behaves differently based on the input function for that interval. Pieces may be single points, lines, or curves. The piecewise function below has three pieces. The piece on the interval \(-4\leq x \leq -1\) represents the function \(f(x)=3x+5.\) The piece on the interval \(-1 \leq x < 3\) represents the function \(f(x)=2.\) The piece on the interval \(3 \leq x \leq 4\) represents the function \(f(x)=-x+2.\) Piecewise Functions | Brilliant Math & Science Wiki (2)

Using function notation, we represent the graph as:\[ f(x) = \begin{cases} 3x+5 & -4 \leq x \leq -1 \\ 2 & -1 \leq x < 3 \\ -x + 2 & 3 \leq x \leq 4 \end{cases}.\]

A certain cab company has a $2.00 base charge, and then charges $0.50 per minute. There is also a $7.00 minimum fee (so if the base charge and minutes combined don't add to $7, the rider is charged a flat amount of $7).

Which function describes riding a cab from the company for \(x\) minutes and spending \( f(x) \) dollars?

A.\[ f(x) = \begin{cases} 7 & 0 < x \leq 7 \\ 2 + 0.50x & x > 7 \end{cases}\]

B.\[ f(x) = \begin{cases} 7 & 0 < x \leq 10 \\ 2 + 0.50x & x > 10 \end{cases}\]

C.\[ f(x) = \begin{cases} 7 & 0 < x \leq 14 \\ 2 + 0.50x & x > 14 \end{cases}\]

Remember that \(x\) is the number of minutes, but the cutoff for the minimum fare is based on dollars. So we need to figure out how many minutes will reach $7. That would be when \( 2 + 0.50x = 7, \) so \( 0.50x = 5 \) or \( x= 10 .\) This means we want the piecewise function to be split starting at 10 minutes, when the minimum fare threshold is passed.

One of the most common piecewise functions is the absolute value function. How can we write \(f(x)=|x|\) as a piecewise function?

\(f(x)=|x|\) is the combination of two linear functions:\[ f(x) = \begin{cases} -x & x<0 \\ x & x\geq 0 \end{cases}.\]

Evaluating Piecewise Functions

When evaluating a piecewise function, we need to determine which piece of the function to use. Let's find \(f(-2)\) if \[ f(x) = \begin{cases} 3x+5 & -4 \leq x \leq -1 \\ 2 & -1 \leq x < 3 \\ -x + 2 & 3 \leq x \leq 4 \end{cases}.\]

\(f(-2)\) indicates that we want to determine the value of the function when \(x=-2.\) An \(x\)-value of \(-2\) falls into the first piece of the function, where \(f(x)=3x+5\) for \(-4 \leq x \leq -1.\) Therefore, \(f(-2)=3(-2)+5 = -1.\)

Find \(f(3)\) if

\[ f(x) = \begin{cases} 3x-2 & -5 \leq x < 2 \\ x^2+1 & 2 \leq x < 4 \\ -3x+1 & x\geq4 \end{cases}.\]

\(f\(3\) falls into the piece of the graph where \(f(x)=x^2+1\) for \(2\leq x < 4.\) Therefore, \(f(3)=3^2+1 = 10.\)

If piecewise function \(f\) given below is continuous, then what is the value of \(Q?\) (In the context of this problem, "continuous" means the endpoints of the graph portions meet at \(x=2\) so there is no "gap".)

\[ f(x) = \begin{cases} -3x+2 & x \leq 2 \\ x^2 - Q & x > 2 \end{cases}\]

At \( x = 2 ,\) the graph \( y = -3x + 2 \) is at the point \( (2, -4) .\)

When \( Q = 0 \) and \( x = 2 ,\) the graph \( y = x^2 - Q \) is at the point \( (2, 4) .\)

So we need to shift the parabola graph down by \( 4 + 4 = 8 \) so the points match. This indicates \( Q = 8 .\)

Graphing Piecewise Functions

To graph a piecewise function, we graph the different pieces for the different sub-intervals. Let's graph\[ f(x) = \begin{cases} 2x+1 & x \leq -1 \\ x^2 & -1 < x \leq 2 \\ 4 & x > 2 \end{cases}.\]

This piecewise graph has three pieces and two boundary points at \(x=-1\) and \(x=2.\) The first piece of our graph is the linear function\(f(x)=2x+1\) for \(x\leq -1.\) \(f(-1)=2(-1)+1 = -1\) so we'll have a filled in dot at \((-1,-1)\) with a slope of 2 traveling from the point toward negative infinity.

Next, we have the quadratic function \(f(x)=x^2\) for \(-1<x<2\) with boundary points of \(-1\) and \(2.\) \(f(-1)=(-1)^2=1\) so we'll have an open dot at \((-1,1)\) and \(f(2)=2^2=4\) so we'll have a closed dot at \((2,4)\).

The third piece is the horizontal linear function of \(f(x)=4\) from \(x=2\) to infinity.

Piecewise Functions | Brilliant Math & Science Wiki (3)

What is the correct graph of

\[ f(x) = \begin{cases} -2x+1 & x \leq 2 \\ \frac{1}{2}x-4 & x >2 \end{cases}?\] Piecewise Functions | Brilliant Math & Science Wiki (4)

Graph A has the correct functions but the wrong boundary point of \(x=0\) instead of \(x=2.\) Graph C has the correction functions and the correct boundary point, but the dot should be a closed dot because the first function includes the value \(x=2.\) Therefore, Graph B is correct.

Cite as: Piecewise Functions. Brilliant.org. Retrieved from https://brilliant.org/wiki/piecewise-functions/

Piecewise Functions | Brilliant Math & Science Wiki (2024)

FAQs

What is a piecewise function in math? ›

Piecewise Functions

In mathematics, a piecewise-defined function (also called a piecewise function or a hybrid function) is a function which is defined by multiple sub-functions, each sub-function applying to a certain interval of the main function's domain (a sub-domain).

What are piecewise functions used for in real life? ›

The Rate of income tax is definitely a piece wise function . The amount of tax you have to pay in a given year is a continuous, piecewise linear function of your income that year. A piecewise function is a function built from pieces of different functions over different intervals.

Why is a piecewise function good? ›

A Piecewise Function is a mathematical concept where different rules apply to different parts of the domain. Each part has its own equation or function. This approach is particularly helpful in solving complex mathematical problems by breaking them into smaller, manageable parts.

What are the conditions for a piecewise function? ›

A piecewise-defined function is continuous on a given interval in its domain if the following conditions are met: its sub-functions are continuous on the corresponding intervals (subdomains), there is no discontinuity at an endpoint of any subdomain within that interval.

How do I solve a piecewise function? ›

To find the equation of a piecewise function, you need to follow these steps:
  1. Identify the intervals on which the function is defined. ...
  2. For each interval, find the equation that describes the function on that interval. ...
  3. Combine the equations for each interval into a single piecewise function.

What is the difference between a piecewise function and a step function? ›

Since piecewise functions satisfy this definition, it is important to remember that a piecewise function is ONE function, not a collection of functions. A step function is a piecewise function where each piece is a constant function. The graph of a step function will usually resemble a staircase.

What is the most common piecewise function? ›

The most common piecewise function is the absolute value function.

What is not a piecewise function? ›

If a function has only one piece, e.g. a parabola or a line, etc., then it is not a piecewise function.

What is the essence of the piecewise function? ›

A piecewise function transforms every element of the domain to only one element of the co-domain as if it was a function described with a single rule.

What are the learning objectives of piecewise function? ›

Learning Objectives

After this lesson, students will be able to: Define piecewise functions. Identify various types of piecewise functions. Calculate and graph piecewise functions.

What I have learned about piecewise function? ›

A piecewise function is a function that consists of multiple subfunctions, with each subfunction defined over an interval of the main function's domain, called a subdomain. The union of the subdomains is the domain of the piecewise function.

What is a real life application of piecewise function? ›

One of the most common uses of piecewise functions comes from business and economics in the form of tax brackets. In the United States, taxes are paid to the U.S. government by citizens 18 years of age and older. Taxes pay for government programs like Medicare, public education, infrastructure, and much more.

What is the limit of a piecewise function? ›

In order to find limits of piecewise function, we have to take one sided limits separately, as a piecewise function has different formulas or functions in different intervals. In this example, one sided (right hand limit) limit exists, because the value of right hand limit and the functional value is equal.

Can piecewise functions be odd? ›

Piecewise functions can also be odd, even or neither. The accompanying MathinSite applet allows the user to generate piecewise odd and even functions.

How do you tell if a piecewise graph is a function? ›

Mentor: Look at one of the graphs you have a question about. Then take a vertical line and place it on the graph. If the graph is a function, then no matter where on the graph you place the vertical line, the graph should only cross the vertical line once.

How to determine if a piecewise function is even or odd? ›

f(x) is an EVEN function if and only if f(x) = f(-x) for all x in the domain of x. f(x) is an ODD function if and only if f(x) = -f(-x) for all x in the domain of x. else, f(x) is neither ODD nor EVEN. Here f(-x) = (-x)3 + 1 = - x3 + 1.

How to find the domain of a piecewise function? ›

To find the domain of a piecewise function, first look at the domains of each function independently. Then check to see if any undefined areas are inside the restraints of the piecewise function. Then check for any other undefined areas. If no undefined areas are there, then the domain is all real x-values.

Top Articles
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 6009

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.