Find \(f \circ g\) and \(g \circ f\) for \(f(x)=x^2+2\) and \(g(x)=1-\frac{1}{1-x}\)
📺 Video Explanation
📝 Question
Let:
\[ f(x)=x^2+2,\qquad g(x)=1-\frac{1}{1-x} \]
Find:
- \((f\circ g)(x)\)
- \((g\circ f)(x)\)
✅ Solution
🔹 Find \((f\circ g)(x)\)
By definition:
\[ (f\circ g)(x)=f(g(x)) \]
Substitute \(g(x)\):
\[ (f\circ g)(x)=\left(1-\frac{1}{1-x}\right)^2+2 \]
Simplify inside:
\[ 1-\frac{1}{1-x}=\frac{(1-x)-1}{1-x}=\frac{-x}{1-x}=\frac{x}{x-1} \]
So:
\[ (f\circ g)(x)=\left(\frac{x}{x-1}\right)^2+2 \]
Therefore:
\[ \boxed{(f\circ g)(x)=\frac{x^2}{(x-1)^2}+2,\quad x\ne 1} \]
🔹 Find \((g\circ f)(x)\)
By definition:
\[ (g\circ f)(x)=g(f(x)) \]
Substitute \(f(x)=x^2+2\):
\[ (g\circ f)(x)=1-\frac{1}{1-(x^2+2)} \]
Simplify:
\[ 1-(x^2+2)=-x^2-1 \]
So:
\[ (g\circ f)(x)=1-\frac{1}{-(x^2+1)} \]
\[ =1+\frac{1}{x^2+1} \]
Therefore:
\[ \boxed{(g\circ f)(x)=1+\frac{1}{x^2+1}} \]
🎯 Final Answer
\[ \boxed{(f\circ g)(x)=\frac{x^2}{(x-1)^2}+2,\quad x\ne 1} \]
\[ \boxed{(g\circ f)(x)=1+\frac{1}{x^2+1}} \]
🚀 Exam Shortcut
- Simplify rational function first before squaring
- For \(g\circ f\), carefully handle denominator sign
- Always mention domain restrictions