Composite function of a piecewise function

1. Jan 16, 2014

libragirl79

1. The problem statement, all variables and given/known data

Given that I have a doubling function :
f(x)=2x (for 0≤x<0.5) and 2x-1 (for 0.5≤ x<1)

2. Relevant equations
What is f(f(x))?

3. The attempt at a solution
f(f(x))=4x for the first one and 4x-3 for the second part but not sure what to do about the domain constraints...

Thanks!!

2. Jan 16, 2014

SammyS

Staff Emeritus
It's not that simple.

Yes, f(f(x)) = 4x over part of the domain of the composite function and 4x-3 over some other portion, but those are not the only two pieces of f(f(x)).

For what values of x is 0 ≤ 2x < 0.5 ?

For what values of x is 0.5 ≤ 2x < 1 ?

etc.

3. Jan 17, 2014

libragirl79

right, that's exactly my issue, since i don't have the fcns for 1/4 ≤ x < 1/2
and 1/2 ≤ x < 3/4 ... is there a certain method for doing this?

4. Jan 17, 2014

HallsofIvy

You understand that "$1/4\le x< 1/2$" is part of the interval $0\le x< 1/2$ don't you?

If $0\le x< 1/4$, f(x)= 2x which is less than 1/2 so ff(x)= f(2x)= 2(2x)= 4x.
If $1/4\le x< 1/2$ then x is still between 0 and 1/2 so f(x)= 2x but f(x) is now between 1/2 and 1 so ff(x)= f(2x)= 2(2x)- 1= 4x- 1.

Do similarly for $1/2\le x< 3/4$. Now x is between 1/2 and 1 so f(x)= 2x- 1 which is between 0 and 1/2.

If x is between 3/4 and 1, f(x)= 2x- 1 is between 1/2 and 1

5. Jan 18, 2014

libragirl79

I understand the breakdown of the x domains, but how do you know where f(x) falls?