• + ACCUPLACER Mathematics
  • + ACT Mathematics
  • + AFOQT Mathematics
  • + ALEKS Tests
  • + ASVAB Mathematics
  • + ATI TEAS Math Tests
  • + Common Core Math
  • + DAT Math Tests
  • + FSA Tests
  • + FTCE Math
  • + GED Mathematics
  • + Georgia Milestones Assessment
  • + GRE Quantitative Reasoning
  • + HiSET Math Exam
  • + HSPT Math
  • + ISEE Mathematics
  • + PARCC Tests
  • + Praxis Math
  • + PSAT Math Tests
  • + PSSA Tests
  • + SAT Math Tests
  • + SBAC Tests
  • + SIFT Math
  • + SSAT Math Tests
  • + STAAR Tests
  • + TABE Tests
  • + TASC Math
  • + TSI Mathematics
  • + ACT Math Worksheets
  • + Accuplacer Math Worksheets
  • + AFOQT Math Worksheets
  • + ALEKS Math Worksheets
  • + ASVAB Math Worksheets
  • + ATI TEAS 6 Math Worksheets
  • + FTCE General Math Worksheets
  • + GED Math Worksheets
  • + 3rd Grade Mathematics Worksheets
  • + 4th Grade Mathematics Worksheets
  • + 5th Grade Mathematics Worksheets
  • + 6th Grade Math Worksheets
  • + 7th Grade Mathematics Worksheets
  • + 8th Grade Mathematics Worksheets
  • + 9th Grade Math Worksheets
  • + HiSET Math Worksheets
  • + HSPT Math Worksheets
  • + ISEE Middle-Level Math Worksheets
  • + PERT Math Worksheets
  • + Praxis Math Worksheets
  • + PSAT Math Worksheets
  • + SAT Math Worksheets
  • + SIFT Math Worksheets
  • + SSAT Middle Level Math Worksheets
  • + 7th Grade STAAR Math Worksheets
  • + 8th Grade STAAR Math Worksheets
  • + THEA Math Worksheets
  • + TABE Math Worksheets
  • + TASC Math Worksheets
  • + TSI Math Worksheets
  • + AFOQT Math Course
  • + ALEKS Math Course
  • + ASVAB Math Course
  • + ATI TEAS 6 Math Course
  • + CHSPE Math Course
  • + FTCE General Knowledge Course
  • + GED Math Course
  • + HiSET Math Course
  • + HSPT Math Course
  • + ISEE Upper Level Math Course
  • + SHSAT Math Course
  • + SSAT Upper-Level Math Course
  • + PERT Math Course
  • + Praxis Core Math Course
  • + SIFT Math Course
  • + 8th Grade STAAR Math Course
  • + TABE Math Course
  • + TASC Math Course
  • + TSI Math Course
  • + Number Properties Puzzles
  • + Algebra Puzzles
  • + Geometry Puzzles
  • + Intelligent Math Puzzles
  • + Ratio, Proportion & Percentages Puzzles
  • + Other Math Puzzles

How to Solve Piecewise Functions?

A piecewise function is a function that has several curves in its graph. In this post blog, you learn more about the piecewise function.

How to Solve Piecewise Functions?

The Piecewise function has different definitions depending on the amount of input, i.e., a piecewise function behaves differently for different inputs.

A step-by-step guide to piecewise functions

A  piecewise function  is a function \(f(x)\) which has different definitions in different intervals of \(x\). The graph of a piecewise function has different parts that correspond to each of its definitions. The absolute value function is a very good example of a piecewise function.  Let us see why is it called so. We know that an absolute value function \(f(x)=| x |\) and is defined as follows: \(\begin{cases}x, \  if\ x≥0\ \\ -x, \  if\ x<0\end{cases}\), We need to read this piecewise function as:

  • \(f(x)\) is equal to \(x\) when \(x\) is greater than or equal to \(0\) and
  • \(f(x)\) is equal to \(-x\) when \(x\) is lesser than \(0\)

Then the diagram \(f(x)\) has two pieces, one corresponding to \(x\) (when \(x\) is in the interval \([0, ∞)\)) and the other corresponding to \(-x\) (when \(x\) is in the interval \((-∞, 0)\)).

Piecewise function graph

The diagram of a piecewise function has several pieces, where each piece corresponds to its definition in an interval. Here are the steps to graph a piecewise function.

  • Step 1:  First, understand what each definition of a function represents. For example, \(f(x)= ax + b\) represents a linear function (which gives a line), \(f(x)= ax^2+ bx+c\) represents a quadratic function (which gives a parabola), and so on. So that we will have an idea of what shape the piece of the function would result in.
  • Step 2:  Write the intervals shown in the function definition along with their definitions.
  • Step 3:  Create a two-column table labeled \(x\) and \(y\) corresponding to each interval. Insert the endpoints of the interval without fail. If the endpoint is removed from the interval, note that we get an open dot corresponding to that point in the graph.
  • Step 4:  In each table, get more numbers (random numbers) in the \(x\) column that lies in the corresponding interval to get the perfect shape of the graph. If the piece is a straight line, \(2\) values are enough for \(x\). If the piece is not a straight line, take \(3\) or more for \(x\).
  • Step 5: Substitute each \(x\) value from each table into the function definition to obtain the corresponding \(y\) values.
  • Step 6: Now, just draw all the points from the table (taking care of the open dots) in a graph sheet and connect them by curves.

Domain and range of piecewise function

To find the domain of a piecewise function, we can only look at the definition of the given function. Take the union of all intervals with \(x\) and that will give us the domain.

To find the range of a piecewise function, the easiest way is to plot it and look at the \(y\)-axis. See what \(y\)-values are covered by the graph.

Evaluating piecewise function

To evaluate a piecewise function at any given input,

  • First, see which of the given intervals (or inequalities) the given input belongs.
  • Then just replace the given input in the function definition corresponding to that particular interval.

Piecewise continuous function

A piecewise continuous function, as its name implies, is a continuous function, which means, its graph has different pieces in it but still we will be able to draw the graph without lifting the pencil.

Exercises for Piecewise Functions

Graph the piecewise function..

  • \(\color{blue}{\begin{cases}-2^x, x<−2 \\ −|x|, −2≤x≤0\\2-x^2, x>0\end{cases}}\)
  • \(\color{blue}{\begin{cases}x+1, x<0 \\ −x+1, 0≤x≤2\\x-1, x>2\end{cases}}\)
  • \(\color{blue}{\begin{cases}-2^x, x<−2 \\ −|x|, −2≤x≤0\\ 2-x^2, x>0\end{cases}}\)

by: Effortless Math Team about 2 years ago (category: Articles )

Effortless Math Team

Related to this article, more math articles.

  • Full-Length CLEP College Mathematics Practice Test
  • 6th Grade Math Worksheets: FREE & Printable
  • 8th Grade MEA Math Worksheets: FREE & Printable
  • How to Find the Domain and Range of Quadratic Functions
  • Top 10 ISEE Upper-Level Math Practice Questions
  • FREE 5th Grade ACT Aspire Math Practice Test
  • How to Graph Quadratic Functions?
  • How to Compare Rational Numbers
  • The Law of Sines
  • Using Number Lines to Add Two Negative Integers

What people say about "How to Solve Piecewise Functions? - Effortless Math: We Help Students Learn to LOVE Mathematics"?

No one replied yet.

Leave a Reply Cancel reply

You must be logged in to post a comment.

10 Full Length PSSA Grade 7 Math Practice Tests The Practice You Need to Ace the PSSA Grade 7 Math Test

Ged math workbook comprehensive math practices and solutions the ultimate test prep book with two full-length practice tests, calculus for beginners the ultimate step by step guide to acing calculus, statistics for beginners the ultimate step by step guide to acing statistics, ged math test prep in 30 days complete study guide and test tutor for ged mathematics. the ultimate book for beginners and pros + two practice tests, 10 full length gre math practice tests the practice you need to ace the gre math test, basic mathematics for beginners the ultimate step by step guide and a comprehensive basic math refresher, gre math for beginners the ultimate step by step guide to preparing for the gre math test, a comprehensive math workbook for grade 2, ged math made easy study guide to ace your test with key points, examples, and practices, the ultimate high school math bundle from algebra i to pre-calculus, the ultimate middle school math bundle grades 6-8, the ultimate elementary school math bundle grade 3-5, ap pre-calculus for beginners the ultimate step by step guide to acing ap precalculus, grade 7 pre-algebra the ultimate step by step guide to acing 7th grade math.

  • ATI TEAS 6 Math
  • ISEE Upper Level Math
  • SSAT Upper-Level Math
  • Praxis Core Math
  • 8th Grade STAAR Math

Limited time only!

Save Over 45 %

It was $89.99 now it is $49.99

Login and use all of our services.

Effortless Math services are waiting for you. login faster!

Register Fast!

Password will be generated automatically and sent to your email.

After registration you can change your password if you want.

  • Math Worksheets
  • Math Courses
  • Math Topics
  • Math Puzzles
  • Math eBooks
  • GED Math Books
  • HiSET Math Books
  • ACT Math Books
  • ISEE Math Books
  • ACCUPLACER Books
  • Premium Membership
  • Youtube Videos
  • Google Play
  • Apple Store

Effortless Math provides unofficial test prep products for a variety of tests and exams. All trademarks are property of their respective trademark owners.

  • Bulk Orders
  • Refund Policy

Math Made Easy

Piecewise Functions

Introduction to piecewise functions.

Piecewise functions (or piece-wise functions ) are just what they are named: pieces of different functions (sub-functions) all on one graph. The easiest way to think of them is if you drew more than one function on a graph, and you just erased parts of the functions where they aren’t supposed to be (along the $ x$’s). Thus, the $ y$’s are defined differently, depending on the intervals where the $ x$’s are.

Note that there is an example of a piecewise function’s inverse here in the Inverses of Functions section .

Here’s an example and graph:

What this means is for every $ x$ less than or equal to –2 , we need to graph the line $ 2x+8$, as if it were the only function on the graph. For every $ x$ value greater than –2 , we need to graph $ {{x}^{2}}$, as if it were the only function on the graph. Then we have to “get rid of” the parts that we don’t need.  Remember that we still use the origin as the reference point for both graphs!

