Piecewise Function Math Example 3

Follow the full solution, then compare it with the other examples linked below.

Example 3

easy
Given g(x)={โˆ’xx<โˆ’1x2โˆ’1โ‰คxโ‰ค25x>2g(x) = \begin{cases} -x & x < -1 \\ x^2 & -1 \leq x \leq 2 \\ 5 & x > 2 \end{cases}, evaluate g(โˆ’2)g(-2), g(1)g(1), and g(3)g(3).

Solution

  1. 1
    g(โˆ’2)g(-2): โˆ’2<โˆ’1-2 < -1, so g(โˆ’2)=โˆ’(โˆ’2)=2g(-2) = -(-2) = 2.
  2. 2
    g(1)g(1): โˆ’1โ‰ค1โ‰ค2-1 \leq 1 \leq 2, so g(1)=12=1g(1) = 1^2 = 1. g(3)g(3): 3>23 > 2, so g(3)=5g(3) = 5.

Answer

g(โˆ’2)=2,โ€…โ€Šg(1)=1,โ€…โ€Šg(3)=5g(-2)=2,\; g(1)=1,\; g(3)=5
Each input value must be tested against the boundary conditions in the piecewise definition. Once the correct interval is identified, simply apply the associated rule.

About Piecewise Function

A piecewise function is defined by different formulas on different non-overlapping intervals of its domain, with the applicable formula determined by the input value.

Learn more about Piecewise Function โ†’

More Piecewise Function Examples