Find \(f \circ g\) and \(g \circ f\) for \(f(x)=x^2\) and \(g(x)=\cos 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^2,\qquad g(x)=\cos 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)=\cos x\):

\[ (f\circ g)(x)=f(\cos x) \]

Since:

\[ f(x)=x^2 \]

So:

\[ (f\circ g)(x)=(\cos x)^2 \]

Therefore:

\[ \boxed{(f\circ g)(x)=\cos^2 x} \]


🔹 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)=\cos x \]

So:

\[ (g\circ f)(x)=\cos(x^2) \]

Therefore:

\[ \boxed{(g\circ f)(x)=\cos(x^2)} \]


🎯 Final Answer

\[ \boxed{(f\circ g)(x)=\cos^2 x} \]

\[ \boxed{(g\circ f)(x)=\cos(x^2)} \]

Hence, both composite functions are defined for all real numbers, and in general:

\[ \boxed{f\circ g \ne g\circ f} \]


🚀 Exam Shortcut

  • For \(f\circ g\): put \(\cos x\) into \(x^2\)
  • For \(g\circ f\): put \(x^2\) into \(\cos x\)
  • Composition usually depends on order
Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *