Given that f(R)=R , g(R)=R be defined respectively by
f(x)= sin x+2 , x>1
= cos x-2 , x<=1
g(x)=2x+3 , x>0
=x^2 , x<=0
Find f o g
we have $\displaystyle f(g(x))$
2 functions for g(x).
$\displaystyle x >0$ $\displaystyle g(x)=2x+3>3$ and $\displaystyle f(x)=sin(x)+2$ for $\displaystyle x>1$
so for $\displaystyle x>0$ $\displaystyle f(g(x))=sin(2x+3)+2$
similarly
$\displaystyle 0 \geq x \geq -1$, $\displaystyle 0 \leq g(x)=x^2 \leq 1$ and
$\displaystyle f(g(x))=cos(g(x))-2=cos(x^2)-2$
And
for $\displaystyle x<-1$ $\displaystyle g(x)=x^2>1$ $\displaystyle f(g(x))=sin(x^2)+2$
Finally
f(g(x))= $\displaystyle sin(x)+2$ if $\displaystyle x>0$
$\displaystyle cos(x^2)-2$ if $\displaystyle -1 \leq x \leq 0$
$\displaystyle sin(x^2)+2$ if $\displaystyle x<-1$
notice we have covered the whole real line with x. The important part is to use restrictions of x so that g(x) fits in the inequalities for f(x). if i had used
$\displaystyle 0 \geq x > -1$ instead of $\displaystyle 0 \geq x \geq -1$ then the next would be $\displaystyle g(x)=x^2 \geq 1$ which doesn't fit the inequalities for f(x).
[I rushed this there may be mistakes ]