# Help on composition of functions

I know how to compose normal functions but never seen this type of task any help?

Find the composition $$g \circ f$$ of the following functions $$f, g : \Bbb{R} \to \Bbb{R}$$ given by the formulas: \begin{align*} f(x) &= \begin{cases} x^2 + 1 & \text{if } x \in (-\infty, 0) \\ x - 2 & \text{if } x \in [0, +\infty) \end{cases} \\ g(x) &= \begin{cases} x + 2 & \text{if } x \in (-\infty, 2) \\ 1 - 2x^2 & \text{if } x \in [2, +\infty) \end{cases}. \end{align*}

• You should provide a picture with better quality or rewrite a problem, also show what you have already tried. Feb 6, 2019 at 20:42
• Redefine your functions on 3 intervals :$(-\infty,0)$, $(0,2)$, $(2,\infty)$ and compose your functions over these intervals. Feb 6, 2019 at 20:42
• link italic bold code this my attempt and task Feb 6, 2019 at 20:44

## 1 Answer

Hint:

To calculate $$g\bigl(f(x)\bigr)$$, you have to determine when $$f(x)<2$$ and when $$f(x)\ge 2$$. Consider separately the cases $$x<0$$ and $$x\ge 0$$.