See how the vertical line $ x=-2$ acts as a “boundary” line between the two graphs?

Note that the point $ (–2,4)$ has a closed circle on it. Technically, it should only belong to the $ 2x+8$ function, since that function has the less than or equal sign , but since the point is also on the $ {{x}^{2}}$ graph, we can just use a closed circle as if it appears on both functions. See, not so bad, right?

Evaluating Piecewise Functions

Sometimes, you’ll be given piecewise functions and asked to evaluate them; in other words, find the $ y$   values when you are given an $ x$ value. Let’s do this for $ x=-6$ and $ x=4$   (without using the graph).  Here is the function again:

$ \displaystyle f\left( x \right)=\left\{ \begin{align}2x+8\,\,\,\,\,&\text{ if }x\le -2\\{{x}^{2}}\,\,\,\,\,\,\,\text{ }\,&\text{ if }x>-2\end{align} \right.$

We first want to look at the conditions at the right first , to see where our $ x$   is. When $ x=-6$ , we know that it’s less than –2 , so we plug in our $ x$ to $ 2x+8$ only. $ f(x)$ or $ y$ is $ (2)(-6)+8=-4$. We don’t even care about the $ \boldsymbol{{x}^{2}}$!  It’s that easy. You can also see that we did this correctly by using the graph above.

Now try $ x=4$ . We look at the right first, and see that our $ x$ is greater than –2 , so we plug it in the $ {{x}^{2}}$.  (We can just ignore the $ 2x+8$ this time.) $ f(x)$ or $ y$ is $ {{4}^{2}}=16$.

Graphing Piecewise Functions

You’ll probably be asked to graph piecewise functions. Sometimes the graphs will contain functions that are non-continuous or discontinuous , meaning that you have to pick up your pencil in the middle of the graph when you are drawing it (like a jump!).  Continuous functions means that you never have to pick up your pencil if you were to draw them from left to right.

And remember that the graphs are true functions only if they pass the Vertical Line Test .

Let’s draw these piecewise functions and determine if they are continuous or non-continuous . Note how we draw each function as if it were the only one, and then “erase” the parts that aren’t needed. We’ll also get the Domain and Range like we did here in the Algebraic Functions section .

We can actually put piecewise functions in the graphing calculator:

How to Tell if Piecewise Function is Continuous or Non-Continuous

To tell if a piecewise graph is continuous or non-continuous , you can look at the boundary points and see if the $ y$ point is the same at each of them. (If the $ y$’s were different, there’d be a “jump” in the graph!)

Try this for the functions we used above:

Obtaining Equations from Piecewise Function Graphs

You may be asked to write a piecewise function, given a graph. Now that we know what piecewise functions are all about, it’s not that bad! To review how to obtain equations from linear graphs, see Obtaining the Equations of a Line, and from quadratics, see Finding a Quadratic Equation from Points or a Graph.

Here are the graphs, with explanations on how to derive their piecewise equations:

Absolute Value as a Piecewise Function

You may be asked to write an absolute value function as a piecewise function. You might want to review Solving Absolute Value Equations and Inequalities before continuing on to this topic.

Let’s say we have the function  $ f\left( x \right)=\left| x \right|$ . From what we learned earlier, we know that when $ x$ is positive, since we’re taking the absolute value, it will still just be $ x$. But when $ x$ is negative, when we take the absolute value, we have to take the opposite (negate it), since the absolute value has to be positive. Make sense? So, for example, if we had $ |5|$, we just take what’s inside the absolute sign, since it’s positive. But for $ |–5|$, we have to take the opposite (negative) of what’s inside the absolute value to make it $ \displaystyle 5\,\,(–5=5)$.

This means we can write this absolute value function as a piecewise function. Notice that we can get the “turning point” or “boundary point” by setting whatever is inside the absolute value to 0 . Then we’ll either use the original function, or negate the function, depending on the sign of the function (without the absolute value) in that interval.

For example, we can write $ \displaystyle \left| x \right|=\left\{ \begin{array}{l}x\,\,\,\,\,\,\,\,\,\text{if }x\ge 0\\-x\,\,\,\,\,\text{if }x<0\end{array} \right.$. Also note that, if the function is continuous (there is no “jump”) at the boundary point, it doesn’t matter where we put the  “less than or equal to” (or “greater than or equal to” ) signs, as long as we don’t repeat them! We can’t repeat them because, theoretically, we can’t have two values of $ y$ for the same $ x$, or we wouldn’t have a function.

Here are more examples, with explanations. You can also check these in the graphing calculator using $ {{Y}_{1}}=$ and MATH NUM 1 ( abs ). (You might want to review Quadratic Inequalities for the second example below):

You may also be asked to take an absolute value graph and write it as a piecewise function :

Transformations of Piecewise Functions

Let’s do a transformation of a piecewise function. We learned how about Parent Functions and their Transformations here in the Parent Graphs and Transformations section . You’ll probably want to read this section first, before trying a piecewise transformation. Let’s transform the following piecewise function flipped around the $ x$- axis , vertically stretched by a factor of 2 units, 1 unit to the right , and 3 units up .

So, let’s draw $ -2f\left( x-1 \right)+3$ , where:

$ \displaystyle f\left( x \right)=\left\{ \begin{align}x+4\,\,\,\,\,\,\,\,&\text{ if }x<1\\2\,\,\,\,\,\,\,\,&\text{ if 1 }\le x<4\\x-5\,\,\,\,\,\,\,\,&\text{ if }x\ge 4\end{align} \right.$

Make sure to use the “boundary” points when we fill in the t-chart for the transformation. Remember that the transformations inside the parentheses are done to the $ x$ (doing the opposite math), and outside are done to the $ y$. To come up with a t-chart , as shown in the table below, we can use key points, including two points on each of the “boundary lines”.

Note that because this transformation is complicated, we can come up with a new piecewise function by transforming the three “pieces” and also transforming the “$ x$”s where the boundary points are (adding 1 , or going to the right 1 ), since we do the opposite math for the “$ x$”s. To get the new functions in each interval, we can just substitute “$ x-1$” for “$ x$” in the original equation, multiply by –2 , and then add 3 . For example, for the first part of the piecewise function, $ \displaystyle -2f\left( {x-1} \right)+3=-2\left[ {\left( {x-1} \right)+4} \right]+3=-2\left( {x+3} \right)+3=-2x-3$. So we have:

$ \displaystyle -2f\left( {x-1} \right)+3=\left\{ \begin{array}{l}-2\left( {\left( {x-1} \right)+4} \right)+3=-2x-3,\,\,\,\,\text{ }\,\,\text{ if }x-1<1\,\,\,\,\left( {x<2} \right)\\-2\left( 2 \right)+3=-1,\,\,\,\,\text{ }\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{ if }\,\text{ 2 }\le x<5\\-2\left( {\left( {x-1} \right)-5} \right)+3=-2x+15,\,\,\,\,\,\,\text{ if }x\ge 5\end{array} \right.$

Here are the “before” and “after” graphs, including the t-chart:

$ \displaystyle -2f\left( {x-1} \right)+3=\left\{ \begin{array}{l}-2x-3\,\,\,\,\,\,\,\,\,\text{if }x<2\\-1\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if 2}\le x<5\\-2x+15\,\,\,\,\,\,\text{if }x\ge 5\end{array} \right.$

Piecewise Function Word Problems

Your favorite dog groomer charges according to your dog’s weight. If your dog is 15 pounds and under, the groomer charges $35 . If your dog is between 15 and 40 pounds, she charges $40 . If your dog is over 40 pounds, she charges $40 , plus an additional $2 for each pound.

(a)  Write a piecewise function that describes what your dog groomer charges.  (b) Graph the function.  (c) What would the groomer charge if your dog weighs 60 pounds?

(a)  We see that the “boundary points” are 15 and 40 , since these are the weights where prices change. Since we have two boundary points, we’ll have three equations in our piecewise function. We have to start at 0 , since dogs have to weigh over 0 pounds:  $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }……\,\,\,\,\,\,\,\,\,\text{if }0<x\le 15\\\text{ }……\,\,\,\,\,\,\,\,\,\text{if }15<x\le 40\\\text{ }……\,\,\,\,\,\,\,\,\,\text{if }x>40\end{array} \right.$

We are looking for the “answers” (how much the grooming costs) to the “questions” (how much the dog weighs) for the three ranges of prices. The first two are just flat fees ( $35 and $40 , respectively). The last equation is a little trickier; the groomer charges $40 plus $2 for each pound over 40 . Let’s try real numbers: if your dog weighs 60 pounds, she will charge $40 plus $2 times $ 20\,\,(60–40)$. We’ll turn this into an equation: $ 40+2(x–40)$, which simplifies to $ 2x–40$ (see how 2 is the slope?).

The whole piecewise function is:  $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }35\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }0<x\le 15\\\text{ }40\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }15<x\le 40\\\text{ }40+2\left( {x-40} \right)\,\,\,\,\,\,\text{if }x>40\end{array} \right.$             or        $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }35\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }0<x\le 15\\\text{ }40\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }15<x\le 40\\\text{ }2x-40\,\,\,\,\,\,\,\text{if }x>40\end{array} \right.$

(c)  If your dog weighs 60 pounds, we can either use the graph, or the function to see that you would have to pay $80 .

You plan to sell t-shirts as a fundraiser. The wholesale t-shirt company charges you $10 a shirt for the first 75 shirts. After the first 75 shirts you purchase up to 150 shirts, the company will lower its price to $7.50 per shirt. After you purchase 150 shirts, the price will decrease to $5 per shirt. Write a function that models this situation.

We see that the “boundary points” are 75 and 150 , since these are the number of t-shirts bought where prices change. Since we have two boundary points, we’ll have three equations in our piecewise function. We’ll start with $ x\ge 1$, since, we assume at least one shirt is bought. Note in this problem, the number of t-shirts bought ($ x$), or the domain , must be a integer , but this restriction shouldn’t affect the outcome of the problem.

$ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }……\text{ if }1\le x\le 75\\\text{ }……\text{ if }75<x\le 150\\\text{ }……\text{ if }x>150\end{array} \right.$

We are looking for the “answers” (total cost of t-shirts) to the “questions” (how many are bought) for the three ranges of prices.

