# Thread: piece wise defined function

1. ## piece wise defined function

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

2. $(f o g)(x)=f(g(x))$

so put g(x) as x in f(x), you should get f o g defined for the intervals
$x>1,0

3. Originally Posted by Krahl
$(f o g)(x)=f(g(x))$

so put g(x) as x in f(x), you should get f o g defined for the intervals
$x>1,0
ok

fg(x)= sin (2x+3) +2
=cos (2x+3) - 2

Do i substitute each of the g(x) in each of the function f(x) ? Could you explain on the interval ? Thats what i am most confused with . Thanks .

4. we have $f(g(x))$

2 functions for g(x).

$x >0$ $g(x)=2x+3>3$ and $f(x)=sin(x)+2$ for $x>1$

so for $x>0$ $f(g(x))=sin(2x+3)+2$

similarly

$0 \geq x \geq -1$, $0 \leq g(x)=x^2 \leq 1$ and
$f(g(x))=cos(g(x))-2=cos(x^2)-2$

And

for $x<-1$ $g(x)=x^2>1$ $f(g(x))=sin(x^2)+2$

Finally

f(g(x))= $sin(x)+2$ if $x>0$
$cos(x^2)-2$ if $-1 \leq x \leq 0$
$sin(x^2)+2$ if $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
$0 \geq x > -1$ instead of $0 \geq x \geq -1$ then the next would be $g(x)=x^2 \geq 1$ which doesn't fit the inequalities for f(x).
[I rushed this there may be mistakes ]