Worked solution
Part (a): Finding fg(x)
fg(x) means f(g(x)), apply g first, then f.
fg(x)=f(g(x))=f(2x+1)
Substitute 2x+1 into f(⋅)=(⋅)−31:
fg(x)=(2x+1)−31=2x−21
Part (b): Domain of fg
fg(x)=2x−21 is undefined only when the denominator is zero:
2x−2=0⟹x=1
This matches the underlying rule: fg is undefined exactly when g(x)=3 (the value excluded from f‘s domain), and g(x)=3 gives 2x+1=3, i.e. x=1.
So the domain of fg is:
x∈R,x=1
Part (c): Finding gf(x)
gf(x) means g(f(x)), apply f first, then g: the opposite order to part (a).
gf(x)=g(f(x))=g(x−31)
Substitute x−31 into g(⋅)=2(⋅)+1:
gf(x)=2(x−31)+1=x−32+1
Part (d): Domain of gf
Since g itself has domain x∈R (no restriction), the only restriction on gf comes from needing f(x) to be defined in the first place, i.e. x=3.
So the domain of gf is:
x∈R,x=3
Numerical check at x=2: g(2)=5, f(5)=5−31=21, so fg(2)=21. Using the formula: 2(2)−21=21 (matches. Also f(2)=2−31=−1, g(−1)=2(−1)+1=−1, so gf(2)=−1. Using the formula: 2−32+1=−2+1=−1) matches.
Final answers
- (a) fg(x)=2x−21
- (b) Domain of fg: x∈R,x=1
- (c) gf(x)=x−32+1
- (d) Domain of gf: x∈R,x=3