For up to and including 75 shirts, the price is $10 , so the total price would $ 10x$. For more than 75 shirts but up to 100 shirts, the cost is $7.50 , but the first 75 t-shirts will still cost $10 per shirt. The second function includes the $750 spent on the first 75 shirts ( 75 times $10 ), and also includes $7.50 times the number of shirts over 75 , which would be $ (x-75)$. For example, if you bought 80 shirts, you’d have to spend $ \$10\times 75=\$750$, plus $ \$7.50\times 5\,$  (80 – 75)  for the shirts after the 75 th shirt.

Similarly, for over 150 shirts, we would still pay the $10 price up through 75 shirts, the $7.50 price for 76 to 150 shirts ( 75 more shirts), and then $5 per shirt for the number of shirts bought over 150 . We’ll pay $ 10(75)+7.50(75)+5(x-150)$ for $ x$ shirts. Put in numbers and try it!

The whole piecewise function is:  $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }10x\text{ }\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }1\le x\le 75\\\text{ 10}\left( {75} \right)+7.5\left( {x-75} \right)\text{ }\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{ if 7}5<x\le 150\\\text{ 10}\left( {75} \right)+7.5\left( {75} \right)+5\left( {x-150} \right)\text{ }\,\text{if }x>150\end{array} \right.$          or           $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }10x\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }1\le x\le 75\\\text{ }7.5x\text{ }+\text{ }187.5\,\,\,\,\,\text{if 7}5<x\le 150\\\text{ }5x+562.5\,\,\,\,\,\,\,\,\,\,\,\text{if }x>150\end{array} \right.$

A bus service costs $50 for the first 400 miles, and each additional 300 miles (or a fraction thereof) adds $10 to the fare.  Use a piecewise function to represent the bus fare in terms of the distance in miles.

This is actually a tricky problem, but let’s first think first about the “boundary point”, which is 400 . It’s pretty straightforward when the ride is less than 400 miles; the cost is $50 .

For greater than 400 miles, we have to subtract out the first 400 miles (but remember to include the first $50 ), divide the number of miles left by 300 miles (and round up, if there’s a fractional amount), and multiply that by $10 .

The tricky part is when we “round up” for a portion of the next 300 miles. We can use a “ceiling” function (designated by $ \left\lceil {} \right\rceil $); this function gives the least integer that is greater than or equal to its input; for example, the ceiling of both 3.5 and 4  is 4 .

Thus, this is what we have:  $ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}\text{ }50\text{ }\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text{if }0\le x\le 400\\\text{ }50+\left( {10\times \left\lceil {\frac{{x-400}}{{300}}} \right\rceil } \right)\text{ }\,\,\,\,\,\text{ if }x>400\end{array} \right.$

Let’s try it! If we have a 1500 -mile ride, the cost would be $ \displaystyle 50+\left( {10\times \left\lceil {\frac{{1500-400}}{{300}}} \right\rceil } \right)\text{ }=50+\left( {10\times 4} \right)=\$90$.

What value of $ \boldsymbol{a}$ would make this piecewise function continuous ?

