Find \(f \circ g\) and \(g \circ f\) for \(f(x)=|x|\) and \(g(x)=\sin x\)
📺 Video Explanation
📝 Question
Let functions \(f:\mathbb{R}\to\mathbb{R}\) and \(g:\mathbb{R}\to\mathbb{R}\) be defined as:
\[ f(x)=|x|,\qquad g(x)=\sin 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)=\sin x\):
\[ (f\circ g)(x)=f(\sin x) \]
Since:
\[ f(x)=|x| \]
So:
\[ (f\circ g)(x)=|\sin x| \]
Therefore:
\[ \boxed{(f\circ g)(x)=|\sin x|} \]
🔹 Find \((g\circ f)(x)\)
By definition:
\[ (g\circ f)(x)=g(f(x)) \]
Substitute \(f(x)=|x|\):
\[ (g\circ f)(x)=g(|x|) \]
Since:
\[ g(x)=\sin x \]
So:
\[ (g\circ f)(x)=\sin|x| \]
Therefore:
\[ \boxed{(g\circ f)(x)=\sin|x|} \]
🎯 Final Answer
\[ \boxed{(f\circ g)(x)=|\sin x|} \]
\[ \boxed{(g\circ f)(x)=\sin|x|} \]
Hence, both are defined for all real numbers and generally:
\[ \boxed{f\circ g \ne g\circ f} \]
🚀 Exam Shortcut
- For \(f\circ g\): put \(\sin x\) inside modulus
- For \(g\circ f\): put modulus inside sine
- Order matters in composition