Skip to main content
Mathematics LibreTexts

1.5E: Piecewise-Defined Functions (Exercises)

  • Page ID
    99697
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Section 1.5 Exercises

    1.  Let \( f(x)=\left\{\begin{array}{ccc} {x+1} & {if} & {x<2} \\ {5} & {if} & {x\ge 2} \end{array}\right. \)

    a) Evaluate \(f(1)\), \(f(2)\), \(f(3)\), and \(f(4)\)

    b) Sketch a graph of the piecewise defined function.

    2. Let  \( f(x=\left\{\begin{array}{ccc} {4} & {if} & {x<0} \\ {\sqrt{x} } & {if} & {x\ge 0} \end{array}\right.\)

    a) Evaluate \(f(-1)\), \(f(0)\), \(f(1)\), and \(f(2)\)

    b) Sketch a graph of the piecewise defined function.

    3.  Let \( f(x)=\left\{\begin{array}{ccc} {3x-1 } & {if} & {x<1} \\ {x+2} & {if} & {x\ge 1} \end{array}\right. \)

    a) Evaluate \(f(0)\), \(f(1)\), \(f(2)\), and \(f(3)\)

    b) Sketch a graph of the piecewise defined function.

    4. Let \( f(x)=\left\{\begin{array}{ccc} {x^2} & {if} & {x<1} \\ {-2x+5 } & {if} & {x\ge 1} \end{array}\right.\)

    a) Evaluate \(f(0)\), \(f(1)\), \(f(2)\), and \(f(3)\)

    b) Sketch a graph of the piecewise defined function.

    5. Sketch a graph of the piecewise defined function \( f(x)=\left\{\begin{array}{ccc} {3} & {if} & {x\le -2} \\ {-x+1} & {if} & {-2<x\le 1} \\ {x+2} & {if} & {x>1} \end{array}\right.\).  Then identify the domain and range of \(f\).

    6. Sketch a graph of the piecewise defined function  \( f(x)=\left\{\begin{array}{ccc} {2x+1} & {if} & {x\le 0} \\ {x+1} & {if} & {0<x\le 2} \\ {3} & {if} & {x>2} \end{array}\right.\)  Then identify the domain and range of \(f\).

    7. Write a formula for the piecewise function graphed below.

    a) A piecewise defined function where y = 2 on [-6,-1], y = -2 on (-1,2], and y = -4 on (2,4]    b) A piecewise defined function where y = -4 on [-6,-2], y = 5 on (-2,1], and y = -3 on (1,5]

    8. Write a formula for the piecewise function graphed below.

    a) A piecewise defined function where y = 3 below x = 0 and upward opening parabola above x =0    b) A piecewise defined function where y is a downward sloping line below x = 0, is an upward sloping line on [0,2], and y = 3 above x = 2

    9.  Write a formula for the piecewise function graphed below.

    a)  A piecewise defined function where one piece is a line that increases from (-3,-3) to (-1,1), the next is a line from (-1,-2) to (2,1), and the third piece is a line from (2,-2) to (5,-2).   b) A piecewise defined function where one piece is a line from (-6,1) to (-2,-1), the next is a line from (-2,-2) to (1,-2), and the third piece is a line from (1,-3) to (6,4.5).

    10. Suppose a commercial cloud data plan charges $5 per year plus $2.5 per GB for the first 10 GB and then $1.5 per GB for each additional GB of data.  Find a piecewise defined formula for the yearly cost \(C\) in terms of the data load \(D\) in GB.

    11. Suppose a painting company charges $2.40 per \(\text{ft}^2\) to paint a house of up to 2000 \(\text{ft}^2\).  For houses with more than 2000 \(\text{ft}^2\) to paint, they charge $2.10 per \(\text{ft}^2\) for each additional square foot of area above 2000 \(\text{ft}^2\). Find a piecewise defined formula for the yearly cost \(C\) in terms of the square footage painted \(A\).

    12. Suppose an author of a new book receives $30,000 to write it. For the first 50,000 copies sold, they will make $1.24 per copy sold.  After that, they will make  $1.02 per copy sold.  Find a piecewise defined formula for the amount made \(A\) in terms of the number of book copies sold \(b\).

     
    Answer

    1. a) \(f(1)=2\),    \(f(2)=5\),    \(f(3)=5\), and    \(f(4)=5\)

        b) the graph of a piecewise defined function

    3. a) \(f(0)=-1\)    \(f(1)=3\)    \(f(2)=4\)    \(f(3)=4\)   

        b) the graph of a piecewise defined function

    5. the graph of a piecewise defined function

    7. a) \(f(x) = \begin{cases} 2 & if & -6 \le x \le -1 \\ -2 & if & -1 < x \le 2 \\ -4 & if & 2 < x \le 4 \end{cases}\)

       b) \(f(x) = \begin{cases} -4 & if & -6 \le x \le -2 \\ 5 & if & -2 < x \le 1 \\ -3 & if & 1 < x \le 5 \end{cases}\)

    9. a) \(f(x) = \begin{cases} 2x + 3 & if & -3 \le x < -1 \\ x - 1 & if & -1\le x \le 2 \\ -2 & if & 2 < x \le 5 \end{cases}\)

    11.  \(C =f(A) = \begin{cases} 2.40A & if & 0 \le A \le 2000 \\ 2.10A+600 & if & 2000 < A  \end{cases}\)


    1.5E: Piecewise-Defined Functions (Exercises) is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Jason Gardner.