{"id":17737,"date":"2021-08-20T19:45:42","date_gmt":"2021-08-20T19:45:42","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/?post_type=chapter&#038;p=17737"},"modified":"2021-08-20T20:12:57","modified_gmt":"2021-08-20T20:12:57","slug":"section-2-4-library-of-functions-piecewise-functions","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/chapter\/section-2-4-library-of-functions-piecewise-functions\/","title":{"raw":"Section 2.4: Library of Functions; Piecewise Functions","rendered":"Section 2.4: Library of Functions; Piecewise Functions"},"content":{"raw":"<div class=\"bcc-box bcc-highlight\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li style=\"font-weight: 400;\">Identify base functions<\/li>\r\n \t<li>Graph piecewise-defined functions.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<section id=\"fs-id1165135545919\">\r\n<h1 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Identifying Base Functions<\/span><\/h1>\r\n<p id=\"fs-id1165137698132\">In this text we will be exploring functions\u2014the shapes of their graphs, their unique characteristics, their algebraic formulas, and how to solve problems with them. When learning to read, we start with the alphabet. When learning to do arithmetic, we start with numbers. When working with functions, it is similarly helpful to have a library of building-block elements. We call these our \"base functions,\" which form a set of basic named functions for which we know the graph, formula, and special properties. Some of these functions are programmed to individual buttons on many calculators. For these definitions we will use [latex]x[\/latex] as the input variable and [latex]y=f\\left(x\\right)[\/latex] as the output variable.<\/p>\r\n<p id=\"fs-id1165135591070\">We will see these base functions, combinations of base functions, their graphs, and their transformations frequently throughout this book. It will be very helpful if we can recognize these toolkit functions and their features quickly by name, formula, graph, and basic table properties. The graphs and sample table values are included with each function shown below.<\/p>\r\n\r\n<\/section><section id=\"fs-id1165135545919\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<th style=\"text-align: center;\" colspan=\"3\">Toolkit Functions<\/th>\r\n<\/tr>\r\n<tr>\r\n<th style=\"text-align: center;\">Name<\/th>\r\n<th style=\"text-align: center;\">Function<\/th>\r\n<th style=\"text-align: center;\">Graph<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr valign=\"top\">\r\n<td>Constant<\/td>\r\n<td>[latex]f\\left(x\\right)=c[\/latex], where [latex]c[\/latex] is a constant<\/td>\r\n<td><span id=\"fs-id1165137643159\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005019\/CNX_Precalc_Figure_01_01_018n.jpg\" alt=\"Graph of a constant function.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Identity<\/td>\r\n<td>[latex]f\\left(x\\right)=x[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137811013\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_019n.jpg\" alt=\"Graph of a straight line.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Absolute value<\/td>\r\n<td>[latex]f\\left(x\\right)=|x|[\/latex]<\/td>\r\n<td><span id=\"fs-id1165135195221\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_020n.jpg\" alt=\"Graph of absolute function.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Quadratic<\/td>\r\n<td>[latex]f\\left(x\\right)={x}^{2}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137501903\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_021n.jpg\" alt=\"Graph of a parabola.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Cubic<\/td>\r\n<td>[latex]f\\left(x\\right)={x}^{3}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137722123\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_022n.jpg\" alt=\"Graph of f(x) = x^3.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Reciprocal<\/td>\r\n<td>[latex]f\\left(x\\right)=\\frac{1}{x}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165134544980\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_023n.jpg\" alt=\"Graph of f(x)=1\/x.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Reciprocal squared<\/td>\r\n<td>[latex]f\\left(x\\right)=\\frac{1}{{x}^{2}}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137647610\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_024n.jpg\" alt=\"Graph of f(x)=1\/x^2.\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Square root<\/td>\r\n<td>[latex]f\\left(x\\right)=\\sqrt{x}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137863670\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_025n.jpg\" alt=\"Graph of f(x)=sqrt(x).\" \/><\/span><\/td>\r\n<\/tr>\r\n<tr valign=\"top\">\r\n<td>Cube root<\/td>\r\n<td>[latex]f\\left(x\\right)=\\sqrt[3]{x}[\/latex]<\/td>\r\n<td><span id=\"fs-id1165137838612\">\r\n<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_026n.jpg\" alt=\"Graph of f(x)=x^(1\/3).\" \/><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/section>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Equations<\/span><\/h2>\r\n<table id=\"eip-id1165134393730\" summary=\"..\"><colgroup> <col \/> <col \/> <\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td>Constant function<\/td>\r\n<td>[latex]f\\left(x\\right)=c[\/latex], where [latex]c[\/latex] is a constant<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Identity function<\/td>\r\n<td>[latex]f\\left(x\\right)=x[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Absolute value function<\/td>\r\n<td>[latex]f\\left(x\\right)=|x|[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Quadratic function<\/td>\r\n<td>[latex]f\\left(x\\right)={x}^{2}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Cubic function<\/td>\r\n<td>[latex]f\\left(x\\right)={x}^{3}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Reciprocal function<\/td>\r\n<td>[latex]f\\left(x\\right)=\\frac{1}{x}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Reciprocal squared function<\/td>\r\n<td>[latex]f\\left(x\\right)=\\frac{1}{{x}^{2}}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Square root function<\/td>\r\n<td>[latex]f\\left(x\\right)=\\sqrt{x}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Cube root function<\/td>\r\n<td>[latex]f\\left(x\\right)=\\sqrt[3]{x}[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"\u201ctextbox\u201d\">\r\n<h2 class=\"mceTemp\">Graphing Piecewise-Defined Functions<\/h2>\r\nSometimes, 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, <strong>absolute value<\/strong> can be defined as the <strong>magnitude<\/strong>, or <strong>modulus<\/strong>, 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.\r\n<p id=\"fs-id1165137558775\">If we input 0, or a positive value, the output is the same as the input.<\/p>\r\n\r\n<div id=\"fs-id1165135194329\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=x\\text{ if }x\\ge 0[\/latex]<\/div>\r\n<p id=\"fs-id1165137529947\">If we input a negative value, the output is the opposite of the input.<\/p>\r\n\r\n<div id=\"fs-id1165133112779\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=-x\\text{ if }x&lt;0[\/latex]<\/div>\r\n<p id=\"fs-id1165137863778\">Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A <strong>piecewise function<\/strong> is a function in which more than one formula is used to define the output over different pieces of the domain.<\/p>\r\n<p id=\"fs-id1165134042316\">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 $10,000 are taxed at 10%, and any additional income is taxed at 20%. The tax on a total income, S, would be\u00a00.1S if [latex]{S}\\le\\[\/latex] $10,000\u00a0and 1000 + 0.2 (S - $10,000),\u00a0if S&gt; $10,000.<\/p>\r\n\r\n<div id=\"fs-id1165137531241\" class=\"note textbox\">\r\n<h3 class=\"title\">A General Note: Piecewise Function<\/h3>\r\n<p id=\"fs-id1165135504970\">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:<\/p>\r\n<p style=\"text-align: center;\">[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]<\/p>\r\nIn piecewise notation, the absolute value function is\r\n<p style=\"text-align: center;\">[latex]|x|=\\begin{cases}\\begin{align}&amp;x&amp;&amp;\\text{ if }x\\ge 0\\\\ &amp;-x&amp;&amp;\\text{ if }x&lt;0\\end{align}\\end{cases}[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div id=\"fs-id1165137768426\" class=\"note precalculus howto textbox\">\r\n<h3>How To:\u00a0Given a piecewise function, write the formula and identify the domain for each interval.<strong>\r\n<\/strong><\/h3>\r\n<ol id=\"fs-id1165135443772\">\r\n \t<li>Identify the intervals for which different rules apply.<\/li>\r\n \t<li>Determine formulas that describe how to calculate an output from an input in each interval.<\/li>\r\n \t<li>Use braces and if-statements to write the function.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example 1: Writing a Piecewise Function<\/h3>\r\nA 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 <strong>function<\/strong> relating the number of people, [latex]n[\/latex], to the cost, [latex]C[\/latex].\r\n\r\n[reveal-answer q=\"525510\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"525510\"]\r\n\r\nTwo different formulas will be needed. For <em>n<\/em>-values under 10, C=5n. For values of n that are 10 or greater, C=50.\r\n<p style=\"text-align: center;\">[latex]C(n)=\\begin{cases}\\begin{align}{5n}&amp;\\hspace{5mm}\\text{ if }{0}&lt;{n}&lt;{10}\\\\ 50&amp;\\hspace{5mm}\\text{ if }{n}\\ge 10\\end{align}\\end{cases}[\/latex]<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\nThe function is represented in Figure 1. 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.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"360\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010548\/CNX_Precalc_Figure_01_02_0212.jpg\" alt=\"Graph of C(n).\" width=\"360\" height=\"294\" \/> <b>Figure 1<\/b>[\/caption]\r\n\r\n[\/hidden-answer]<b><\/b>\r\n\r\n<\/div>\r\nhttps:\/\/www.youtube.com\/watch?v=B1jfpiI-QQ8&amp;feature=youtu.be\r\n<div id=\"Example_01_02_12\" class=\"example\">\r\n<div id=\"fs-id1165135436662\" class=\"exercise\">\r\n<div id=\"fs-id1165135436664\" class=\"problem textbox shaded\">\r\n<h3>Example 2: Working with a Piecewise Function<\/h3>\r\n<p id=\"fs-id1165137938645\">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.<\/p>\r\n\r\n<div id=\"fs-id1165137660470\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]C\\left(g\\right)=\\begin{cases}\\begin{align}&amp;{25} &amp;&amp;\\hspace{-5mm}\\text{ if }{ 0 }&lt;{ g }&lt;{ 2 }\\\\ &amp;{ 25+10 }\\left(g - 2\\right) &amp;&amp;\\hspace{-5mm}\\text{ if }{ g}\\ge{ 2 }\\end{align}\\end{cases}[\/latex]<\/div>\r\n<p id=\"fs-id1165135193798\">Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.<\/p>\r\n[reveal-answer q=\"67822\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"67822\"]\r\n<p id=\"fs-id1165134373545\">To find the cost of using 1.5 gigabytes of data, C(1.5), 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.<\/p>\r\n<p style=\"text-align: center;\">[latex]C(1.5) = \\$25[\/latex]<\/p>\r\n<p id=\"fs-id1165135440213\">To find the cost of using 4 gigabytes of data, C(4), we see that our input of 4 is greater than 2, so we use the second formula.<\/p>\r\n\r\n<div style=\"text-align: center;\">[latex]C(4)=25 + 10( 4-2) =\\$45[\/latex]<\/div>\r\n<h4>Analysis of the Solution<\/h4>\r\nThe function is represented in Figure 2. 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.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010548\/CNX_Precalc_Figure_01_02_0222.jpg\" alt=\"Graph of C(g)\" width=\"487\" height=\"296\" \/> <b>Figure 2<\/b>[\/caption]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-id1165137600493\" class=\"note precalculus howto textbox\">\r\n<h3 id=\"fs-id1165135532516\">How To:\u00a0Given a piecewise function, sketch a graph.<\/h3>\r\n<ol id=\"fs-id1165137588539\">\r\n \t<li>Indicate on the <em>x<\/em>-axis the boundaries defined by the intervals on each piece of the domain.<\/li>\r\n \t<li>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.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div id=\"Example_01_02_13\" class=\"example\">\r\n<div id=\"fs-id1165137781618\" class=\"exercise\">\r\n<div id=\"fs-id1165135412870\" class=\"problem textbox shaded\">\r\n<h3>Example 3: Graphing a Piecewise Function<\/h3>\r\n<p id=\"fs-id1165137838785\">Sketch a graph of the function.<\/p>\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}\\begin{align}&amp;{ x }^{2} &amp;&amp;\\hspace{-5mm}\\text{ if }{ x }\\le{ 1 }\\\\ &amp;{ 3 } &amp;&amp;\\hspace{-5mm}\\text{ if } { 1 }&amp;lt{ x }\\le 2\\\\ &amp;{ x } &amp;&amp;\\hspace{-5mm}\\text{ if }{ x }&amp;gt{ 2 }\\end{align}\\end{cases}[\/latex]<\/p>\r\n[reveal-answer q=\"617292\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"617292\"]\r\n<p id=\"fs-id1165135487150\">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.<\/p>\r\n<p id=\"fs-id1165137642848\">Below are\u00a0the three components of the piecewise function graphed on separate coordinate systems.<\/p>\r\n\r\n<figure id=\"Figure_01_02_023\"><figcaption>(a) [latex]f\\left(x\\right)={x}^{2}\\text{ if }x\\le 1[\/latex]; (b) [latex]f\\left(x\\right)=3\\text{ if 1&lt; }x\\le 2[\/latex]; (c) [latex]f\\left(x\\right)=x\\text{ if }x&gt;2[\/latex]<\/figcaption>\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"974\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_023abc2.jpg\" alt=\"Graph of each part of the piece-wise function f(x)\" width=\"974\" height=\"327\" \/> <b>Figure 3<\/b>[\/caption]<\/figure>\r\n<p id=\"fs-id1165137676209\">Now that we have sketched each piece individually, we combine them in the same coordinate plane.<span id=\"fs-id1165137646696\">\r\n<\/span><\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_0262.jpg\" alt=\"Graph of the entire function.\" width=\"487\" height=\"333\" \/> <b>Figure 4<\/b>[\/caption]\r\n<h4>Analysis of the Solution<\/h4>\r\n<p id=\"fs-id1165134389893\">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]\u00a0and [latex]\\left(2,3\\right)[\/latex] are.<\/p>\r\n[\/hidden-answer]<b><\/b>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\nGraph the following piecewise function.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}{ x}^{3} \\text{ if }{ x }&amp;lt{-1 }\\\\ { -2 } \\text{ if } { -1 }&amp;lt{ x }&amp;lt{ 4 }\\\\ \\sqrt{x} \\text{ if }{ x }&amp;gt{ 4 }\\end{cases}[\/latex]<\/p>\r\n[reveal-answer q=\"836663\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"836663\"]\r\n\r\n<img class=\"alignnone\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_0272.jpg\" alt=\"Graph of f(x).\" width=\"487\" height=\"408\" \/>\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]32883[\/ohm_question]\r\n\r\n<\/div>\r\n<div id=\"fs-id1165137810682\" class=\"note precalculus qa textbox\">\r\n<h3>Q&amp;A<\/h3>\r\n<p id=\"fs-id1165137527804\"><strong>Can more than one formula from a piecewise function be applied to a value in the domain?<\/strong><\/p>\r\n<p id=\"fs-id1165137464467\"><em>No. Each value corresponds to one equation in a piecewise formula.<\/em><\/p>\r\n\r\n<\/div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Concepts<\/span><\/h2>\r\n<ul>\r\n \t<li style=\"list-style-type: none;\">\r\n<ul>\r\n \t<li>A piecewise function is described by more than one formula.<\/li>\r\n \t<li>A piecewise function can be graphed using each algebraic formula on its assigned subdomain.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Glossary<\/span><\/h2>\r\n<dl id=\"fs-id1165135487256\" class=\"definition\">\r\n \t<dt><strong>piecewise function<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165137452169\">a function in which more than one formula is used to define the output<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165137863188\" class=\"definition\">\r\n \t<dd><\/dd>\r\n<\/dl>\r\n<\/div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Section 2.4 Homework Exercises<\/span><\/h2>\r\n1. How do you graph a piecewise function?\r\n\r\nFor the following exercises, sketch a graph of the piecewise function. Write the domain in interval notation.\r\n\r\n2. [latex]f(x)=\\begin{cases}{x}+{1}&amp;\\text{ if }&amp;{ x }&lt;{ -2 } \\\\{-2x - 3}&amp;\\text{ if }&amp;{ x }\\ge { -2 }\\\\ \\end{cases} [\/latex]\r\n\r\n3. [latex]f\\left(x\\right)=\\begin{cases}{2x - 1}&amp;\\text{ if }&amp;{ x }&lt;{ 1 }\\\\ {1+x }&amp;\\text{ if }&amp;{ x }\\ge{ 1 } \\end{cases}[\/latex]\r\n\r\n4. [latex]f\\left(x\\right)=\\begin{cases}{x+1}&amp;\\text{ if }&amp;{ x }&lt;{ 0 }\\\\ {x - 1 }&amp;\\text{ if }&amp;{ x }&gt;{ 0 }\\end{cases}[\/latex]\r\n\r\n5. [latex]f\\left(x\\right)=\\begin{cases}{3} &amp;\\text{ if }&amp;{ x } &lt;{ 0 }\\\\ \\sqrt{x}&amp;\\text{ if }&amp;{ x }\\ge { 0 }\\end{cases}[\/latex]\r\n\r\n6. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}&amp;\\text{ if }&amp;{ x } &lt;{ 0 }\\\\ {1-x}&amp;\\text{ if }&amp;{ x } &gt;{ 0 }\\end{cases}[\/latex]\r\n\r\n7. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}&amp;\\text{ if }&amp;{ x }&lt;{ 0 }\\\\ {x+2 }&amp;\\text{ if }&amp;{ x }\\ge { 0 }\\end{cases}[\/latex]\r\n\r\n8. [latex]f\\left(x\\right)=\\begin{cases}x+1&amp; \\text{if}&amp; x&lt;1\\\\ {x}^{3}&amp; \\text{if}&amp; x\\ge 1\\end{cases}[\/latex]\r\n\r\n9. [latex]f\\left(x\\right)=\\begin{cases}|x|&amp;\\text{ if }&amp;{ x }&lt;{ 2 }\\\\ { 1 }&amp;\\text{ if }&amp;{ x }\\ge{ 2 }\\end{cases}[\/latex]\r\n\r\nFor the following exercises, given each function [latex]f[\/latex], evaluate [latex]f\\left(-3\\right),f\\left(-2\\right),f\\left(-1\\right)[\/latex], and [latex]f\\left(0\\right)[\/latex].\r\n\r\n10. [latex]f\\left(x\\right)=\\begin{cases}{ x+1 }&amp;\\text{ if }&amp;{ x }&lt;{ -2 }\\\\ { -2x - 3 }&amp;\\text{ if }&amp;{ x }\\ge{ -2 }\\end{cases}[\/latex]\r\n\r\n11. [latex]f\\left(x\\right)=\\begin{cases}{ 1 }&amp;\\text{ if }&amp;{ x }\\le{ -3 }\\\\{ 0 }&amp;\\text{ if }&amp;{ x }&gt;{ -3 }\\end{cases}[\/latex]\r\n\r\n12. [latex]f\\left(x\\right)=\\begin{cases}{-2}{x}^{2}+{ 3 }&amp;\\text{ if }&amp;{ x }\\le { -1 }\\\\ { 5x } - { 7 } &amp;\\text{ if }&amp;{ x } &gt; { -1 }\\end{cases}[\/latex]\r\n\r\nFor the following exercises, given each function [latex]f[\/latex], evaluate [latex]f\\left(-1\\right),f\\left(0\\right),f\\left(2\\right)[\/latex], and [latex]f\\left(4\\right)[\/latex].\r\n\r\n13. [latex]f\\left(x\\right)=\\begin{cases}{ 7x+3 }&amp;\\text{ if }&amp;{ x }&lt;{ 0 }\\\\{ 7x+6 }&amp;\\text{ if }&amp;{ x }\\ge{ 0 }\\end{cases}[\/latex]\r\n\r\n14. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}{ -2 }&amp;\\text{ if }&amp;{ x }&lt;{ 2 }\\\\{ 4+|x - 5|}&amp;\\text{ if }&amp;{ x }\\ge{ 2 }\\end{cases}[\/latex]\r\n\r\n15. [latex]f\\left(x\\right)=\\begin{cases}5x&amp; \\text{if}&amp; x&lt;0\\\\ 3&amp; \\text{if}&amp; 0\\le x\\le 3\\\\ {x}^{2}&amp; \\text{if}&amp; x&gt;3\\end{cases}[\/latex]\r\n\r\nFor the following exercises, write the domain for the piecewise function in interval notation.\r\n\r\n16. [latex]f\\left(x\\right)=\\begin{cases}{x+1}&amp;\\text{ if }&amp;{ x }&lt;{ -2 }\\\\{ -2x - 3}&amp;\\text{ if }&amp;{ x }\\ge{ -2 }\\end{cases}[\/latex]\r\n\r\n17. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}{ -2 }&amp;\\text{ if}&amp;{ x }&lt;{ 1 }\\\\{-x}^{2}+{2}&amp;\\text{ if }&amp;{ x }&gt;{ 1 }\\end{cases}[\/latex]\r\n\r\n18. [latex]f\\left(x\\right)=\\begin{cases}{ 2x - 3 }&amp;\\text{ if }&amp;{ x }&lt;{ 0 }\\\\{ -3}{x}^{2}&amp;\\text{ if }&amp;{ x }\\ge{ 2 }\\end{cases}[\/latex]","rendered":"<div class=\"bcc-box bcc-highlight\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li style=\"font-weight: 400;\">Identify base functions<\/li>\n<li>Graph piecewise-defined functions.<\/li>\n<\/ul>\n<\/div>\n<section id=\"fs-id1165135545919\">\n<h1 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Identifying Base Functions<\/span><\/h1>\n<p id=\"fs-id1165137698132\">In this text we will be exploring functions\u2014the shapes of their graphs, their unique characteristics, their algebraic formulas, and how to solve problems with them. When learning to read, we start with the alphabet. When learning to do arithmetic, we start with numbers. When working with functions, it is similarly helpful to have a library of building-block elements. We call these our &#8220;base functions,&#8221; which form a set of basic named functions for which we know the graph, formula, and special properties. Some of these functions are programmed to individual buttons on many calculators. For these definitions we will use [latex]x[\/latex] as the input variable and [latex]y=f\\left(x\\right)[\/latex] as the output variable.<\/p>\n<p id=\"fs-id1165135591070\">We will see these base functions, combinations of base functions, their graphs, and their transformations frequently throughout this book. It will be very helpful if we can recognize these toolkit functions and their features quickly by name, formula, graph, and basic table properties. The graphs and sample table values are included with each function shown below.<\/p>\n<\/section>\n<section id=\"fs-id1165135545919\">\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\" colspan=\"3\">Toolkit Functions<\/th>\n<\/tr>\n<tr>\n<th style=\"text-align: center;\">Name<\/th>\n<th style=\"text-align: center;\">Function<\/th>\n<th style=\"text-align: center;\">Graph<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr valign=\"top\">\n<td>Constant<\/td>\n<td>[latex]f\\left(x\\right)=c[\/latex], where [latex]c[\/latex] is a constant<\/td>\n<td><span id=\"fs-id1165137643159\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005019\/CNX_Precalc_Figure_01_01_018n.jpg\" alt=\"Graph of a constant function.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Identity<\/td>\n<td>[latex]f\\left(x\\right)=x[\/latex]<\/td>\n<td><span id=\"fs-id1165137811013\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_019n.jpg\" alt=\"Graph of a straight line.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Absolute value<\/td>\n<td>[latex]f\\left(x\\right)=|x|[\/latex]<\/td>\n<td><span id=\"fs-id1165135195221\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_020n.jpg\" alt=\"Graph of absolute function.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Quadratic<\/td>\n<td>[latex]f\\left(x\\right)={x}^{2}[\/latex]<\/td>\n<td><span id=\"fs-id1165137501903\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_021n.jpg\" alt=\"Graph of a parabola.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Cubic<\/td>\n<td>[latex]f\\left(x\\right)={x}^{3}[\/latex]<\/td>\n<td><span id=\"fs-id1165137722123\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005020\/CNX_Precalc_Figure_01_01_022n.jpg\" alt=\"Graph of f(x) = x^3.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Reciprocal<\/td>\n<td>[latex]f\\left(x\\right)=\\frac{1}{x}[\/latex]<\/td>\n<td><span id=\"fs-id1165134544980\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_023n.jpg\" alt=\"Graph of f(x)=1\/x.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Reciprocal squared<\/td>\n<td>[latex]f\\left(x\\right)=\\frac{1}{{x}^{2}}[\/latex]<\/td>\n<td><span id=\"fs-id1165137647610\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_024n.jpg\" alt=\"Graph of f(x)=1\/x^2.\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Square root<\/td>\n<td>[latex]f\\left(x\\right)=\\sqrt{x}[\/latex]<\/td>\n<td><span id=\"fs-id1165137863670\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_025n.jpg\" alt=\"Graph of f(x)=sqrt(x).\" \/><\/span><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>Cube root<\/td>\n<td>[latex]f\\left(x\\right)=\\sqrt[3]{x}[\/latex]<\/td>\n<td><span id=\"fs-id1165137838612\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03005021\/CNX_Precalc_Figure_01_01_026n.jpg\" alt=\"Graph of f(x)=x^(1\/3).\" \/><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Equations<\/span><\/h2>\n<table id=\"eip-id1165134393730\" summary=\"..\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr>\n<td>Constant function<\/td>\n<td>[latex]f\\left(x\\right)=c[\/latex], where [latex]c[\/latex] is a constant<\/td>\n<\/tr>\n<tr>\n<td>Identity function<\/td>\n<td>[latex]f\\left(x\\right)=x[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Absolute value function<\/td>\n<td>[latex]f\\left(x\\right)=|x|[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Quadratic function<\/td>\n<td>[latex]f\\left(x\\right)={x}^{2}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Cubic function<\/td>\n<td>[latex]f\\left(x\\right)={x}^{3}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Reciprocal function<\/td>\n<td>[latex]f\\left(x\\right)=\\frac{1}{x}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Reciprocal squared function<\/td>\n<td>[latex]f\\left(x\\right)=\\frac{1}{{x}^{2}}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Square root function<\/td>\n<td>[latex]f\\left(x\\right)=\\sqrt{x}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>Cube root function<\/td>\n<td>[latex]f\\left(x\\right)=\\sqrt[3]{x}[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"\u201ctextbox\u201d\">\n<h2 class=\"mceTemp\">Graphing Piecewise-Defined Functions<\/h2>\n<p>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, <strong>absolute value<\/strong> can be defined as the <strong>magnitude<\/strong>, or <strong>modulus<\/strong>, 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.<\/p>\n<p id=\"fs-id1165137558775\">If we input 0, or a positive value, the output is the same as the input.<\/p>\n<div id=\"fs-id1165135194329\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=x\\text{ if }x\\ge 0[\/latex]<\/div>\n<p id=\"fs-id1165137529947\">If we input a negative value, the output is the opposite of the input.<\/p>\n<div id=\"fs-id1165133112779\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=-x\\text{ if }x<0[\/latex]<\/div>\n<p id=\"fs-id1165137863778\">Because this requires two different processes or pieces, the absolute value function is an example of a piecewise function. A <strong>piecewise function<\/strong> is a function in which more than one formula is used to define the output over different pieces of the domain.<\/p>\n<p id=\"fs-id1165134042316\">We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain &#8220;boundaries.&#8221; 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 $10,000 are taxed at 10%, and any additional income is taxed at 20%. The tax on a total income, S, would be\u00a00.1S if [latex]{S}\\le\\[\/latex] $10,000\u00a0and 1000 + 0.2 (S &#8211; $10,000),\u00a0if S&gt; $10,000.<\/p>\n<div id=\"fs-id1165137531241\" class=\"note textbox\">\n<h3 class=\"title\">A General Note: Piecewise Function<\/h3>\n<p id=\"fs-id1165135504970\">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:<\/p>\n<p style=\"text-align: center;\">[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]<\/p>\n<p>In piecewise notation, the absolute value function is<\/p>\n<p style=\"text-align: center;\">[latex]|x|=\\begin{cases}\\begin{align}&x&&\\text{ if }x\\ge 0\\\\ &-x&&\\text{ if }x<0\\end{align}\\end{cases}[\/latex]<\/p>\n<\/div>\n<div id=\"fs-id1165137768426\" class=\"note precalculus howto textbox\">\n<h3>How To:\u00a0Given a piecewise function, write the formula and identify the domain for each interval.<strong><br \/>\n<\/strong><\/h3>\n<ol id=\"fs-id1165135443772\">\n<li>Identify the intervals for which different rules apply.<\/li>\n<li>Determine formulas that describe how to calculate an output from an input in each interval.<\/li>\n<li>Use braces and if-statements to write the function.<\/li>\n<\/ol>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example 1: Writing a Piecewise Function<\/h3>\n<p>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 <strong>function<\/strong> relating the number of people, [latex]n[\/latex], to the cost, [latex]C[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q525510\">Show Solution<\/span><\/p>\n<div id=\"q525510\" class=\"hidden-answer\" style=\"display: none\">\n<p>Two different formulas will be needed. For <em>n<\/em>-values under 10, C=5n. For values of n that are 10 or greater, C=50.<\/p>\n<p style=\"text-align: center;\">[latex]C(n)=\\begin{cases}\\begin{align}{5n}&\\hspace{5mm}\\text{ if }{0}<{n}<{10}\\\\ 50&\\hspace{5mm}\\text{ if }{n}\\ge 10\\end{align}\\end{cases}[\/latex]<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>The function is represented in Figure 1. 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.<\/p>\n<div style=\"width: 370px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010548\/CNX_Precalc_Figure_01_02_0212.jpg\" alt=\"Graph of C(n).\" width=\"360\" height=\"294\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 1<\/b><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><b><\/b><\/p>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"oembed-1\" title=\"Ex 2:  Graph a Piecewise Defined Function\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/B1jfpiI-QQ8?feature=oembed&#38;rel=0\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<div id=\"Example_01_02_12\" class=\"example\">\n<div id=\"fs-id1165135436662\" class=\"exercise\">\n<div id=\"fs-id1165135436664\" class=\"problem textbox shaded\">\n<h3>Example 2: Working with a Piecewise Function<\/h3>\n<p id=\"fs-id1165137938645\">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.<\/p>\n<div id=\"fs-id1165137660470\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]C\\left(g\\right)=\\begin{cases}\\begin{align}&{25} &&\\hspace{-5mm}\\text{ if }{ 0 }<{ g }<{ 2 }\\\\ &{ 25+10 }\\left(g - 2\\right) &&\\hspace{-5mm}\\text{ if }{ g}\\ge{ 2 }\\end{align}\\end{cases}[\/latex]<\/div>\n<p id=\"fs-id1165135193798\">Find the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q67822\">Show Solution<\/span><\/p>\n<div id=\"q67822\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165134373545\">To find the cost of using 1.5 gigabytes of data, C(1.5), 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.<\/p>\n<p style=\"text-align: center;\">[latex]C(1.5) = \\$25[\/latex]<\/p>\n<p id=\"fs-id1165135440213\">To find the cost of using 4 gigabytes of data, C(4), we see that our input of 4 is greater than 2, so we use the second formula.<\/p>\n<div style=\"text-align: center;\">[latex]C(4)=25 + 10( 4-2) =\\$45[\/latex]<\/div>\n<h4>Analysis of the Solution<\/h4>\n<p>The function is represented in Figure 2. 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.<\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010548\/CNX_Precalc_Figure_01_02_0222.jpg\" alt=\"Graph of C(g)\" width=\"487\" height=\"296\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 2<\/b><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"fs-id1165137600493\" class=\"note precalculus howto textbox\">\n<h3 id=\"fs-id1165135532516\">How To:\u00a0Given a piecewise function, sketch a graph.<\/h3>\n<ol id=\"fs-id1165137588539\">\n<li>Indicate on the <em>x<\/em>-axis the boundaries defined by the intervals on each piece of the domain.<\/li>\n<li>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.<\/li>\n<\/ol>\n<\/div>\n<div id=\"Example_01_02_13\" class=\"example\">\n<div id=\"fs-id1165137781618\" class=\"exercise\">\n<div id=\"fs-id1165135412870\" class=\"problem textbox shaded\">\n<h3>Example 3: Graphing a Piecewise Function<\/h3>\n<p id=\"fs-id1165137838785\">Sketch a graph of the function.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}\\begin{align}&{ x }^{2} &&\\hspace{-5mm}\\text{ if }{ x }\\le{ 1 }\\\\ &{ 3 } &&\\hspace{-5mm}\\text{ if } { 1 }&lt{ x }\\le 2\\\\ &{ x } &&\\hspace{-5mm}\\text{ if }{ x }&gt{ 2 }\\end{align}\\end{cases}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q617292\">Show Solution<\/span><\/p>\n<div id=\"q617292\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165135487150\">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.<\/p>\n<p id=\"fs-id1165137642848\">Below are\u00a0the three components of the piecewise function graphed on separate coordinate systems.<\/p>\n<figure id=\"Figure_01_02_023\"><figcaption>(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]<\/figcaption><div style=\"width: 984px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_023abc2.jpg\" alt=\"Graph of each part of the piece-wise function f(x)\" width=\"974\" height=\"327\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 3<\/b><\/p>\n<\/div>\n<\/figure>\n<p id=\"fs-id1165137676209\">Now that we have sketched each piece individually, we combine them in the same coordinate plane.<span id=\"fs-id1165137646696\"><br \/>\n<\/span><\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_0262.jpg\" alt=\"Graph of the entire function.\" width=\"487\" height=\"333\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 4<\/b><\/p>\n<\/div>\n<h4>Analysis of the Solution<\/h4>\n<p id=\"fs-id1165134389893\">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]\u00a0and [latex]\\left(2,3\\right)[\/latex] are.<\/p>\n<\/div>\n<\/div>\n<p><b><\/b><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p>Graph the following piecewise function.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}{ x}^{3} \\text{ if }{ x }&lt{-1 }\\\\ { -2 } \\text{ if } { -1 }&lt{ x }&lt{ 4 }\\\\ \\sqrt{x} \\text{ if }{ x }&gt{ 4 }\\end{cases}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q836663\">Show Solution<\/span><\/p>\n<div id=\"q836663\" class=\"hidden-answer\" style=\"display: none\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010549\/CNX_Precalc_Figure_01_02_0272.jpg\" alt=\"Graph of f(x).\" width=\"487\" height=\"408\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm32883\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=32883&theme=oea&iframe_resize_id=ohm32883\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<div id=\"fs-id1165137810682\" class=\"note precalculus qa textbox\">\n<h3>Q&amp;A<\/h3>\n<p id=\"fs-id1165137527804\"><strong>Can more than one formula from a piecewise function be applied to a value in the domain?<\/strong><\/p>\n<p id=\"fs-id1165137464467\"><em>No. Each value corresponds to one equation in a piecewise formula.<\/em><\/p>\n<\/div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Concepts<\/span><\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>A piecewise function is described by more than one formula.<\/li>\n<li>A piecewise function can be graphed using each algebraic formula on its assigned subdomain.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Glossary<\/span><\/h2>\n<dl id=\"fs-id1165135487256\" class=\"definition\">\n<dt><strong>piecewise function<\/strong><\/dt>\n<dd id=\"fs-id1165137452169\">a function in which more than one formula is used to define the output<\/dd>\n<\/dl>\n<dl id=\"fs-id1165137863188\" class=\"definition\">\n<dd><\/dd>\n<\/dl>\n<\/div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Section 2.4 Homework Exercises<\/span><\/h2>\n<p>1. How do you graph a piecewise function?<\/p>\n<p>For the following exercises, sketch a graph of the piecewise function. Write the domain in interval notation.<\/p>\n<p>2. [latex]f(x)=\\begin{cases}{x}+{1}&\\text{ if }&{ x }<{ -2 } \\\\{-2x - 3}&\\text{ if }&{ x }\\ge { -2 }\\\\ \\end{cases}[\/latex]\n\n3. [latex]f\\left(x\\right)=\\begin{cases}{2x - 1}&\\text{ if }&{ x }<{ 1 }\\\\ {1+x }&\\text{ if }&{ x }\\ge{ 1 } \\end{cases}[\/latex]\n\n4. [latex]f\\left(x\\right)=\\begin{cases}{x+1}&\\text{ if }&{ x }<{ 0 }\\\\ {x - 1 }&\\text{ if }&{ x }>{ 0 }\\end{cases}[\/latex]<\/p>\n<p>5. [latex]f\\left(x\\right)=\\begin{cases}{3} &\\text{ if }&{ x } <{ 0 }\\\\ \\sqrt{x}&\\text{ if }&{ x }\\ge { 0 }\\end{cases}[\/latex]\n\n6. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}&\\text{ if }&{ x } <{ 0 }\\\\ {1-x}&\\text{ if }&{ x } >{ 0 }\\end{cases}[\/latex]<\/p>\n<p>7. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}&\\text{ if }&{ x }<{ 0 }\\\\ {x+2 }&\\text{ if }&{ x }\\ge { 0 }\\end{cases}[\/latex]\n\n8. [latex]f\\left(x\\right)=\\begin{cases}x+1& \\text{if}& x<1\\\\ {x}^{3}& \\text{if}& x\\ge 1\\end{cases}[\/latex]\n\n9. [latex]f\\left(x\\right)=\\begin{cases}|x|&\\text{ if }&{ x }<{ 2 }\\\\ { 1 }&\\text{ if }&{ x }\\ge{ 2 }\\end{cases}[\/latex]\n\nFor the following exercises, given each function [latex]f[\/latex], evaluate [latex]f\\left(-3\\right),f\\left(-2\\right),f\\left(-1\\right)[\/latex], and [latex]f\\left(0\\right)[\/latex].\n\n10. [latex]f\\left(x\\right)=\\begin{cases}{ x+1 }&\\text{ if }&{ x }<{ -2 }\\\\ { -2x - 3 }&\\text{ if }&{ x }\\ge{ -2 }\\end{cases}[\/latex]\n\n11. [latex]f\\left(x\\right)=\\begin{cases}{ 1 }&\\text{ if }&{ x }\\le{ -3 }\\\\{ 0 }&\\text{ if }&{ x }>{ -3 }\\end{cases}[\/latex]<\/p>\n<p>12. [latex]f\\left(x\\right)=\\begin{cases}{-2}{x}^{2}+{ 3 }&\\text{ if }&{ x }\\le { -1 }\\\\ { 5x } - { 7 } &\\text{ if }&{ x } > { -1 }\\end{cases}[\/latex]<\/p>\n<p>For the following exercises, given each function [latex]f[\/latex], evaluate [latex]f\\left(-1\\right),f\\left(0\\right),f\\left(2\\right)[\/latex], and [latex]f\\left(4\\right)[\/latex].<\/p>\n<p>13. [latex]f\\left(x\\right)=\\begin{cases}{ 7x+3 }&\\text{ if }&{ x }<{ 0 }\\\\{ 7x+6 }&\\text{ if }&{ x }\\ge{ 0 }\\end{cases}[\/latex]\n\n14. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}{ -2 }&\\text{ if }&{ x }<{ 2 }\\\\{ 4+|x - 5|}&\\text{ if }&{ x }\\ge{ 2 }\\end{cases}[\/latex]\n\n15. [latex]f\\left(x\\right)=\\begin{cases}5x& \\text{if}& x<0\\\\ 3& \\text{if}& 0\\le x\\le 3\\\\ {x}^{2}& \\text{if}& x>3\\end{cases}[\/latex]<\/p>\n<p>For the following exercises, write the domain for the piecewise function in interval notation.<\/p>\n<p>16. [latex]f\\left(x\\right)=\\begin{cases}{x+1}&\\text{ if }&{ x }<{ -2 }\\\\{ -2x - 3}&\\text{ if }&{ x }\\ge{ -2 }\\end{cases}[\/latex]\n\n17. [latex]f\\left(x\\right)=\\begin{cases}{x}^{2}{ -2 }&\\text{ if}&{ x }<{ 1 }\\\\{-x}^{2}+{2}&\\text{ if }&{ x }>{ 1 }\\end{cases}[\/latex]<\/p>\n<p>18. [latex]f\\left(x\\right)=\\begin{cases}{ 2x - 3 }&\\text{ if }&{ x }<{ 0 }\\\\{ -3}{x}^{2}&\\text{ if }&{ x }\\ge{ 2 }\\end{cases}[\/latex]\n<\/p>\n","protected":false},"author":264444,"menu_order":4,"template":"","meta":{"_candela_citation":"[]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-17737","chapter","type-chapter","status-publish","hentry"],"part":17684,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapters\/17737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/wp\/v2\/users\/264444"}],"version-history":[{"count":8,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapters\/17737\/revisions"}],"predecessor-version":[{"id":17744,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapters\/17737\/revisions\/17744"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/parts\/17684"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapters\/17737\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/wp\/v2\/media?parent=17737"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/pressbooks\/v2\/chapter-type?post=17737"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/wp\/v2\/contributor?post=17737"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/csn-precalculusv2\/wp-json\/wp\/v2\/license?post=17737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}