# A function is defined by f(x) = $$\left\{\begin{matrix} x + 2 \enspace \enspace if \enspace x < 0\\ 1 – x \enspace \enspace if \enspace x > 0 \end{matrix}\right.$$, Concluate f(-1), f(3) and sketch graph.

Solution:

Let f(x) = $$\left\{\begin{matrix} x + 2 \enspace \enspace if \enspace x < 0\\ 1 – x \enspace \enspace if \enspace x > 0 \end{matrix}\right.$$

Then

f(-1) = (-1) + 2  =  1          (We have used x  + 2 since -1 < 0, and when x < 0 then function f(x) = x  + 2)

f(3) = 1 – 3 = -2                (We have used 1 – x since 3 > 0, and when x > 0 then function f(x) = 1 – x)

For graph of f(x), given that

f(x) = x + 2          for x < 0

i.e y = x + 2

Which is the linear equation, so is a straight line and it takes

 x -1 -2 y 1 0

This means y = x + 2 passes through (-1, 1) and (-2, 0).

Also, given that

f(x) = 1 – x          for x > 0

i.e   y = 1 – x

Which is the linear equation, so is a straight line and it takes

 x 1 2 y 0 -1

This means y = x + 2 passes through (1, 0) and (2, -1).

With these information, the graph of the equation is as: