Piecewise Function Homework: Find foG & goF

  • Thread starter Thread starter thereddevils
  • Start date Start date
  • Tags Tags
    Function
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
thereddevils
Messages
436
Reaction score
0

Homework Statement



Given that f(R)=R , g(R)=R be defined respectively by

[tex]f(x)=\begin{cases} \sin x+2 & \text{if } x>1 \\ \cos x-2 & \text{if } x\leq 1\end{cases}[/tex]

[tex]g(x)=\begin{cases}2x+3& \text{if } x>0 \\ x^2 & \text{if } x\leq 0 \end{cases}[/tex]

Find f o g and g o f


Homework Equations





The Attempt at a Solution



i have no idea to begin except for the obvious substitution of g(x) into the function f(x) . I am not sure how to adjust the domain .
 
Physics news on Phys.org
You need to be careful of the domains. If [itex]x\le 0[/itex], [itex]g(x)= x^2[/itex] but then [itex]x^2< 1[/itex] if x> -1 and [itex]x^2> 1[/itex] if x< -1.

If x> 0, [itex]g(x)= 2x+ 3[/itex] and, since x is positive, that is always larger than 3 which is larger than 1.

You need to divide into three intervals: for x<-1, [itex]g(x)= x^2> 1[/itex] so [itex]f(g(x))= f(x^2)= sin(x^2)+ 2[/itex]. for [itex]-1\le x\le 0[/itex], [itex]g(x)= x^2\le 1[/itex] so [itex]f(g(x))= f(x^2)= cos(x^2)- 1[/itex]. For x> 0, g(x)= 2x+ 3 and f(g(x))= f(2x+3)= sin(2x+3)+ 2.

Now, you do g(f(x))
 
HallsofIvy said:
You need to be careful of the domains. If [itex]x\le 0[/itex], [itex]g(x)= x^2[/itex] but then [itex]x^2< 1[/itex] if x> -1 and [itex]x^2> 1[/itex] if x< -1.

If x> 0, [itex]g(x)= 2x+ 3[/itex] and, since x is positive, that is always larger than 3 which is larger than 1.

You need to divide into three intervals: for x<-1, [itex]g(x)= x^2> 1[/itex] so [itex]f(g(x))= f(x^2)= sin(x^2)+ 2[/itex]. for [itex]-1\le x\le 0[/itex], [itex]g(x)= x^2\le 1[/itex] so [itex]f(g(x))= f(x^2)= cos(x^2)- 1[/itex]. For x> 0, g(x)= 2x+ 3 and f(g(x))= f(2x+3)= sin(2x+3)+ 2.

Now, you do g(f(x))

thanks !