{"id":131,"date":"2023-06-21T13:22:36","date_gmt":"2023-06-21T13:22:36","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/chapter\/piecewise-defined-functions\/"},"modified":"2023-08-21T22:11:46","modified_gmt":"2023-08-21T22:11:46","slug":"piecewise-defined-functions","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/chapter\/piecewise-defined-functions\/","title":{"raw":"\u25aa   Piecewise-Defined Functions","rendered":"\u25aa   Piecewise-Defined Functions"},"content":{"raw":"<div class=\"textbox learning-objectives\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li>Write piecewise defined functions.<\/li>\r\n \t<li>Graph piecewise-defined functions.<\/li>\r\n<\/ul>\r\n<\/div>\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\r\nIf we input 0, or a positive value, the output is the same as the input.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=x\\text{ if }x\\ge 0[\/latex]<\/p>\r\nIf we input a negative value, the output is the opposite of the input.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=-x\\text{ if }x&lt;0[\/latex]<\/p>\r\nBecause 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.\r\n\r\nWe 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\u00a0[latex]0.1S[\/latex] if [latex]{S}\\le$10,000[\/latex] \u00a0and [latex]1000 + 0.2 (S - $10,000)[\/latex] ,\u00a0if [latex] S&gt; $10,000[\/latex] .\r\n<div class=\"textbox\">\r\n<h3>A General Note: Piecewise Functions<\/h3>\r\nA 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:\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}x&amp;\\text{ if }x\\ge 0\\\\ -x&amp;\\text{ if }x&lt;0\\end{align}\\end{cases}[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div class=\"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>\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 examples\">\r\n<h3>tip for success: piecewise functions<\/h3>\r\nThe curly brace that appears in a piecewise formula doesn't denote a set, since there is no matching brace on the other side of the statement. Instead, it indicates that the right hand side of the function formula is made of different pieces, each depending on the input.\r\n\r\nYou can read it as a list of if-then statements for the function value.\r\n\r\nPiecewise functions are challenging to understand. Give yourself time to work with them repeatedly on paper, evaluating and graphing different functions. It's natural to need to work many problems before you feel comfortable with them.\r\n\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: 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=\"668439\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"668439\"]\r\n\r\nTwo 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].\r\n<p style=\"text-align: center;\">[latex]C(n)=\\begin{cases}\\begin{align}{5n}&amp;\\hspace{2mm}\\text{if}\\hspace{2mm}{0}&lt;{n}&lt;{10}\\\\ 50&amp;\\hspace{2mm}\\text{if}\\hspace{2mm}{n}\\ge 10\\end{align}\\end{cases}[\/latex]<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\nThe 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<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193627\/CNX_Precalc_Figure_01_02_0212.jpg\" alt=\"Graph of C(n).\" width=\"360\" height=\"294\" \/>\r\n\r\n[\/hidden-answer]\r\n\r\n[ohm_question height=\"240\"]111812[\/ohm_question]\r\n\r\n[ohm_question height=\"230\"]93008[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Working with a Piecewise Function<\/h3>\r\nA cell phone company uses the function below to determine the cost, [latex]C[\/latex], in dollars for [latex]g[\/latex] gigabytes of data transfer.\r\n<p style=\"text-align: center;\">[latex]C\\left(g\\right)=\\begin{cases}\\begin{align}{25} \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ 0 }&lt;{ g }&lt;{ 2 }\\\\ { 25+10 }\\left(g - 2\\right) \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ g}\\ge{ 2 }\\end{align}\\end{cases}[\/latex]<\/p>\r\nFind the cost of using 1.5 gigabytes of data and the cost of using 4 gigabytes of data.\r\n\r\n[reveal-answer q=\"220698\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"220698\"]\r\n\r\nTo 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.\r\n<p style=\"text-align: center;\">[latex]C(1.5) = $25[\/latex]<\/p>\r\nTo 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.\r\n<p style=\"text-align: center;\">[latex]C(4)=25 + 10( 4-2) =$45[\/latex]<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\nWe 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<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193630\/CNX_Precalc_Figure_01_02_0222.jpg\" alt=\"Graph of C(g)\" width=\"487\" height=\"296\" \/>\r\n\r\n[\/hidden-answer]\r\n\r\n[ohm_question height = \"300\"]1657[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>How To:\u00a0Given a piecewise function, sketch a graph.<\/h3>\r\n<ol>\r\n \t<li>Indicate on the [latex]x[\/latex]-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\nhttps:\/\/www.youtube.com\/watch?v=B1jfpiI-QQ8&amp;feature=youtu.be\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Graphing a Piecewise Function<\/h3>\r\nSketch a graph of the function.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}\\begin{align}{ x }^{2} \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ x }\\le{ 1 }\\\\ { 3 } \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm} { 1 }&amp;lt{ x }\\le 2\\\\ { x } \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ x }&amp;gt{ 2 }\\end{align}\\end{cases}[\/latex]<\/p>\r\n[reveal-answer q=\"375071\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"375071\"]\r\n\r\nEach 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.\r\n\r\nBelow are\u00a0the three components of the piecewise function graphed on separate coordinate systems.\r\n\r\n(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]\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193632\/CNX_Precalc_Figure_01_02_023abc2.jpg\" alt=\"Graph of each part of the piece-wise function f(x)\" width=\"974\" height=\"327\" \/>\r\n\r\nNow that we have sketched each piece individually, we combine them in the same coordinate plane.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193635\/CNX_Precalc_Figure_01_02_0262.jpg\" alt=\"Graph of the entire function.\" width=\"487\" height=\"333\" \/>\r\n<h4>Analysis of the Solution<\/h4>\r\nNote 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.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question height=\"600\"]32883[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nYou can use an online graphing calculator to graph piecewise defined functions. Watch this tutorial video to learn how within Desmos. Other online graphing tools will be slightly different.\r\n\r\nhttps:\/\/youtu.be\/vmqiJV1FqwU\r\n\r\nGraph the following piecewise function with an online graphing calculator.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}\\begin{align}{ x}^{3} \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ x }&amp;lt{-1 }\\\\ { -2 } \\hspace{2mm}&amp;\\text{ if } \\hspace{2mm}{ -1 }&amp;lt{ x }&amp;lt{ 4 }\\\\ \\sqrt{x} \\hspace{2mm}&amp;\\text{ if }\\hspace{2mm}{ x }&amp;gt{ 4 }\\end{align}\\end{cases}[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try it<\/h3>\r\n[ohm_question height=\"600\"]32883[\/ohm_question]\r\n\r\n[ohm_question height=\"590\"]32883[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Q&amp;A<\/h3>\r\n<strong>Can more than one formula from a piecewise function be applied to a value in the domain?<\/strong>\r\n\r\n<em>No. Each value corresponds to one equation in a piecewise formula.\r\n<\/em>\r\n\r\n<\/div>","rendered":"<div class=\"textbox learning-objectives\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li>Write piecewise defined functions.<\/li>\n<li>Graph piecewise-defined functions.<\/li>\n<\/ul>\n<\/div>\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>If we input 0, or a positive value, the output is the same as the input.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=x\\text{ if }x\\ge 0[\/latex]<\/p>\n<p>If we input a negative value, the output is the opposite of the input.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=-x\\text{ if }x<0[\/latex]<\/p>\n<p>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>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 [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\u00a0[latex]0.1S[\/latex] if [latex]{S}\\le$10,000[\/latex] \u00a0and [latex]1000 + 0.2 (S - $10,000)[\/latex] ,\u00a0if [latex]S> $10,000[\/latex] .<\/p>\n<div class=\"textbox\">\n<h3>A General Note: Piecewise Functions<\/h3>\n<p>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 class=\"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>\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 examples\">\n<h3>tip for success: piecewise functions<\/h3>\n<p>The curly brace that appears in a piecewise formula doesn&#8217;t denote a set, since there is no matching brace on the other side of the statement. Instead, it indicates that the right hand side of the function formula is made of different pieces, each depending on the input.<\/p>\n<p>You can read it as a list of if-then statements for the function value.<\/p>\n<p>Piecewise functions are challenging to understand. Give yourself time to work with them repeatedly on paper, evaluating and graphing different functions. It&#8217;s natural to need to work many problems before you feel comfortable with them.<\/p>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: 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=\"q668439\">Show Solution<\/span><\/p>\n<div id=\"q668439\" class=\"hidden-answer\" style=\"display: none\">\n<p>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].<\/p>\n<p style=\"text-align: center;\">[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]<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>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<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193627\/CNX_Precalc_Figure_01_02_0212.jpg\" alt=\"Graph of C(n).\" width=\"360\" height=\"294\" \/><\/p>\n<\/div>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"ohm111812\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=111812&theme=oea&iframe_resize_id=ohm111812&show_question_numbers\" width=\"100%\" height=\"240\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" id=\"ohm93008\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=93008&theme=oea&iframe_resize_id=ohm93008&show_question_numbers\" width=\"100%\" height=\"230\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: Working with a Piecewise Function<\/h3>\n<p>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<p style=\"text-align: center;\">[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]<\/p>\n<p>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=\"q220698\">Show Solution<\/span><\/p>\n<div id=\"q220698\" class=\"hidden-answer\" style=\"display: none\">\n<p>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.<\/p>\n<p style=\"text-align: center;\">[latex]C(1.5) = $25[\/latex]<\/p>\n<p>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.<\/p>\n<p style=\"text-align: center;\">[latex]C(4)=25 + 10( 4-2) =$45[\/latex]<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>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<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193630\/CNX_Precalc_Figure_01_02_0222.jpg\" alt=\"Graph of C(g)\" width=\"487\" height=\"296\" \/><\/p>\n<\/div>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"ohm1657\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=1657&theme=oea&iframe_resize_id=ohm1657&show_question_numbers\" width=\"100%\" height=\"300\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>How To:\u00a0Given a piecewise function, sketch a graph.<\/h3>\n<ol>\n<li>Indicate on the [latex]x[\/latex]-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<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 class=\"textbox exercises\">\n<h3>Example: Graphing a Piecewise Function<\/h3>\n<p>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{2mm}&\\text{ if }\\hspace{2mm}{ x }\\le{ 1 }\\\\ { 3 } \\hspace{2mm}&\\text{ if }\\hspace{2mm} { 1 }&lt{ x }\\le 2\\\\ { x } \\hspace{2mm}&\\text{ if }\\hspace{2mm}{ 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=\"q375071\">Show Solution<\/span><\/p>\n<div id=\"q375071\" class=\"hidden-answer\" style=\"display: none\">\n<p>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>Below are\u00a0the three components of the piecewise function graphed on separate coordinate systems.<\/p>\n<p>(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]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193632\/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>Now that we have sketched each piece individually, we combine them in the same coordinate plane.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/18193635\/CNX_Precalc_Figure_01_02_0262.jpg\" alt=\"Graph of the entire function.\" width=\"487\" height=\"333\" \/><\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>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<\/div>\n<div class=\"textbox key-takeaways\">\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&show_question_numbers\" width=\"100%\" height=\"600\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>You can use an online graphing calculator to graph piecewise defined functions. Watch this tutorial video to learn how within Desmos. Other online graphing tools will be slightly different.<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-2\" title=\"Piecewise Functions in Desmos\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/vmqiJV1FqwU?feature=oembed&#38;rel=0\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Graph the following piecewise function with an online graphing calculator.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=\\begin{cases}\\begin{align}{ x}^{3} \\hspace{2mm}&\\text{ if }\\hspace{2mm}{ x }&lt{-1 }\\\\ { -2 } \\hspace{2mm}&\\text{ if } \\hspace{2mm}{ -1 }&lt{ x }&lt{ 4 }\\\\ \\sqrt{x} \\hspace{2mm}&\\text{ if }\\hspace{2mm}{ x }&gt{ 4 }\\end{align}\\end{cases}[\/latex]<\/p>\n<\/div>\n<div class=\"textbox key-takeaways\">\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&show_question_numbers\" width=\"100%\" height=\"600\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" id=\"ohm32883\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=32883&theme=oea&iframe_resize_id=ohm32883&show_question_numbers\" width=\"100%\" height=\"590\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>Q&amp;A<\/h3>\n<p><strong>Can more than one formula from a piecewise function be applied to a value in the domain?<\/strong><\/p>\n<p><em>No. Each value corresponds to one equation in a piecewise formula.<br \/>\n<\/em><\/p>\n<\/div>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-131\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Original<\/div><ul class=\"citation-list\"><li>Revision and Adaptation. <strong>Provided by<\/strong>: Lumen Learning. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><li>Piecewise functions in Desmos. <strong>Authored by<\/strong>: Lumen Learning. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"https:\/\/youtu.be\/vmqiJV1FqwU\">https:\/\/youtu.be\/vmqiJV1FqwU<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><li>Question ID 11812. <strong>Authored by<\/strong>: Lumen Learning. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><li>QUestion ID 93008. <strong>Authored by<\/strong>: Jenck,Michael for Lumen Learning. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><\/ul><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Shared previously<\/div><ul class=\"citation-list\"><li>College Algebra. <strong>Authored by<\/strong>: Abramson, Jay et al.. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\">http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: Download for free at http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2<\/li><li>Question ID 1657. <strong>Authored by<\/strong>: WebWork-Rochester, mb Sousa,James. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><li>QuestionID 32883. <strong>Authored by<\/strong>: Smart, Jim. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":395986,"menu_order":16,"template":"","meta":{"_candela_citation":"[{\"type\":\"original\",\"description\":\"Revision and Adaptation\",\"author\":\"\",\"organization\":\"Lumen Learning\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"cc\",\"description\":\"College Algebra\",\"author\":\"Abramson, Jay et al.\",\"organization\":\"OpenStax\",\"url\":\"http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"Download for free at http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\"},{\"type\":\"original\",\"description\":\"Piecewise functions in Desmos\",\"author\":\"Lumen Learning\",\"organization\":\"\",\"url\":\"https:\/\/youtu.be\/vmqiJV1FqwU\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"original\",\"description\":\"Question ID 11812\",\"author\":\"Lumen Learning\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"original\",\"description\":\"QUestion ID 93008\",\"author\":\"Jenck,Michael for Lumen Learning\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"cc\",\"description\":\"Question ID 1657\",\"author\":\"WebWork-Rochester, mb Sousa,James\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"cc\",\"description\":\"QuestionID 32883\",\"author\":\"Smart, Jim\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"}]","CANDELA_OUTCOMES_GUID":"417bef86-be86-4ce4-af0a-71660837a3f2","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-131","chapter","type-chapter","status-publish","hentry"],"part":115,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapters\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/wp\/v2\/users\/395986"}],"version-history":[{"count":3,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapters\/131\/revisions"}],"predecessor-version":[{"id":1370,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapters\/131\/revisions\/1370"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/parts\/115"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapters\/131\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/pressbooks\/v2\/chapter-type?post=131"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/wp\/v2\/contributor?post=131"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/gsu-collegealgebra\/wp-json\/wp\/v2\/license?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}