Worked solution
Part (a): Finding fg(x)
fg(x) means f(g(x)), apply g first, then f.
fg(x)=f(g(x))=f(x2+2)
Substitute x2+2 into f(⋅)=2(⋅)−1:
fg(x)=2(x2+2)−1=2x2+4−1=2x2+3
Part (b): 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(2x−1)
Substitute 2x−1 into g(⋅)=(⋅)2+2:
gf(x)=(2x−1)2+2
Expand (2x−1)2=4x2−4x+1 carefully (keep the middle term):
gf(x)=4x2−4x+1+2=4x2−4x+3
Part (c): Solving fg(x)=gf(x)
Set the two expressions from parts (a) and (b) equal:
2x2+3=4x2−4x+3
Subtract 2x2+3 from both sides:
0=2x2−4x
Factor (do not divide through by x, since that would silently lose a solution):
0=2x(x−2)
So x=0 or x=2.
Check at x=0: fg(0)=2(0)2+3=3 and gf(0)=4(0)2−4(0)+3=3, equal.
Check at x=2: fg(2)=2(4)+3=11 and gf(2)=4(4)−4(2)+3=16−8+3=11, equal.
Final answers
- (a) fg(x)=2x2+3
- (b) gf(x)=4x2−4x+3
- (c) x=0 or x=2