Suppose that f(x)=1x+2 and g(x)=4x−1. Find f∘g and its domain.
Solution (f∘g)(x)=f(g(x))=1g(x)+2=14x−1+2=x−14+2(x−1)=x−12x+2
To find the domain of f∘g, first note that the domain of g is {x|x≠1}, so we exclude 1 from the domain of f∘g. Next note that the domain of f is {x|x≠−2}, which means g(x) cannot equal −2. To determine what additional values of x to exclude, we solve the equation g(x)=−2: 4x−1=−2g(x)=−24=−2(x−1)4=−2x+22x=−2x=−1
We also exclude −1 from the domain of f∘g.
The domain of f∘g is {x|x≠−1, x≠1}.
We could also find the domain of f∘g by first finding the domain of g: {x|x≠1}. So, exclude 1 from the domain of f∘g. Then looking at (f∘g)(x)=x−12x+2=x−12(x+1), notice that x≠−1, so we exclude −1 from the domain of f∘g. Therefore, the domain of f∘g is {x|x≠−1, x≠1}.