$ \displaystyle f\left( x \right)=\left\{ \begin{array}{l}3{{x}^{2}}+4\,\,\,\,\,\text{ if }x<-2\\5x+\boldsymbol{a}\,\,\,\,\,\,\,\,\text{if }x\ge -2\end{array} \right.$

For the piecewise function to be continuous, at the boundary point (where the function changes), the two $ y$ values must be the same. We can plug in –2 for $ x$ in both of the functions and make sure the $ y$’s are the same:  $ \begin{align}3{{x}^{2}}+4&=5x+a\\3{{\left( {-2} \right)}^{2}}+4&=5\left( {-2} \right)+a\\12+4&=-10+a\\a&=26\end{align}$

If $ a=26$, the piecewise function is continuous!

Learn these rules, and practice, practice, practice!

More Practice : Use the Mathway widget below to try write a Piecewise Function . Click on Submit (the blue arrow to the right of the problem) and click on Write the Absolute Value as Piecewise  to see the answer .

You can also type in your own problem, or click on the three dots in the upper right hand corner and click on “Examples” to drill down by topic.

If you click on Tap to view steps , or Click Here , you can register at Mathway for a free trial , and then upgrade to a paid subscription at any time (to get any type of math problem solved!).

On to   Matrices and Solving Systems with Matrices  – you are ready!

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons
  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

5.1: Piecewise-Defined Functions

  • Last updated
  • Save as PDF
  • Page ID 92144

  • David Arnold
  • College of the Redwoods

Piecewise Constant Functions

Piecewise functions are a favorite of engineers. Let’s look at an example.

Example \(\PageIndex{2}\)

Suppose that a battery provides no voltage to a circuit when a switch is open. Then, starting at time \(t = 0\), the switch is closed and the battery provides a constant 5 volts from that time forward. Create a piecewise function modeling the problem constraints and sketch its graph.

This is a fairly simple exercise, but we will have to introduce some new notation. First of all, if the time t is less than zero (\(t < 0\)), then the voltage is 0 volts. If the time t is greater than or equal to zero (\(t \geq 0\)), then the voltage is a constant 5 volts. Here is the notation we will use to summarize this description of the voltage.

\[V(t)=\left\{\begin{array}{ll}{0,} & {\text { if } t<0} \\ {5,} & {\text { if } t \geq 0}\end{array}\right. \nonumber \]

Some comments are in order:

  • The voltage difference provide by the battery in the circuit is a function of time. Thus, V (t) represents the voltage at time t.
  • The notation used in (4) is universally adopted by mathematicians in situations where the function changes definition depending on the value of the independent variable. This definition of the function V is called a “piecewise definition.” Because each of the pieces in this definition is constant, the function V is called a piecewise constant function.
  • This particular function has two pieces. The function is the constant function \(V (t) = 0\), when \(t < 0\), but a different constant function, \(V (t) = 5\), when \(t \geq 0\).

If \(t<0, V(t)=0 .\) For example, for \(t=-1, t=-10,\) and \(t=-100\)

\[V(-1)=0, \quad V(-10)=0, \quad \text { and } \quad V(-100)=0 \nonumber \]

On the other hand, if \(t \geq 0,\) then \(V(t)=5 .\) For example, for \(t=0, t=10,\) and \(t=100\)

\[V(0)=5, \quad V(10)=5, \quad \text { and } \quad V(100)=5 \nonumber \]

Before we present the graph of the piecewise constant function V , let’s pause for a moment to make sure we understand some standard geometrical terms.

Geometrical Terms

  • A line stretches indefinitely in two directions, as shown in Figure \(\PageIndex{2}\)(a).
  • If a line has a fixed endpoint and stretches indefinitely in only one direction, as shown in Figure \(\PageIndex{2}\)(b), then it is called a ray.
  • If a portion of the line is fixed at each end, as shown in Figure \(\PageIndex{2}\)(c), then it is called a line segment.

WeChat053b43e5dcb3793a3d116da26c7c53a4.png

With these terms in hand, let’s turn our attention to the graph of the voltage defined by equation (4). When \(t < 0\), then \(V (t) = 0\). Normally, the graph of \(V (t) = 0\) would be a horizontal line where each point on the line has V -value equal to zero. However, \(V (t) = 0\) only if \(t < 0\), so the graph is the horizontal ray that starts at the origin, then moves indefinitely to the left, as shown in Figure \(\PageIndex{3}\). That is, the horizontal line \(V = 0\) has been restricted to the domain \(\{t : t<0\}\) and exists only to the left of the origin.

Similarly, when \(t \geq 0\), then \(V (t) = 5\) is the horizontal ray shown in Figure \(\PageIndex{3}\). Each point on the ray has a V -value equal to 5.

WeChate6034f902870ae8e8f1d5db9833f698f.png

Two comments are in order:

  • Because \(V (t) = 0\) only when t < 0, the point (0, 0) is unfilled (it is an open circle). The open circle at (0, 0) is a mathematician’s way of saying that this particular point is not plotted or shaded.
  • Because \(V (t) = 5\) when \(t \geq 0\), the point (0, 5) is filled (it is a filled circle). The filled circle at (0, 5) is a mathematician’s way of saying that this particular point is plotted or shaded.

Let’s look at another example.

Example \(\PageIndex{3}\)

Consider the piecewise-defined function

\[f(x)=\left\{\begin{array}{ll}{0,} & {\text { if } x<0} \\ {1,} & {\text { if } 0 \leq x<2} \\ {2,} & {\text { if } x \geq 2}\end{array}\right. \nonumber \]

Evaluate f(x) at x = −1, 0, 1, 2, and 3. Sketch the graph of the piecewise function f.

Because each piece of the function in (6) is constant, evaluation of the function is pretty easy. You just have to select the correct piece.

• Note that x = −1 is less than 0, so we use the first piece and write f(−1) = 0.

• Note that x = 0 satisfies \(0 \leq x<2\), so we use the second piece and write f(0) = 1.

• Note that x = 1 satisfies \(0 \leq x<2\), so we use the second piece and write f(1) = 1.

• Note that x = 2 satisfies \(x \geq 2\), so we use the third piece and write f(2) = 2.

• Finally, note that x = 3 satisfies \(x \geq 2\), so we use the third piece and write f(3) = 2. The graph is just as simple to sketch.

• Because f(x) = 0 for x < 0, the graph of this piece is a horizontal ray with endpoint at x = 0. Each point on this ray will have a y-value equal to zero and the ray will lie entirely to the left of x = 0, as shown in Figure \(\PageIndex{4}\).

• Because f(x) = 1 for \(0 \leq x<2\), the graph of this piece is a horizontal segment with one endpoint at x = 0 and the other at x = 2. Each point on this segment will have a y-value equal to 1, as shown in Figure \(\PageIndex{4}\).

• Because f(x) = 2 for \(x \geq 2\), the graph of this piece is a horizontal ray with endpoint at x = 2. Each point on this ray has a y-value equal to 2 and the ray lies entirely to the right of x = 2, as shown in Figure \(\PageIndex{4}\).

Several remarks are in order:

• The function is zero to the left of the origin (for x < 0), but not at the origin. This is indicated by an empty circle at the origin, an indication that we are not plotting that particular point.

• For \(0 \leq x<2\), the function equals 1. That is, the function is constantly equal to 1 for all values of x between 0 and 2, including zero but not including 2. This is why you see a filled circle at (0, 1) and an empty circle at (2, 1).

• Finally, for \(x \geq 2\), the function equals 2. That is, the function is constantly equal to 2 whenever x is greater than or equal to 2. That is why you see a filled circle at (2, 2).

WeChat62f351aebbc4b4bed0d99cb760775185.png

Piecewise-Defined Functions

Now, let’s look at a more generic situation involving piecewise-defined functions—one where the pieces are not necessarily constant. The best way to learn is by doing, so let’s start with an example.

Example \(\PageIndex{4}\)

\[f(x)=\left\{\begin{array}{ll}{-x+2,} & {\text { if } x<2} \\ {x-2,} & {\text { if } x \geq 2}\end{array}\right. \nonumber \]

Evaluate f(x) for x = 0, 1, 2, 3 and 4, then sketch the graph of the piecewise-defined function.

The function changes definition at x = 2. If x < 2, then f(x) = −x + 2. Because both 0 and 1 are strictly less than 2, we evaluate the function with this first piece of the definition.

\[\begin{array}{ll}{f(x)=-x+2} &\text{and} & {f(x)=-x+2} \\ {f(0)=-0+2} & &{f(1)=-1+2} \\ {f(0)=2} & &{f(1)=1}\end{array} \nonumber \]

On the other hand, if \(x \geq 2\), then \(f(x) = x − 2\). Because 2, 3, and 4 are all greater than or equal to 2, we evaluate the function with this second piece of the definition.

\[\begin{array}{lll}{f(x)=x-2}&{\text { and }} & {f(x)=x-2} & {\text { and }} & {f(x)=x-2} \\ {f(2)=2-2} &{\text { and }}& {f(3)=3-2} &{\text { and }}& {f(4)=4-2} \\ {f(2)=0} &{\text { and }}& {f(3)=1} & {\text { and }}&{f(4)=2}\end{array} \nonumber \]

One possible approach to the graph of f is to place the points we’ve already calculated, plus a couple extra, in a table (see Figure \(\PageIndex{5}\)(a)), plot them (see Figure \(\PageIndex{5}\)(b)), then intuit the shape of the graph from the evidence provided by the plotted points. This is done in Figure \(\PageIndex{5}\)(c).

WeChatc57f42a1f4b3b6d98545f1c5ef5a7603.png

However pragmatic, this point-plotting approach is a bit tedious; but, more importantly, it does not provide the background necessary for the discussion of the absolute value function in the next section. We need to stretch our understanding to a higher level. Fortunately, all the groundwork is in place. We need only apply what we already know about the equations of lines to fit this piecewise situation.

Alternative approach. Let’s use our knowledge of the equation of a line (i.e. y = mx + b) to help sketch the graph of the piecewise function defined in (8).

Let’s sketch the first piece of the function f defined in (8). We have f(x) = −x+ 2, provided x < 2. Normally, this would be a line (with slope −1 and intercept 2), but we are to sketch only a part of that line, the part where x < 2 (x is to the left of 2). Thus, this piece of the graph will be a ray, starting at the point where x = 2, then moving indefinitely to the left.

The easiest way to sketch a ray is to first calculate and plot its fixed endpoint (in this case at x = 2), then plot a second point on the ray having x-value less than 2, then use a ruler to draw the ray.

With this thought in mind, to find the coordinates of the endpoint of the ray, substitute x = 2 in f(x) = −x + 2 to get f(2) = 0. Now, technically, we’re not supposed to use this piece of the function unless x is strictly less than 2, but we could use it with x = 1.9, or x = 1.99, or x = 1.999, etc. So let’s go ahead and use x = 2 in this piece of the function, but indicate that we’re not actually supposed to use this point by drawing an “empty circle” at (2, 0), as shown in Figure \(\PageIndex{6}\)(a).

To complete the plot of the ray, we need a second point that lies to the left of its endpoint at (2, 0). Note that x = 0 is to the left of x = 2. Evaluate f(x) = −x + 2 at x = 0 to obtain f(0) = −0 + 2 = 2. This gives us the second point (0, 2), which we plot as shown in Figure \(\PageIndex{6}\)(a). Finally, draw the ray with endpoint at (2, 0) and second point at (0, 2), as shown in Figure \(\PageIndex{6}\)(a).

WeChat5e3bc88a37b4c996283ea0cdc449ed96.png

We now repeat this process for the second piece of the function defined in (8). The equation of the second piece is f(x) = x − 2, provided \(x \geq 2\). Normally, f(x) = x − 2 would be a line (with slope 1 and intercept −2), but we’re only supposed to sketch that part of the line that lies to the right of or at x = 2. Thus, the graph of this second piece is a ray, starting at the point with x = 2 and continuing to the right. If we evaluate f(x) = x − 2 at x = 2, then f(2) = 2 − 2 = 0. Thus, the fixed endpoint of the ray is at the point (2, 0). Since we’re actually supposed to use this piece with x = 2, we indicate this fact with a filled circle at (2, 0), as shown in Figure \(\PageIndex{6}\)(b).

We need a second point to the right of this fixed endpoint, so we evaluate f(x) = x−2 at x = 4 to get f(4) = 4 − 2 = 2. Thus, a second point on the ray is the point (4, 2). Finally, we simply draw the ray, starting at the endpoint (2, 0) and passing through the second point at (4, 2), as shown in Figure \(\PageIndex{6}\)(b).

To complete the graph of the piecewise function f defined in equation (8), simply combine the two pieces in Figure \(\PageIndex{6}\)(a) and Figure \(\PageIndex{6}\)(b) to get the finished graph in Figure \(\PageIndex{7}\). Note that the graph in Figure \(\PageIndex{7}\) is identical to the earlier result in Figure \(\PageIndex{5}\)(c).

Let’s try this alternative procedure in another example.

Example \(\PageIndex{5}\)

A source provides voltage to a circuit according to the piecewise definition

\[V(t)=\left\{\begin{array}{ll}{0,} & {\text { if } t<0} \\ {t,} & {\text { if } t \geq 0}\end{array}\right. \nonumber \]

Sketch the graph of the voltage V versus time t.

For all time t that is less than zero, the voltage V is zero. The graph of V (t) = 0 is a constant function, so its graph is normally a horizontal line. However, we must restrict

WeChat959e293961832f0d060193007d5ffbc1.png

the graph to the domain \((-\infty, 0)\), so this piece of equation (10) will be a horizontal ray, starting at the origin and moving indefinitely to the left, as shown in Figure \(\PageIndex{8}\)(a). On the other hand, V (t) = t for all values of t that are greater than or equal to zero. Normally, this would be a line with slope 1 and intercept zero. However, we must restrict the domain to \([0, \infty)\), so this piece of equation (10) will be a ray, starting at the origin and moving indefinitely to the right.

  • The endpoint of this ray starts at t = 0. Because V (t) = t, V (0) = 0. Hence, the endpoint of this ray is at the point (0, 0).
  • Choose any value of t that is greater than zero. We’ll choose t = 5. Because V (t) = t, V (5) = 5. This gives us a second point on the ray at (5, 5), as shown in Figure \(\PageIndex{8}\)(b).

WeChat0616892fdc276221bf959907e616851c.png

Finally, to provide a complete graph of the voltage function defined by equation (10), we combine the graphs of each piece of the definition shown in Figures \(\PageIndex{8}\)(a) and (b).

The result is shown in Figure \(\PageIndex{9}\). Engineers refer to this type of input function as a “ramp function.”

WeChatd83346bccee2ef0da4284cdc8a82cefc.png

Let’s look at a very practical application of piecewise functions.

Example \(\PageIndex{6}\)

The federal income tax rates for a single filer in the year 2005 are given in Table \(\PageIndex{1}\).

Create a piecewise definition that provides the tax rate as a function of personal income.

In reporting taxable income, amounts are rounded to the nearest dollar on the federal income tax form. Technically, the domain is discrete. You can report a taxable income of $35,000 or $35,001, but numbers between these two incomes are not used on the federal income tax form. However, we will think of the income as a continuum, allowing the income to be any real number greater than or equal to zero. If we did not do this, then our graph would be a series of dots–one for each dollar amount. We would have to plot lots of dots!

We will let R represent the tax rate and I represent the income. The goal is to define R as a function of I.

  • If income I is any amount greater than or equal to zero, and less than or equal to $7,150, the tax rate R is 10% (i.e., R = 0.10). Thus, if \(\$ 0 \leq I \leq \$ 7,150\), R(I) = 0.10.
  • If income I is any amount that is strictly greater than $7,150 but less than or equal to $29,050, then the tax rate R is 15% (i.e., R = 0.15). Thus, if $7, 150 < I ≤ $29, 050, then R(I) = 0.15.

Continuing in this manner, we can construct a piecewise definition of rate R as a function of taxable income I.

\[R(I)=\left\{\begin{array}{ll}{0.10,} & {\text { if } \$ 0 \leq I \leq \$ 7,150} \\ {0.15,} & {\text { if } \$ 7,150<I \leq \$ 29,050} \\ {0.25,} & {\text { if } \$ 29,050<I \leq \$ 70,350} \\ {0.28,} & {\text { if } \$ 70,350<I \leq \$ 146,750} \\ {0.33,} & {\text { if } \$ 146,750<I \leq \$ 319,100} \\ {0.35,} & {\text { if } I>\$ 319,100}\end{array}\right. \nonumber \]

Let’s turn our attention to the graph of this piecewise-defined function. All of the pieces are constant functions, so each piece will be a horizontal line at a level indicating the tax rate. However, each of the first five pieces of the function defined in equation (12) are segments, because the rate is defined on an interval with a starting and ending income. The sixth and last piece is a ray, as it has a starting endpoint, but the rate remains constant for all incomes above $319,100. We use this knowledge to construct the graph shown in Figure \(\PageIndex{10}\).

The first rate is 10% and this is assigned to taxable income starting at $0 and ending at $7,150, inclusive. Thus, note the first horizontal line segment in Figure \(\PageIndex{10}\) that runs from $0 to $7,150 at a height of R = 0.10. Note that each of the endpoints are filled circles.

The second rate is 15% and this is assigned to taxable incomes greater than $7,150, but less than or equal to $29,050. The second horizontal line segment in Figure 10 runs from $7,150 to $29,050 at a height of R = 0.15. Note that the endpoint at the left end of this horizontal segment is an open circle while the endpoint on the right end is a filled circle because the taxable incomes range on $7, 150 < I ≤ $29, 050. Thus, we exclude the left endpoint and include the right endpoint.

The remaining segments are drawn in a similar manner.

The last piece assigns a rate of R = 0.35 to all taxable incomes strictly above $319,100. Hence, the last piece is a horizontal ray, starting at ($319 100, 0.35) and extending indefinitely to the right. Note that the left endpoint of this ray is an open circle because the rate R = 0.35 applies to taxable incomes I > $319, 100.

Let’s talk a moment about the domain and range of the function R defined by equation (12). The graph of R is depicted in Figure \(\PageIndex{10}\). If we project all points on the graph onto the horizontal axis, the entire axis will “lie in shadow.” Thus, at first

WeChat5e28bc4a121de18d18210fcbaac866b0.png

glance, one would state that the domain of R is the set of all real numbers that are greater than or equal to zero.

However, remember that we chose to model a discrete situation with a continuum. Taxable income is always rounded to the nearest dollar on federal income tax forms. Therefore, the domain is actually all whole numbers greater than or equal to zero. In symbols,

\[\text { Domain }=\{I \in \mathbb{W} : I \geq 0\} \nonumber \]

To find the range of R, we would project all points on the graph of R in Figure \(\PageIndex{10}\) onto the vertical axis. The result would be that six points would be shaded on the vertical axis, one each at 0.10, 0.15, 0.25, 0.28, 0.33, and 0.35. Thus, the range is a finite discrete set, so it’s best described by simply listing its members.

\[\text { Range }=\{0.10,0.15,0.25,0.28,0.33,0.35\} \nonumber \]

Piecewise Functions

A function can be in pieces.

We can create functions that behave differently based on the input (x) value.

Example: Imagine a function

  • when x is less than 2, it gives x 2 ,
  • when x is exactly 2 it gives 6
  • when x is more than 2 and less than or equal to 6 it gives the line 10−x

It looks like this:

(a solid dot means "including", an open dot means "not including")

And we write it like this:

The Domain (all the values that can go into the function) is all Real Numbers up to and including 6, which we can write like this:

  • using Interval Notation :   Dom(f) = (-∞, 6]

And here are some example values:

Example: Here is another piecewise function:

What is h(−1)?

x is ≤ 1, so we use h(x) = 2, so h(−1) = 2

What is h(1)?

x is ≤ 1, so we use h(x) = 2, so h(1) = 2

What is h(4)?

x is > 1, so we use h(x) = x, so h(4) = 4

Piecewise functions let us make functions that do anything we want!

Example: A Doctor's fee is based on the length of time.

  • Up to 6 minutes costs $50
  • Over 6 and up to 15 minutes costs $80
  • Over 15 minutes costs $80 plus $5 per minute above 15 minutes

Which we can write like this:

You visit for 12 minutes, what is the fee? $80

You visit for 20 minutes, what is the fee? $80+$5(20-15) = $105

The Absolute Value Function

The Absolute Value Function is a famous Piecewise Function.

It has two pieces:

  • below zero: -x
  • from 0 onwards: x

The Floor Function

The Floor Function is a very special piecewise function. It has an infinite number of pieces:

Piecewise Function

A piecewise function is a function with multiple pieces of curves in its graph. It means it has different definitions depending upon the value of the input. i.e., a piecewise function behaves differently for different inputs.

Let us learn more about piecewise function along with how to graph it, how to evaluate it, and how to find its domain and range.

What is Piecewise Function?

A piecewise function is a function f(x) which has different definitions in different intervals of x. The graph of a piecewise function has different pieces corresponding to each of its definitions. The absolute value function is a very good example of a piecewise function. Let us see why is it called so. We know that an absolute value function is f(x) = |x| and it is defined as: \(f(x)=\left\{\begin{array}{ll} x, & \text { if } x \geq 0 \\ -x, & \text { if } x < 0 \end{array}\right.\). We should read this piecewise function as

  • f(x) is equal to x when x is greater than or equal to 0 and
  • f(x) is equal to -x when x is lesser than 0

Then the graph of absolute value function of f(x) has two pieces one corresponds to x (when x is in the interval [0, ∞) ) and the other piece corresponds to -x (when x is in the interval (-∞, 0)). Its graph looks as follows:

piecewise function

Piecewise Function Graph

We already know that the graph of a piecewise function has multiple pieces where each piece corresponds to its definition over an interval. Here are the steps to graph a piecewise function.

  • First, understand what each definition of the function represents. For example, f(x) = ax + b represents a linear function (which gives a line), f(x) = ax 2 + bx + c represents a quadratic function (which gives a parabola ), etc, so that we will have an idea of what shape the piece of the function would result in.
  • Write the intervals that are shown in the definition of the function along with their definitions.
  • Make a table with two columns labeled x and y corresponding to each interval. Include the endpoints of the interval without fail. If the endpoint is excluded from the interval then note that we get an open dot corresponding to that point in the graph.
  • In each table, take more numbers (random numbers) in the column of x that lie in the corresponding interval to get the perfect shape of the graph. If the piece is a straight line , then 2 values for x are sufficient. Take 3 or more numbers for x if the piece is NOT a straight line.
  • Substitute each x value from every table in the corresponding definition of the function to get the respective y values.
  • Now, just plot all the points from the table (taking care of the open dots) in a graph sheet and join them by curves.

Here is an example to understand these steps.

Example: Graph the piecewise defined function \(f(x)=\left\{\begin{array}{ll} -2^{x}, & x<-2 \\ -|x|, & -2 \leq x \leq 0 \\ 2-x^{2}, & x>0 \end{array}\right.\).

f(x) has 3 definitions:

  • -2 x when x is less than -2 and this is an exponential function .
  • -|x| when -2 is less than or equal to x less than or equal to 0 and this is an absolute value function .
  • 2-x 2 when x is greater than 0 and this is a quadratic function.

Let us write the intervals and their corresponding definitions. Also, let us frame tables that include the endpoints of the intervals and also several other random numbers from each interval. We will calculate the value of y in each case using the corresponding definition.

piecewise function table

Now, let us plot all these points on the graph keeping in mind the general shapes of the respective functions. Note that we have to put open dots at (-2, -0.25) (first table) and (0, 2) (last table) as their corresponding x-coordinates are excluded from the interval. Also, extend the graph in the respective intervals beyond the points shown in the tables where required.

piecewise function graph

Note that the left most (light orange colored) curve is extended to the left side as it corresponds to the interval x < -2. Also, the right-most (blue-colored) curve is extended in the interval x > 0. The middle (dark orange colored) curve is NOT extended on either side as it belongs to the interval -2 ≤ x ≤ 0.

Domain and Range of Piecewise Function

To find the domain of a piecewise function, we can just look at the given function's definition. Take the union of all intervals with x and that will give us the domain. In the above example, the domain of f(x) is, {x | x < -2} U {x | -2 ≤ x ≤ 0} U {x | x > 0}. The union of all these sets is just the set of all real numbers . So the domain of f(x) (in the above example) is R.

To find the range of a piecewise function, the easiest way is to graph it and look at the y-axis. See what y-values are covered by the graph. In the above example, all y-values less than 2 (exclude 2 as there is an open dot at (0, 2)) are covered by the graph. So its range is {y | y < 2} (or) (-∞, 2).

Similarly, we can find the domain and range of any piecewise function just by graphing it.

Evaluating Piecewise Function

To evaluate a piecewise function at any given input,

  • first, see which of the given intervals (or inequalities ) the given input belongs to.
  • Then just substitute the given input in the function definition corresponding to that particular interval.

Here is an example to understand the steps.

Example: Evaluate f(4) if \(f(x)=\left\{\begin{array}{l} -x^2, \text { if } x<0 \\-2 \sqrt{x}, \text { if } x>0 \\ 5, \text { if } x=0\end{array}\right.\).

We have to find f(4). Here x = 4 and it satisfies the condition x > 0. So the corresponding function is f(x) = -2√x.

Substitute x = 4 in this definition:

f(4) = -2 √4 = -2 (2) = -4.

Therefore, f(4) = -4.

Piecewise Continuous Function

A piecewise continuous function, as its name suggests, is a piecewise function that is continuous , It means, its graph has different pieces in it but still we will be able to draw the graph without lifting the pencil. Here is an example of a piecewise continuous function.

\(f(x)=\left\{\begin{array}{l} x-1, \text { if } x<-2 \\-3, \text { if } x\geq -2\end{array}\right.\).

Its graph is shown below.

piecewise continuous function

Important Notes on Piecewise Functions

  • To evaluate a piecewise function at an input, see which interval it belongs to and substitute it in the respective definition of the function.
  • While graphing a piecewise function, use open dots at the points whose x-coordinates do not belong to the corresponding intervals. An open dot at a point means that a particular point is NOT a part of the function.
  • To find the domain of a piecewise function, just take the union of all intervals given in the definition of the function.
  • To find the range of a piecewise function, just graph it and look for the y-values that are covered by the graph.

☛ Related Topics:

  • Graphing Functions Calculator
  • Quadratic Function Calculator
  • Graphing Calculator
  • Linear Function Calculator

Piecewise Function Examples

Example 1: Graph the piecewise function \(f(x)=\left\{\begin{array}{ll} -2 x, & -1 \leq x<0 \\ x^{2}, & 0 \leq x<2 \end{array}\right.\).

Let us make tables for each of the given intervals using their respective definitions of the function.

piecewise function example and graphing

Let us just plot them and join them by curves. We do not need to extend any of the curves here as none of the intervals have the limits as ∞ or -∞.

Note that we have not an open dot at (0, 0) in the first table because its a closed point in the second table and both curves meet there.

piecewise function graphing

Note that there was supposed to be an open dot at (0, 0) from the first table. But it has become a part of the function from the second table and hence there shouldn't be open dot at (0, 0) and the function is continuous at (0, 0).

Answer: The given function is graphed.

Example 2: Find the domain and range of the piecewise function that is given in Example 1.

The given intervals are -1 ≤ x < 0 and 0 ≤ x < 2. So their union is -1 ≤ x < 2. This is the domain. The domain in interval notation is [-1, 2).

For the range, look at the graph in Example 1 and see what y-values are being covered. All y-values less than 4 and greater than or equal to 0 are covered. Hence range is [0, 4)

Answer: Domain is [-1, 2) and range is [0, 4).

Example 3: Consider the following function: \(f(x)=\left\{\begin{aligned} 1, & x \in \mathbb{Q} \\ -1, & x \notin \mathbb{Q} \end{aligned}\right.\). Compute the values of (i) f(1), (ii) f(√2), and (iii) f(π).

The given function is piecewise and so we have to look for the intervals in which each of the given inputs lie in.

(i) Since 1 is a rational number (i.e., 1 ∈ Q), f(1) = 1.

(ii) Since √2 is an irrational number (i.e., √2 ∉ Q), f(√2) = -1.

(ii) Since π is an irrational number (i.e., π ∉ Q), f(π) = -1.

Answer: (i) f(1) = 1; (ii) f(√2) = -1; (iii) f(π) = -1.

go to slide go to slide go to slide

piecewise function problem solving examples with answers brainly

Book a Free Trial Class

Practice Questions on Piecewise Function

go to slide go to slide

FAQs on Piecewise Function

What is piecewise defined function.

A piecewise defined function (which is also known as a piecewise function ) is a function that has different definitions over different intervals of inputs. An example of a piecewise function is \(f(x)=\left\{\begin{array}{ll} 2x-3 & \text { if } x<-2 \\ -|x|+5 & \text { if }-2 \leq x<3 \\ x^2-2 & \text { if } x \geq 3 \end{array}\right.\).

How to Graph Piecewise Functions?

To draw a piecewise function graph :

  • Make a table (with two columns x and y) for each definition of the function in the respective intervals.
  • Include endpoints (in the column of x) of each interval in the respective table along with several other random numbers from the interval.
  • Substitute every x value in the corresponding expression of f(x) that gives value in the y-column.
  • Plot all the points (put open dots for the x-values that are excluded) and join them by curves.
  • If the left/right endpoint is ∞ or -∞ then extend the curve on that side accordingly.

How to Solve Piecewise Functions?

To solve the value of a piecewise function at a specific input:

  • Just see which of the given intervals that input lies in.
  • Take the corresponding function.
  • Substitute the given input in the function from the last step.

Give an Example of a Piecewise Linear Function.

A piecewise linear function is a piecewise function in which all pieces correspond to straight lines. For example, the absolute value function, step function (floor function or greatest integer function), ceiling function, etc are examples of piecewise linear functions.

What is a Piecewise Continuous Function?

A piecewise continuous function is a function that is piecewise and continuous. Its graph has more than one part and yet it is possible to graph it without lifting the pencil.

How to Find Domain and Range of a Piecewise Function?

The domain of a piecewise function is the union of all intervals that are given in its definition. The range is the set of all y-values that its graph covers. So to find the range of a piecewise function, graph it first.

logo white

  • Mathematicians
  • Math Lessons
  • Square Roots
  • Math Calculators
  • Piecewise Functions – Definition, Graph, and Examples

JUMP TO TOPIC

Piecewise function definition

How to read piecewise functions, how to solve piecewise functions, how to graph piecewise functions, practice questions, piecewise functions – definition, graph & examples .

Piecewise Functions

Piecewise functions are defined by different functions throughout the different intervals of the domain.

We actually apply piecewise functions in our lives more than we think so. Tax brackets, estimating our mobile phone plans, and even our salaries (with overtime pay) make use of piecewise functions.

This is why we’ve allotted a special article for this function. In this article, you’ll learn the following:

  • Definition of the piecewise function.
  • Learning how to evaluate piecewise-defined functions at given intervals.
  • Graphing and interpreting piecewise functions.

What is a piecewise function?

To fully understand what piecewise functions are and how we can construct our own piecewise-defined functions, let’s first dive into a deeper understanding of how it works.

A piecewise function is a function that is defined by different formulas or functions for each given interval. It’s also in the name: piece. The function is defined by pieces of functions for each part of the domain .

piecewise function with three equations 1

1, for x = 0

-2x, for x < 0

As can be seen from the example shown above, f(x) is a piecewise function because it is defined uniquely for the three intervals: x > 0, x = 0, and x < 0.

Once we have a given piecewise-defined function, we can interpret it by looking at the given intervals. If we take a look at our example, we can read it as:

  • When x > 0, f(x) is equal to 2x.
  • When x = 0, f(x) is equal to 1.
  • When x < 0, f(x) is equal to -2x.

When given a piecewise function graph, make sure to observe the given intervals where f(x) has varied graphs. But before we try out examples that involve analyzing piecewise function graphs, let’s go ahead and learn how we can evaluate and graph piecewise functions first.

Now that we’ve learned about this unique function, how do we make sure that we return the right value for the function given x ? Here are tips to remember when solving for and evaluating piecewise functions:

  • Double-check where x lies in the given interval.
  • Evaluate the value using the corresponding function.

Let’s say we want to find f(8) using the piecewise function that we’ve shown.

Since 8 is greater than 0, the function we’ll use to evaluate f(8) is f(x) = 2x . Hence, we have f(8) = 2(8) = 16 . This also means that f(-6) = -2(-6) = 12 and f(0) = 1 .

As we have mentioned before, piecewise functions contain different functions for each of the given intervals. This means that when graphing piecewise functions, expect to graph different functions for each interval as well.

Here are some quick reminders when graphing piecewise functions:

  • It helps to identify how each function would look like.
  • For inclusive intervals (ie x ≥ 0), including the endpoints.
  • For exclusive intervals (ie x < 0), exclude the endpoints by using unfilled dots.

What are the common functions that you may encounter when graphing piecewise functions? Here are some resources, and feel free to check out the links to refresh your knowledge on some of the commonly used graphs:

  • Linear functions such as f(x) = 3x -1, y = 4x, and more.
  • Quadratic functions such as y = -3x 2 + 4x, f(x) = 2x 2 – 1, and more.
  • Cubic functions such as f(x) = 4x 3 + 1, y = -x 3 -1, and more.

These are not the only functions that piecewise functions can use, so make sure also to check your textbook’s library of functions whenever you need to. Let’s try graphing the piecewise function given in the first section.

When x > 0 and x < 0, f(x) returns a linear function . Find at least two pairs of points that satisfy each function and use them to construct the two linear graphs.

breaking down piecewise functions

Since both are exclusive inequalities, we leave the dot at the origin unfilled. Now, we are left with the condition when x = 0. Since the value is constant at f(x) =1, let’s a plot a point at (0,1).

graphing piecewise functions

This graph returns the final graph for the given piecewise function. From the graph, we can see that f(x) has a domain of and range of (-∞, ∞)  and [0, -∞), respectively.

Piecewise Function Examples

We’ve covered all the essential properties and techniques we can use with piecewise functions, so it’s time for us to check our knowledge with these examples!

Evaluate the given piecewise function at the given values of x as shown below.

5, for x = 0

x/6, for x < 0

     a. f(-36)

     b. f(0)

     c. f(49)

  • When x = -36 (or less than 0), the expression for f(x) is x/6 . Let’s evaluate f(-36) using the expression. Hence, we have f(-36) = -36/6 = -6 .
  • When x = 0, f(x) is a constant . This means that we have f(0) = 5 .
  • When x = 49 (and consequently, greater 0), the expression for f(x) is √ x . Let’s evaluate f(49) using the expression. Hence, we have f(49) = √ 49 = 7 .

Graph the piecewise function shown below. Using the graph, determine its domain and range.

fx piecewise function symbol

For all intervals of x other than when it is equal to 0, f(x) = 2x (which is a linear function). To graph the linear function, we can use two points to connect the line. Just make sure that the two points satisfy y = 2x . Make sure to leave the point of origin unfilled.

graph of a piecewise function

Since f(x) = 1 when x = 0 , we plot a filled point at (0,1). The graph above shows the final graph of the piecewise function.

Since the graph covers all values of x, the domain would be all real numbers or  (-∞, ∞). The same reasoning applies to the range of functions. Since it extends in both directions, the range of the function is (- ∞ , ∞ ) in interval notation .

5, for 0 < x < 2

x/2 , for x ≥ 2

Let’s first break down the three intervals and identify how the graph of function would look like:

  • When x ≤ 0, f(x) becomes a quadratic function with a parabola that passes through the origin and (-2, 4). Since it only applies for 0 and negative numbers, we will only half of the parabola.
  • When 0 < x < 2, f(x) will a represent a constant which is a horizontal line passing through y = 5 . Make sure to leave (0,5) and (2,5) unfilled since they are not part of the solution.
  • When x ≥ 2, f(x) is a function and will pass through (2, 1) and (6,3).

Using this information, we can now graph f(x) .

parabola and linear graph in a piecewise function

The image above breaks down the three components of the piecewise function. Let’s go ahead and simplify this graph now so that we can analyze it for its domain and range.

domain and range of piecewise function

Since all values of x extend in both directions, the domain would be all real numbers or  (-∞, ∞). Since the graph only covers the values of y above the x-axis, the range of the function is [0, ∞ ) in interval notation .

Spoken word poetry is being held at the nearby cafe. They charge $6 per person for a table of 1 to 5 guests. They also offer a fixed fee of $50 for a table with 6 or more people. Write a function that relates the number of people, x , and the cost of attending the event, f(x) .

Let’s go ahead and break down the problem and find the expression of f(x) for each interval:

  • For a table of 1 to 5 guests, we can express that as 1 ≤ x ≤ 5 in terms of x. Since it would cost each guest $6, the total for x guests is 6x .
  • Now, for a table with 6 or more people, we can express the interval as x ≥ 6. For this interval, f(x) will always be equal to 60 .

We can now summarize this into a piecewise function:

50, for x ≥ 6

This piecewise function represents the cost of  f(x) for  x number of guests.

graphing piecewise functions 2

Previous Lesson  |  Main Page | Next Lesson

Module 5: Function Basics

Piecewise-defined functions, learning outcomes.

  • Write piecewise defined functions.
  • Graph piecewise-defined functions.

Sometimes, we come across a function that requires more than one formula in order to obtain the given output. For example, in the toolkit functions, we introduced the absolute value function [latex]f\left(x\right)=|x|[/latex]. With a domain of all real numbers and a range of values greater than or equal to 0, absolute value can be defined as the magnitude , or modulus , of a real number value regardless of sign. It is the distance from 0 on the number line. All of these definitions require the output to be greater than or equal to 0.

If we input 0, or a positive value, the output is the same as the input.

[latex]f\left(x\right)=x\text{ if }x\ge 0[/latex]

If we input a negative value, the output is the opposite of the input.

[latex]f\left(x\right)=-x\text{ if }x<0[/latex]

Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain.

We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain “boundaries.” For example, we often encounter situations in business for which the cost per piece of a certain item is discounted once the number ordered exceeds a certain value. Tax brackets are another real-world example of piecewise functions. For example, consider a simple tax system in which incomes up to [latex]$10,000[/latex] are taxed at [latex]10%[/latex], and any additional income is taxed at [latex]20\%[/latex]. The tax on a total income, [latex] S[/latex] , would be [latex]0.1S[/latex] if [latex]{S}\le$10,000[/latex]  and [latex]1000 + 0.2 (S - $10,000)[/latex] , if [latex] S> $10,000[/latex] .

A General Note: Piecewise Functions

A piecewise function is a function in which more than one formula is used to define the output. Each formula has its own domain, and the domain of the function is the union of all these smaller domains. We notate this idea like this:

[latex] f\left(x\right)=\begin{cases}\text{formula 1 if x is in domain 1}\\ \text{formula 2 if x is in domain 2}\\ \text{formula 3 if x is in domain 3}\end{cases} [/latex]

In piecewise notation, the absolute value function is

[latex]|x|=\begin{cases}\begin{align}x&\text{ if }x\ge 0\\ -x&\text{ if }x<0\end{align}\end{cases}[/latex]

How To: Given a piecewise function, write the formula and identify the domain for each interval.

  • Identify the intervals for which different rules apply.
  • Determine formulas that describe how to calculate an output from an input in each interval.
  • Use braces and if-statements to write the function.

Example: Writing a Piecewise Function

A museum charges $5 per person for a guided tour with a group of 1 to 9 people or a fixed $50 fee for a group of 10 or more people. Write a function relating the number of people, [latex]n[/latex], to the cost, [latex]C[/latex].

Two different formulas will be needed. For [latex]n[/latex]-values under 10, [latex]C=5n[/latex]. For values of [latex]n[/latex] that are 10 or greater, [latex]C=50[/latex].

[latex]C(n)=\begin{cases}\begin{align}{5n}&\hspace{2mm}\text{if}\hspace{2mm}{0}<{n}<{10}\\ 50&\hspace{2mm}\text{if}\hspace{2mm}{n}\ge 10\end{align}\end{cases}[/latex]

Analysis of the Solution

The graph is a diagonal line from [latex]n=0[/latex] to [latex]n=10[/latex] and a constant after that. In this example, the two formulas agree at the meeting point where [latex]n=10[/latex], but not all piecewise functions have this property.

Graph of C(n).

Example: Working with a Piecewise Function

A cell phone company uses the function below to determine the cost, [latex]C[/latex], in dollars for [latex]g[/latex] gigabytes of data transfer.

[latex]C\left(g\right)=\begin{cases}\begin{align}{25} \hspace{2mm}&\text{ if }\hspace{2mm}{ 0 }<{ g }<{ 2 }\\ { 25+10 }\left(g - 2\right) \hspace{2mm}&\text{ if }\hspace{2mm}{ g}\ge{ 2 }\end{align}\end{cases}[/latex]

Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.

To find the cost of using 1.5 gigabytes of data, [latex]C(1.5)[/latex], we first look to see which part of the domain our input falls in. Because 1.5 is less than 2, we use the first formula.

[latex]C(1.5) = $25[/latex]

To find the cost of using 4 gigabytes of data, [latex]C(4)[/latex], we see that our input of 4 is greater than 2, so we use the second formula.

[latex]C(4)=25 + 10( 4-2) =$45[/latex]

We can see where the function changes from a constant to a shifted and stretched identity at [latex]g=2[/latex]. We plot the graphs for the different formulas on a common set of axes, making sure each formula is applied on its proper domain.

Graph of C(g)

How To: Given a piecewise function, sketch a graph.

  • Indicate on the [latex]x[/latex]-axis the boundaries defined by the intervals on each piece of the domain.
  • For each piece of the domain, graph on that interval using the corresponding equation pertaining to that piece. Do not graph two functions over one interval because it would violate the criteria of a function.

Example: Graphing a Piecewise Function

Sketch a graph of the function.

[latex]f\left(x\right)=\begin{cases}\begin{align}{ x }^{2} \hspace{2mm}&\text{ if }\hspace{2mm}{ x }\le{ 1 }\\ { 3 } \hspace{2mm}&\text{ if }\hspace{2mm} { 1 }<{ x }\le 2\\ { x } \hspace{2mm}&\text{ if }\hspace{2mm}{ x }>{ 2 }\end{align}\end{cases}[/latex]

Each of the component functions is from our library of toolkit functions, so we know their shapes. We can imagine graphing each function and then limiting the graph to the indicated domain. At the endpoints of the domain, we draw open circles to indicate where the endpoint is not included because of a less-than or greater-than inequality; we draw a closed circle where the endpoint is included because of a less-than-or-equal-to or greater-than-or-equal-to inequality.

Below are the three components of the piecewise function graphed on separate coordinate systems.

(a) [latex]f\left(x\right)={x}^{2}\text{ if }x\le 1[/latex]; (b) [latex]f\left(x\right)=3\text{ if 1< }x\le 2[/latex]; (c) [latex]f\left(x\right)=x\text{ if }x>2[/latex]

Graph of each part of the piece-wise function f(x)

Now that we have sketched each piece individually, we combine them in the same coordinate plane.

Graph of the entire function.

Note that the graph does pass the vertical line test even at [latex]x=1[/latex] and [latex]x=2[/latex] because the points [latex]\left(1,3\right)[/latex] and [latex]\left(2,2\right)[/latex] are not part of the graph of the function, though [latex]\left(1,1\right)[/latex] and [latex]\left(2,3\right)[/latex] are.

Graph the following piecewise function.

[latex]f\left(x\right)=\begin{cases}\begin{align}{ x}^{3} \hspace{2mm}&\text{ if }\hspace{2mm}{ x }<{-1 }\\ { -2 } \hspace{2mm}&\text{ if } \hspace{2mm}{ -1 }<{ x }<{ 4 }\\ \sqrt{x} \hspace{2mm}&\text{ if }\hspace{2mm}{ x }>{ 4 }\end{align}\end{cases}[/latex]

Graph of f(x).

You can use an online graphing tool to graph piecewise defined functions. Watch this tutorial video to learn how.

Graph the following piecewise function with an online graphing tool.

piecewise function problem solving examples with answers brainly

Can more than one formula from a piecewise function be applied to a value in the domain?

No. Each value corresponds to one equation in a piecewise formula.

Contribute!

Improve this page Learn More

  • Revision and Adaptation. Provided by : Lumen Learning. License : CC BY: Attribution
  • Piecewise functions in Desmos. Authored by : Lumen Learning. Located at : https://youtu.be/vmqiJV1FqwU . License : CC BY: Attribution
  • Question ID 11812. Authored by : Lumen Learning. License : CC BY: Attribution . License Terms : IMathAS Community License CC-BY + GPL
  • QUestion ID 93008. Authored by : Jenck,Michael for Lumen Learning. License : CC BY: Attribution . License Terms : IMathAS Community License CC-BY + GPL
  • College Algebra. Authored by : Abramson, Jay et al.. Provided by : OpenStax. Located at : http://cnx.org/contents/[email protected] . License : CC BY: Attribution . License Terms : Download for free at http://cnx.org/contents/[email protected]
  • Question ID 1657. Authored by : WebWork-Rochester, mb Sousa,James. License : CC BY: Attribution . License Terms : IMathAS Community License CC-BY + GPL
  • QuestionID 32883. Authored by : Smart, Jim. License : CC BY: Attribution . License Terms : IMathAS Community License CC-BY + GPL

Footer Logo Lumen Waymaker

OML Search

Solver Title

Practice

Generating PDF...

  • Pre Algebra Order of Operations Factors & Primes Fractions Long Arithmetic Decimals Exponents & Radicals Ratios & Proportions Percent Modulo Number Line Mean, Median & Mode
  • Algebra Equations Inequalities System of Equations System of Inequalities Basic Operations Algebraic Properties Partial Fractions Polynomials Rational Expressions Sequences Power Sums Interval Notation Pi (Product) Notation Induction Logical Sets Word Problems
  • Pre Calculus Equations Inequalities Scientific Calculator Scientific Notation Arithmetics Complex Numbers Polar/Cartesian Simultaneous Equations System of Inequalities Polynomials Rationales Functions Arithmetic & Comp. Coordinate Geometry Plane Geometry Solid Geometry Conic Sections Trigonometry
  • Calculus Derivatives Derivative Applications Limits Integrals Integral Applications Integral Approximation Series ODE Multivariable Calculus Laplace Transform Taylor/Maclaurin Series Fourier Series Fourier Transform
  • Functions Line Equations Functions Arithmetic & Comp. Conic Sections Transformation
  • Linear Algebra Matrices Vectors
  • Trigonometry Identities Proving Identities Trig Equations Trig Inequalities Evaluate Functions Simplify
  • Statistics Mean Geometric Mean Quadratic Mean Average Median Mode Order Minimum Maximum Probability Mid-Range Range Standard Deviation Variance Lower Quartile Upper Quartile Interquartile Range Midhinge Standard Normal Distribution
  • Physics Mechanics
  • Chemistry Chemical Reactions Chemical Properties
  • Finance Simple Interest Compound Interest Present Value Future Value
  • Economics Point of Diminishing Return
  • Conversions Roman Numerals Radical to Exponent Exponent to Radical To Fraction To Decimal To Mixed Number To Improper Fraction Radians to Degrees Degrees to Radians Hexadecimal Scientific Notation Distance Weight Time Volume
  • Pre Algebra
  • Pre Calculus
  • Given Points
  • Given Slope & Point
  • Slope Intercept Form
  • Start Point
  • Parallel Lines
  • Perpendicular
  • Perpendicular Lines
  • Perpendicular Slope
  • Is a Function
  • Domain & Range
  • Slope & Intercepts
  • Periodicity
  • Domain of Inverse
  • Critical Points
  • Inflection Points
  • Monotone Intervals
  • Extreme Points
  • Global Extreme Points
  • Absolute Extreme
  • Turning Points
  • End Behavior
  • Average Rate of Change
  • Piecewise Functions
  • Discontinuity
  • Values Table
  • Compositions
  • Arithmetics
  • Circumference
  • Eccentricity
  • Conic Inequalities
  • Transformation
  • Linear Algebra
  • Trigonometry
  • Conversions

Click to reveal more operations

Most Used Actions

Number line.

  • f(x)=\begin{cases}x^{2}&x<-2\\\ln(x+5)&x\ge-2\end{cases}
  • f(x)=\begin{cases}\sin(x)&x<0\\2x&x\ge0\end{cases}
  • y=\begin{cases}\sqrt{x+2}&x<1\\\frac{x}{x^{2}-6x+8}&x\ge1\end{cases}
  • y=\begin{cases}\sqrt{x^{2}-4}&x<0\\x^{3}-x&x\ge0\end{cases}

piecewise-functions-calculator

  • Functions A function basically relates an input to an output, there’s an input, a relationship and an output. For every input...

Please add a message.

Message received. Thanks for the feedback.

logo

Have an account?

Suggestions for you See more

Quiz image

Percent of a Quantity

Gross income vs. net income, income and income taxes, 285.6k plays, kg -  1st  .

pencil-icon

Piecewise Function Word Problems

Mathematics, other.

User image

8 questions

Player avatar

Introducing new   Paper mode

No student devices needed.   Know more

The amount Lea can earn at her job is shown:

She earns $7 per hour for the first 40 hours.

She earns 1.5 times the hourly wage for every hour over 40 hours.

Which piecewise-defined function best represents Lea’s weekly pay, P(h), where h represents the hours worked?

P(h)= 7h, 0≤h≤40

P(h)=10.5h−140, h>40

P(h)= 7h, 0<h<40

P(h)= 10.5h−140, h>40

P(h)= 10.5h+140, h≥40

Mr. Garrison’s class is collecting aluminum cans to raise money for a trip. The rates are shown:

$0.75 per pound for a collection weighing 10 pounds or less

$1.25 per pound for a collection weighing more than 10 pounds.

What are the domain and range for a collection that weighs more than 10 pounds?

{x x<10}

{y y<$12.50}

{x x>10}

{y y>$12.50}

{y y<$7.50}

{y y>$7.50}

A house painter charges $12 per hour for the first 40 hours he works, $18 for the ten hours after that, and $24 for all hours after that.

How much does he earn for a 70 hour week?

He works for free!

How much does he earn for a 45 hour week?

A state income tax uses a piecewise-defined function to calculate taxes owed, T(i), where i is the annual income. What are the taxes owed if Charles has an annual income of $30,000?

Luke has a $25 gift card to pay for video game rentals. The first five games he can rent for $3 each. After five games each game cost $1. Which piecewise function best represents the balance remaining on the gift card, f(x), after each game rental, x?

f(x)= 25−3x, 0≤x≤5

f(x)= 15−x, 6≤x≤10

f(x)= 25−3x, 0<x<5

f(x)= 15−x, 6<x<10

f(x)= 25+3x, 0≤x≤5

f(x)= 15+x, 6≤x≤10

f(x)= 25+3x, 0<x<5

f(x)=15+x, 6<x<10

Explore all questions with a free account

Google Logo

Continue with email

Continue with phone

IMAGES

  1. How do you write a piecewise function that is represented in a graph

    piecewise function problem solving examples with answers brainly

  2. Which piecewise function is shown in the graph?

    piecewise function problem solving examples with answers brainly

  3. How to find Limit of piecewise function Examples Problems

    piecewise function problem solving examples with answers brainly

  4. Piecewise Functions Worksheet With Answers

    piecewise function problem solving examples with answers brainly

  5. Piecewise Functions Worksheet With Answers

    piecewise function problem solving examples with answers brainly

  6. Piecewise Functions

    piecewise function problem solving examples with answers brainly

VIDEO

  1. Graphing a Piecewise Function (Section 1.2 Problem #39)

  2. Word problem

  3. 1.5 Continuity

  4. Piecewise Function Word Problem/Context

  5. How to graph piecewise functions quickly and simply!

  6. Piecewise Function Word Problem (2 of 2)

COMMENTS

  1. Introduction to piecewise functions

    Introduction to piecewise functions. A piecewise function is a function built from pieces of different functions over different intervals. For example, we can make a piecewise function f (x) where f (x) = -9 when -9 < x ≤ -5, f (x) = 6 when -5 < x ≤ -1, and f (x) = -7 when -1.

  2. 2.4e: Exercises

    3) If the order is reversed when composing two functions, can the result ever be the same as the answer in the original order of the composition? If yes, give an example. If no, explain why not. 4) How do you find the domain for the composition of two functions, \(f{\circ}g\)? 5) How do you graph a piecewise function? Answers 1-5: 1.

  3. Page 2.7: Piecewise Defined Functions

    Piecewise Function. A piecewise function is a function in which the formula used depends upon the domain the input lies in. We notate this idea like: \[f(x) = \begin{cases} \text{formula 1, if domain value satisfies given criteria 1} \\ \text{formula 2, if domain value satisfies given criteria 2} \\ \text{formula 3, if domain value satisfies given criteria 3} \end{cases}\nonumber \]

  4. How to Solve Piecewise Functions?

    Here are the steps to graph a piecewise function. Step 1: First, understand what each definition of a function represents. For example, \ (f (x)= ax + b\) represents a linear function (which gives a line), \ (f (x)= ax^2+ bx+c\) represents a quadratic function (which gives a parabola), and so on. So that we will have an idea of what shape the ...

  5. Piecewise Functions

    Piecewise Function Word Problems. Problem: Your favorite dog groomer charges according to your dog's weight. If your dog is 15 pounds and under, the groomer charges $35. If your dog is between 15 and 40 pounds, she charges $40. If your dog is over 40 pounds, she charges $40, plus an additional $2 for each pound.

  6. 5.1: Piecewise-Defined Functions

    A line stretches indefinitely in two directions, as shown in Figure 5.1.2. 5.1. 2. (a). If a line has a fixed endpoint and stretches indefinitely in only one direction, as shown in Figure 5.1.2. 5.1. 2. (b), then it is called a ray. If a portion of the line is fixed at each end, as shown in Figure 5.1.2. 5.1. 2.

  7. Piecewise Functions

    A Function Can be in Pieces. We can create functions that behave differently based on the input (x) value. A function made up of 3 pieces. Example: Imagine a function. when x is less than 2, it gives x2, when x is exactly 2 it gives 6. when x is more than 2 and less than or equal to 6 it gives the line 10−x. It looks like this:

  8. Piecewise Function

    Piecewise Function Examples. Example 1: Graph the piecewise function f (x) = {−2x, −1≤ x < 0 x2, 0 ≤ x < 2 f ( x) = { − 2 x, − 1 ≤ x < 0 x 2, 0 ≤ x < 2. Solution: Let us make tables for each of the given intervals using their respective definitions of the function. Let us just plot them and join them by curves.

  9. Evaluate piecewise functions

    Evaluate piecewise functions. Stuck? Review related articles/videos or use a hint. Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. Khan Academy is a nonprofit with the mission of providing a free, world-class education for anyone, anywhere.

  10. Piecewise Functions

    It's also in the name: piece. The function is defined by pieces of functions for each part of the domain. 2x, for x > 0. 1, for x = 0. -2x, for x < 0. As can be seen from the example shown above, f (x) is a piecewise function because it is defined uniquely for the three intervals: x > 0, x = 0, and x < 0.

  11. Piecewise-Defined Functions

    A piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain. We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain "boundaries.". For example, we often encounter situations in business for which the ...

  12. how to solve piecewise functions

    For example, the function f(x) = { 2x for x <= 0, x² for x > 0} is defined for two different intervals: solve 2x for x <= 0 and x² for x > 0. Solution B: involves using a graphing calculator such as the TI-83+, and TI-84. Input the piecewise function into the graphing function of the calculator and then interpret the graph.

  13. Piecewise Functions (examples, solutions, videos, worksheets, homework

    New York State Common Core Math Algebra I, Module 3, Lesson 15. Worksheets for Algebra 1. Problem Set Sample Solutions. 6. Graph the following piecewise functions for the specified domain. 7. Write a piecewise function for each graph below. Exit Ticket. Each graph shown below represents the solution set to a two-variable equation.

  14. Piecewise Functions Calculator

    Free piecewise functions calculator - explore piecewise function domain, range, intercepts, extreme points and asymptotes step-by-step

  15. Solving equations graphically: word problems

    Solving equations graphically: word problems. Google Classroom. A piecewise function f can model the height (in meters) of an airplane during a flight. Here is the graph of f , where t is the number of minutes that have passed since takeoff. 20 40 60 80 100 120 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 y t f.

  16. PDF Applications of Piecewise Defined Functions

    Applications of Piecewise Defined Functions. In this lesson we'll be covering how to set-up piecewise defined functions based on story problems. Keep in mind that each piece of a piecewise defined function has its own domain, so we'll also have to set-up an interval for each piece, just like the sample piecewise function given below ...

  17. Piecewise Function Word Problems

    Piecewise Function Word Problems. 1. Multiple Choice. She earns $7 per hour for the first 40 hours. She earns 1.5 times the hourly wage for every hour over 40 hours. Which piecewise-defined function best represents Lea's weekly pay, P (h), where h represents the hours worked? 2.

  18. I have no clue how to solve piece-wise functions. Nothing ...

    To evaluate the function, substitute the value of x into the relevant equation. Explanation: Piecewise Functions. A piecewise function is a function that is defined by different rules for different parts of its domain. It is typically represented using multiple equations that describe different intervals or segments of the function. Example 1: