Mastering Piecewise Function Graphs: A Comprehensive Guide

Function

\[ f(x) = x^2 – 2x + 1, \quad x \in [0, 3] \]

Explanation

The function \(f(x) = x^2 – 2x + 1\) is a quadratic function defined for \(x\) in the interval [0, 3]. This means that we are interested in the graph of the function only where \(x\) is between 0 and 3, inclusive.

To graph this function over this domain, we first plot the general shape of \(f(x) = x^2 – 2x + 1\). This function is a parabola with its vertex at \(x = 1\).

Next, we narrow down our graph to only include the section where \(x\) is in the interval [0, 3]. We do this by plotting a few key points within this domain such as \((0, f(0))\), \((1, f(1))\), \((2, f(2))\), and \((3, f(3))\).

Because the interval is closed (i.e., includes the endpoints 0 and 3), we plot these points as solid dots on the graph. So, we would have solid dots at the points \((0, 1)\), \((1, 0)\), \((2, 1)\), and \((3, 4)\).

Finally, connect these points with a smooth curve to form the graph of the function over the specified domain.

Function

\[ f(x) = \begin{cases} 2x + 3 & \text{if } x \leq 1 \\ -x + 5 & \text{if } x > 1 \end{cases} \]

Explanation

The function \(f(x)\) is a piecewise function composed of two parts:

1. The first part: \(2x + 3\), \(x \leq 1\)

To graph this part, plot a few points where \(x \leq 1\), such as \(x = -1, 0, 1\), and draw a line that connects these points. Since the condition is \(x \leq 1\), the value of the function at \(x = 1\) is included. Thus, we mark the point \((1, 5)\) (as \(f(1) = 2*1 + 3 = 5\)) with a solid dot.

2. The second part: \(-x + 5\), \(x > 1\)

To graph this part, plot a few points where \(x > 1\), such as \(x = 2, 3, 4\), and draw a line that connects these points. Since the condition is \(x > 1\), the value of the function at \(x = 1\) is not included. So, the point \((1, 4)\) (if it was defined here as \(f(1) = -1 + 5 = 4\)) would have a hollow dot.

When graphing, remember that the solid dot will ‘override’ the hollow dot at \(x = 1\). The line part from \(-x + 5\) should appear to start at \(x = 1\) but with a hollow dot. The resultant graph is a representation of the given piecewise function.

\[ f(x) = \begin{cases} x^3 & \text{if } x < 2, \\ \sqrt{x-2} & \text{if } x \geq 2. \end{cases} \]

Steps to graph the function:

1. Graph \(x^3\) for \(x < 2\). The cubic function \(x^3\) has a S-shape curve that bends downwards to the left of \(x = 2\) and upwards to the right. When \(x < 2\), we are considering only the left part of the curve, which extends down and to the left without bound. The point (2,8), resulting from substituting \(x = 2\) into \(x^3\), is represented as an open circle to show that the curve comes close to but doesn’t reach this point.

2. Graph \(\sqrt{x-2}\) for \(x \geq 2\). This square root function, \( \sqrt{x-2} \), has the shape of a curve that begins at \(x = 2\) and gradually increases as \(x\) moves to the right. The slope of this curve becomes less steep as you move further right. The graph starts at the point (2,0), represented by a filled circle because the point is included in this part of the function.
\[ f(x) = \begin{cases} x^2 & \text{if } x < -1, \\ 2x + 1 & \text{if } -1 \leq x < 2, \\ 3x – 2 & \text{if } x \geq 2. \end{cases} \]

Steps to graph the function:

1. Graph \(x^2\) for \(x < -1\). Here, the point (-1,1) comes from substituting \(x = -1\) into the function \(x^2\), which yields \(1\). Since the domain for this part of the function doesn’t include \(x = -1\), this point is represented as an open circle. This is a quadratic function opening upwards, so it will resemble a “U”. Only the left part of the function is graphed because \(x < -1\).

2. Graph \(2x + 1\) for \(-1 \leq x < 2\). The point at (-1,1) comes from substituting \(x = -1\) into the function \(2x + 1\), which yields \(1\). Since the domain for this part of the function includes \(x = -1\), this point is represented as a filled circle. The point at (2,5) comes from substituting \(x = 2\) into the function \(2x + 1\), which yields \(5\). As \(x = 2\) is not in the domain for this part of the function, this point is represented as an open circle. This function is a linear function with a positive slope and will look like a line rising from left to right. Only the segment of this line between \(x = -1\) and \(x = 2\) is graphed.

3. Graph \(3x – 2\) for \(x \geq 2\). The point at (2,4) comes from substituting \(x = 2\) into the function \(3x – 2\), which yields \(4\). Since the domain for this part of the function includes \(x = 2\), this point is represented as a filled circle. This function is a linear function with a steeper positive slope than the previous part. The graph will include the portion of the line for \(x \geq 2\).
\[ f(x) = \begin{cases} 3x + 2 & \text{if } x < 0, \\ x^2 & \text{if } 0 \leq x < 3, \\ -x + 6 & \text{if } x \geq 3. \end{cases} \]

Steps to graph the function:

1. Graph \(3x + 2\) for \(x < 0\). Here, the point (0,2) comes from substituting \(x = 0\) into the function \(3x + 2\), which yields \(2\). Since the domain for this part of the function doesn’t include \(x = 0\), this point is represented as an open circle. This is a linear function with a positive slope, so it will resemble a rising line. Only the left part of the function is graphed because \(x < 0\).

