Show \(f \circ g \ne g \circ f\) for \(f(x)=x^2\) and \(g(x)=x+1\)
📺 Video Explanation
📝 Question
Let functions \(f:\mathbb{R}\to\mathbb{R}\) and \(g:\mathbb{R}\to\mathbb{R}\) be defined by:
\[ f(x)=x^2,\qquad g(x)=x+1 \]
Show that:
\[ f\circ g \ne g\circ f \]
✅ Solution
🔹 Find \((f\circ g)(x)\)
By definition:
\[ (f\circ g)(x)=f(g(x)) \]
Substitute \(g(x)=x+1\):
\[ (f\circ g)(x)=f(x+1) \]
Since:
\[ f(x)=x^2 \]
So:
\[ (f\circ g)(x)=(x+1)^2 \]
Expand:
\[ (f\circ g)(x)=x^2+2x+1 \]
🔹 Find \((g\circ f)(x)\)
By definition:
\[ (g\circ f)(x)=g(f(x)) \]
Substitute \(f(x)=x^2\):
\[ (g\circ f)(x)=g(x^2) \]
Since:
\[ g(x)=x+1 \]
So:
\[ (g\circ f)(x)=x^2+1 \]
🔹 Compare Both
We get:
\[ (f\circ g)(x)=x^2+2x+1 \]
and
\[ (g\circ f)(x)=x^2+1 \]
Since:
\[ x^2+2x+1 \ne x^2+1 \]
for all general \(x\), therefore:
\[ \boxed{f\circ g \ne g\circ f} \]
🎯 Final Answer
\[ \boxed{(f\circ g)(x)=x^2+2x+1} \]
\[ \boxed{(g\circ f)(x)=x^2+1} \]
Hence,
\[ \boxed{f\circ g \ne g\circ f} \]
🚀 Exam Shortcut
- Composition is generally not commutative
- First apply inner function, then outer
- Compare final expressions to check equality