Find \(g \circ f\) and \(f \circ g\) for \(f(x)=2x+x^2\) and \(g(x)=x^3\)
📺 Video Explanation
📝 Question
Let functions \(f:\mathbb{R}\to\mathbb{R}\) and \(g:\mathbb{R}\to\mathbb{R}\) be defined as:
\[ f(x)=2x+x^2,\qquad g(x)=x^3 \]
Find:
- \((g\circ f)(x)\)
- \((f\circ g)(x)\)
✅ Solution
🔹 Find \((g\circ f)(x)\)
By definition:
\[ (g\circ f)(x)=g(f(x)) \]
Substitute \(f(x)=2x+x^2\):
\[ g(f(x))=g(2x+x^2) \]
Since:
\[ g(x)=x^3 \]
So:
\[ g(2x+x^2)=(2x+x^2)^3 \]
Factor:
\[ 2x+x^2=x(x+2) \]
Thus:
\[ (g\circ f)(x)=\big(x(x+2)\big)^3 \]
\[ \boxed{(g\circ f)(x)=x^3(x+2)^3} \]
🔹 Find \((f\circ g)(x)\)
By definition:
\[ (f\circ g)(x)=f(g(x)) \]
Substitute \(g(x)=x^3\):
\[ f(x^3) \]
Since:
\[ f(x)=2x+x^2 \]
So:
\[ f(x^3)=2(x^3)+(x^3)^2 \]
Simplify:
\[ =2x^3+x^6 \]
\[ \boxed{(f\circ g)(x)=x^6+2x^3} \]
🎯 Final Answer
\[ \boxed{(g\circ f)(x)=x^3(x+2)^3} \]
\[ \boxed{(f\circ g)(x)=x^6+2x^3} \]
🚀 Exam Shortcut
- \(g\circ f\): substitute whole \(f(x)\) into \(g\)
- \(f\circ g\): substitute whole \(g(x)\) into \(f\)
- Use factorization to simplify large powers quickly