# 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. $\displaystyle (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
$\displaystyle x>1,0<x \leq 1,x \leq 0$

3. Originally Posted by Krahl
$\displaystyle (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
$\displaystyle x>1,0<x \leq 1,x \leq 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 $\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 ]