{"id":573,"date":"2025-07-10T19:48:50","date_gmt":"2025-07-10T19:48:50","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/precalculus\/?post_type=chapter&#038;p=573"},"modified":"2026-03-12T07:54:04","modified_gmt":"2026-03-12T07:54:04","slug":"domain-and-range-learn-it-5","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/precalculus\/chapter\/domain-and-range-learn-it-5\/","title":{"raw":"Domain and Range: Learn It 5","rendered":"Domain and Range: Learn It 5"},"content":{"raw":"<h2 data-type=\"title\">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\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\n<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\r\n<h3><strong>piecewise function<\/strong><\/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<\/section>We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain \"boundaries.\"\r\n\r\n<section class=\"textbox example\" aria-label=\"Example\">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.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] \u00a0and [latex]1000 + 0.2 (S - $10,000)[\/latex] , if [latex] S&gt; $10,000[\/latex] .<\/section><section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How To: Given a piecewise function, write the formula and identify the domain for each interval.<\/strong>\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<\/section><section class=\"textbox proTip\" aria-label=\"Pro Tip\">The 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<ul>\r\n \t<li>You can read it as a list of if-then statements for the function value.<\/li>\r\n<\/ul>\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<\/section><section class=\"textbox example\" aria-label=\"Example\">A museum charges [latex]$5[\/latex] per person for a guided tour with a group of [latex]1[\/latex] to [latex]9[\/latex] people or a fixed [latex]$50[\/latex] fee for a group of [latex]10[\/latex] or more people. Write a <strong>function<\/strong> relating the number of people, [latex]n[\/latex], to the cost, [latex]C[\/latex].[reveal-answer q=\"668439\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"668439\"]Two different formulas will be needed. For [latex]n[\/latex]-values under [latex]10[\/latex], [latex]C=5n[\/latex]. For values of [latex]n[\/latex] that are [latex]10[\/latex] 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<strong>Analysis of the Solution<\/strong>\r\n\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<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">[ohm_question hide_question_numbers=1]317878[\/ohm_question]<\/section><section class=\"textbox example\" aria-label=\"Example\">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.\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 [latex]1.5[\/latex] gigabytes of data and the cost of using [latex]4[\/latex] 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 [latex]1.5[\/latex] gigabytes of data, [latex]C(1.5)[\/latex], we first look to see which part of the domain our input falls in. Because [latex]1.5[\/latex] is less than [latex]2[\/latex], 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 [latex]4[\/latex] gigabytes of data, [latex]C(4)[\/latex], we see that our input of [latex]4[\/latex] is greater than [latex]2[\/latex], 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<strong>Analysis of the Solution<\/strong>\r\n\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<\/section><section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How To:\u00a0Given a piecewise function, sketch a graph.<\/strong>\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<\/section><section class=\"textbox example\" aria-label=\"Example\">Sketch 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\r\n<strong>Analysis of the Solution<\/strong>\r\n\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<\/section><section class=\"textbox tryIt\" aria-label=\"Try It\">[ohm_question hide_question_numbers=1]317879[\/ohm_question]<\/section><section class=\"textbox interact\" aria-label=\"Interact\">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.\r\n<script src=\"https:\/\/www.youtube.com\/iframe_api \" type=\"text\/javascript\"><\/script>\r\n<p class=\"cc-media-iframe-container\"><iframe id=\"tpm-plugin-dehffhgh-vmqiJV1FqwU\" class=\"cc-media-iframe\" src=\"https:\/\/www.youtube.com\/embed\/vmqiJV1FqwU?enablejsapi=1 \" frameborder=\"0\" data-mce-fragment=\"1\"><\/iframe><\/p>\r\n\r\n<div id=\"3p-plugin-target-dehffhgh-vmqiJV1FqwU\" class=\"p3sdk-target\"><\/div>\r\n<p class=\"cc-media-iframe-container\"><script src=\"\/\/plugin.3playmedia.com\/ajax.js?cc=1&amp;cc_minimizable=1&amp;cc_minimize_on_load=0&amp;cc_multi_text_track=0&amp;cc_overlay=1&amp;cc_searchable=0&amp;embed=ajax&amp;mf=12779138&amp;p3sdk_version=1.11.7&amp;p=20361&amp;player_type=youtube&amp;plugin_skin=dark&amp;target=3p-plugin-target-dehffhgh-vmqiJV1FqwU&amp;vembed=0&amp;video_id=vmqiJV1FqwU&amp;video_target=tpm-plugin-dehffhgh-vmqiJV1FqwU\" type=\"text\/javascript\"><\/script><\/p>\r\nYou can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/College+Algebra+Corequisite\/Transcripts\/Piecewise+Functions+in+Desmos_transcript.txt\" target=\"_blank\" rel=\"noopener\">transcript for \u201cPiecewise Functions in Desmos\u201d here (opens in new window).<\/a>\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<\/section>","rendered":"<h2 data-type=\"title\">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>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<section class=\"textbox keyTakeaway\" aria-label=\"Key Takeaway\">\n<h3><strong>piecewise function<\/strong><\/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<\/section>\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;<\/p>\n<section class=\"textbox example\" aria-label=\"Example\">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.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] \u00a0and [latex]1000 + 0.2 (S - $10,000)[\/latex] , if [latex]S> $10,000[\/latex] .<\/section>\n<section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How To: Given a piecewise function, write the formula and identify the domain for each interval.<\/strong><\/p>\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<\/section>\n<section class=\"textbox proTip\" aria-label=\"Pro Tip\">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<ul>\n<li>You can read it as a list of if-then statements for the function value.<\/li>\n<\/ul>\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<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">A museum charges [latex]$5[\/latex] per person for a guided tour with a group of [latex]1[\/latex] to [latex]9[\/latex] people or a fixed [latex]$50[\/latex] fee for a group of [latex]10[\/latex] 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\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q668439\">Show Solution<\/button><\/p>\n<div id=\"q668439\" class=\"hidden-answer\" style=\"display: none\">Two different formulas will be needed. For [latex]n[\/latex]-values under [latex]10[\/latex], [latex]C=5n[\/latex]. For values of [latex]n[\/latex] that are [latex]10[\/latex] 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<p><strong>Analysis of the Solution<\/strong><\/p>\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<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\"><iframe loading=\"lazy\" id=\"ohm317878\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=317878&theme=lumen&iframe_resize_id=ohm317878&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<section class=\"textbox example\" aria-label=\"Example\">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 [latex]1.5[\/latex] gigabytes of data and the cost of using [latex]4[\/latex] gigabytes of data.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q220698\">Show Solution<\/button><\/p>\n<div id=\"q220698\" class=\"hidden-answer\" style=\"display: none\">\n<p>To find the cost of using [latex]1.5[\/latex] gigabytes of data, [latex]C(1.5)[\/latex], we first look to see which part of the domain our input falls in. Because [latex]1.5[\/latex] is less than [latex]2[\/latex], 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 [latex]4[\/latex] gigabytes of data, [latex]C(4)[\/latex], we see that our input of [latex]4[\/latex] is greater than [latex]2[\/latex], so we use the second formula.<\/p>\n<p style=\"text-align: center;\">[latex]C(4)=25 + 10( 4-2) =$45[\/latex]<\/p>\n<p><strong>Analysis of the Solution<\/strong><\/p>\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<\/section>\n<section class=\"textbox questionHelp\" aria-label=\"Question Help\"><strong>How To:\u00a0Given a piecewise function, sketch a graph.<\/strong><\/p>\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<\/section>\n<section class=\"textbox example\" aria-label=\"Example\">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\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q375071\">Show Solution<\/button><\/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<p><strong>Analysis of the Solution<\/strong><\/p>\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<\/section>\n<section class=\"textbox tryIt\" aria-label=\"Try It\"><iframe loading=\"lazy\" id=\"ohm317879\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=317879&theme=lumen&iframe_resize_id=ohm317879&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<section class=\"textbox interact\" aria-label=\"Interact\">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.<br \/>\n<script src=\"https:\/\/www.youtube.com\/iframe_api\" type=\"text\/javascript\"><\/script><\/p>\n<p class=\"cc-media-iframe-container\"><iframe id=\"tpm-plugin-dehffhgh-vmqiJV1FqwU\" class=\"cc-media-iframe\" src=\"https:\/\/www.youtube.com\/embed\/vmqiJV1FqwU?enablejsapi=1\" frameborder=\"0\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<div id=\"3p-plugin-target-dehffhgh-vmqiJV1FqwU\" class=\"p3sdk-target\"><\/div>\n<p class=\"cc-media-iframe-container\"><script src=\"\/\/plugin.3playmedia.com\/ajax.js?cc=1&amp;cc_minimizable=1&amp;cc_minimize_on_load=0&amp;cc_multi_text_track=0&amp;cc_overlay=1&amp;cc_searchable=0&amp;embed=ajax&amp;mf=12779138&amp;p3sdk_version=1.11.7&amp;p=20361&amp;player_type=youtube&amp;plugin_skin=dark&amp;target=3p-plugin-target-dehffhgh-vmqiJV1FqwU&amp;vembed=0&amp;video_id=vmqiJV1FqwU&amp;video_target=tpm-plugin-dehffhgh-vmqiJV1FqwU\" type=\"text\/javascript\"><\/script><\/p>\n<p>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/College+Algebra+Corequisite\/Transcripts\/Piecewise+Functions+in+Desmos_transcript.txt\" target=\"_blank\" rel=\"noopener\">transcript for \u201cPiecewise Functions in Desmos\u201d here (opens in new window).<\/a><\/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<\/section>\n","protected":false},"author":13,"menu_order":18,"template":"","meta":{"_candela_citation":"[{\"type\":\"copyrighted_video\",\"description\":\"Piecewise Functions in Desmos\",\"author\":\"\",\"organization\":\"Support Account\",\"url\":\"https:\/\/youtu.be\/vmqiJV1FqwU\",\"project\":\"\",\"license\":\"arr\",\"license_terms\":\"Standard YouTube License\"}]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":36,"module-header":"learn_it","content_attributions":[{"type":"copyrighted_video","description":"Piecewise Functions in Desmos","author":"","organization":"Support Account","url":"https:\/\/youtu.be\/vmqiJV1FqwU","project":"","license":"arr","license_terms":"Standard YouTube License"}],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"<script type='text\/javascript' src='https:\/\/www.youtube.com\/iframe_api'><\/script><script type='text\/javascript' src='\/\/plugin.3playmedia.com\/ajax.js?cc=1&cc_minimizable=1&cc_minimize_on_load=0&cc_multi_text_track=0&cc_overlay=1&cc_searchable=0&embed=ajax&mf=12779138&p3sdk_version=1.11.7&p=20361&player_type=youtube&plugin_skin=dark&target=3p-plugin-target-dehffhgh-vmqiJV1FqwU&vembed=0&video_id=vmqiJV1FqwU&video_target=tpm-plugin-dehffhgh-vmqiJV1FqwU'><\/script>\n","media_targets":["tpm-plugin-dehffhgh-vmqiJV1FqwU"]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/573"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/users\/13"}],"version-history":[{"count":8,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/573\/revisions"}],"predecessor-version":[{"id":5863,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/573\/revisions\/5863"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/parts\/36"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/573\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapter-type?post=573"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/contributor?post=573"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/license?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}