2. Graph \(x^2\) for \(0 \leq x < 3\). The point at (0,0) comes from substituting \(x = 0\) into the function \(x^2\), which yields \(0\). Since the domain for this part of the function includes \(x = 0\), this point is represented as a filled circle. The point at (3,9) comes from substituting \(x = 3\) into the function \(x^2\), which yields \(9\). As \(x = 3\) is not in the domain for this part of the function, this point is represented as an open circle. This function is a quadratic function opening upwards, and will look like a “U”. Only the segment of this curve between \(x = 0\) and \(x = 3\) is graphed.

3. Graph \(-x + 6\) for \(x \geq 3\). The point at (3,3) comes from substituting \(x = 3\) into the function \(-x + 6\), which yields \(3\). Since the domain for this part of the function includes \(x = 3\), this point is represented as a filled circle. This function is a linear function with a negative slope. The graph will include the portion of the line for \(x \geq 3\).
\[ f(x) = \begin{cases} \sin(x) & \text{if } x < 0, \\ e^x & \text{if } 0 \leq x < 1, \\ \ln(x) & \text{if } x \geq 1. \end{cases} \]

Steps to graph the function:

1. Graph \(\sin(x)\) for \(x < 0\). The sine function resembles waves on an ocean or a smoothly coiled spring, moving up and down around the x-axis. Because we’re only looking at \(x < 0\), imagine this as the left half of a spring or waves moving to the left. The open circle at (0,0) shows that the wave just touches the origin but doesn’t quite reach it.

2. Graph \(e^x\) for \(0 \leq x < 1\). This exponential function is like an uphill hiking trail, starting out gentle but getting steeper as you move right. For \(0 \leq x < 1\), imagine it as the first part of the hike, from the trailhead at (0,1) – a filled circle because we start here – to a point at (1,e) – an open circle, because we don’t include this point in the hike. The trail is always increasing, never flat or decreasing.

3. Graph \(\ln(x)\) for \(x \geq 1\). This logarithmic function is like a leisurely hill slope, it gets steeper at first, but as you keep going right, the slope gets less and less steep. For \(x \geq 1\), we’re starting at the point where the slope begins to lessen, at (1,0) – a filled circle because we start here. This hill continues to rise as we go right, but the slope will grow more gentle.
\[ f(x) = \begin{cases} -2x^2 + 3 & \text{if } x < -1, \\ 5 & \text{if } -1 \leq x < 2, \\ |x – 3| & \text{if } x \geq 2. \end{cases} \]

Steps to graph the function:

1. Graph \(-2x^2 + 3\) for \(x < -1\). This function is a downward-opening parabola, which might look like an upside-down “U” or a frowning face. For \(x < -1\), you’ll graph the left part of this parabola. The open circle at (-1,5) indicates that the graph approaches but doesn’t include the point at \(x = -1\).

2. Graph \(5\) for \(-1 \leq x < 2\). This is a constant function, meaning it’s a straight, horizontal line at the height of 5. It doesn’t matter what x is, y is always 5. This might look like a perfectly level balance beam, or a tightrope walker’s wire. The filled circle at (-1,5) means that the graph starts from \(x = -1\) (included), and the open circle at (2,5) means that the graph stops just before \(x = 2\) (not included).

3. Graph \(|x – 3|\) for \(x \geq 2\). This function looks like a “V” or an open book, with the bottom point of the “V” at (3,0). For \(x \geq 2\), you’re looking at the right page of the book or the right arm of the “V”. The filled circle at (2,1) indicates that the graph starts from the point where \(x = 2\).

eryday scenarios.

Application of Piecewise Function: Cost Calculation

Imagine you are hiring a plumber to fix a leak in your home. The plumber charges a flat rate for the first hour of work, and a different rate for any additional hours. Let’s use a piecewise function to calculate the total cost based on the hours worked:

\[ \text{Cost}(h) = \begin{cases} \$50 & \text{if } h \leq 1, \\ \$50 + 25(h-1) & \text{if } h > 1. \end{cases} \]

Explanation:

The piecewise function allows us to calculate the cost of the plumber’s service based on the number of hours worked (\(h\)). Let’s carefully examine the construction of the second expression to avoid any confusion:

First Hour (\(h \leq 1\)):

If the plumber works for 1 hour or less, the cost is a flat rate of \$50. This covers the initial hour of service, which has a fixed price regardless of the time taken to fix the leak.

Additional Hours (\(h > 1\)):

For any additional hours beyond the first hour, the cost is calculated as follows:

  • We start with the flat rate of \$50 (which covers the first hour) and then add an additional cost for each hour beyond the first.
  • The additional cost for each extra hour is \$25, meaning the plumber charges \$25 for each hour beyond the first hour.
  • To find the total additional cost for \(h\) hours beyond the first hour, we subtract 1 from \(h\) to account for the first hour (since that is already covered by the flat rate), and then multiply the result by \$25.
  • The expression \(25(h-1)\) represents the total additional cost for the extra hours of service.
  • We then add this additional cost to the initial flat rate of \$50, giving us the total cost of the plumber’s service for \(h\) hours.

By using this piecewise function, you can accurately calculate the cost of the plumber’s service, making it easier to plan and budget for the repair. The function ensures that the appropriate pricing is applied to the specific number of hours worked, providing a fair and transparent cost calculation for the service rendered.