We have a piecewise function.
Therefore, to find the function, we must evaluate each domain separately.
We have then:
For
:
The function for this domain is:

For
:
The function for this domain is:

Where,

Substituting:

For
:
The function for this domain is:
