Algebra · real student question

Let g(x) equal 2x - 4 when -2 is less than x and x is at most 5, and equal x^2 - 2x + 3 when x is greater than 5. Evaluate g(-1), g(7), g(0) and g(-2).

Question

Evaluate the piecewise defined function

g(x)={2x4if 2<x5x22x+3if x>5g(x)=\begin{cases}2x-4 & \text{if } -2<x\le 5\\ x^{2}-2x+3 & \text{if } x>5\end{cases}

at (a) g(1)g(-1), (b) g(7)g(7), (c) g(0)g(0), (d) g(2)g(-2).

Step-by-step solution

  1. Adopt the right order of operations for a piecewise function. For each input, first decide which branch applies by testing the conditions, and only then substitute. Substituting into the wrong branch is the whole failure mode here.

  2. (a) g(-1). Is 2<15-2<-1\le 5? Yes, so use the first branch:

    g(1)=2(1)4=24=6.g(-1)=2(-1)-4=-2-4=-6.

  3. (b) g(7). Is 7>57>5? Yes, so use the second branch:

    g(7)=722(7)+3=4914+3=38.g(7)=7^{2}-2(7)+3=49-14+3=38.

  4. (c) g(0). Is 2<05-2<0\le 5? Yes, first branch again:

    g(0)=2(0)4=4.g(0)=2(0)-4=-4.

  5. (d) g(-2) — check the inequality symbols carefully. The first branch requires 2<x-2<x, a strict inequality, so x=2x=-2 does not qualify. The second requires x>5x>5, which 2-2 also fails. No branch covers 2-2, so

    g(2) is undefined.g(-2)\ \text{is undefined.}

    Had the condition read 2x5-2\le x\le 5, the answer would have been 2(2)4=82(-2)-4=-8. The single character is the whole question.

  6. State the domain that follows. The two conditions together cover (2,5](5,)=(2,)(-2,5]\cup(5,\infty)=(-2,\infty), so gg is defined for every x>2x>-2 and nowhere else. Note the pieces even join up: the first branch reaches 2(5)4=62(5)-4=6 at x=5x=5, and the second approaches 2510+3=1825-10+3=18 just past it, so the graph jumps at x=5x=5.

Answer

g(1)=6,g(7)=38,g(0)=4,g(2) undefinedg(-1)=-6,\quad g(7)=38,\quad g(0)=-4,\quad g(-2)\ \text{undefined}

Need to solve a different problem like this? Open the solver →