Skip to content
Worked Examples · Example 16

Q.Find gofgof and fogfog, if f:R→Rf: \mathbb{R} \to \mathbb{R} and g:R→Rg: \mathbb{R} \to \mathbb{R} are given by f(x)=cos⁡xf(x) = \cos x and g(x)=3x2g(x) = 3x^2. Show that gof≠foggof \neq fog.

Karnataka PUCTextbookSubjective· 3mImportance★★★★★
42% · 44/104 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The composition gofgof means apply ff first, then gg; fogfog means apply gg first, then ff. For f(x)=cos⁡xf(x)=\cos x and g(x)=3x2g(x)=3x^2, we get gof(x)=3cos⁡2xgof(x)=3\cos^2 x and fog(x)=cos⁡(3x2)fog(x)=\cos(3x^2). These are different functions — for example at x=0x=0, gof(0)=3gof(0)=3 but fog(0)=1fog(0)=1, so gof≠foggof \neq fog.

The key idea here is that composition of functions is not commutative — the order in which you apply the functions matters. When we write gofgof, we read it as "g after f": first do ff, then feed that result into gg. For fogfog, it's the reverse: first gg, then ff.

Let's build each composition step by step.

  1. Finding gofgof We start with gof(x)=g(f(x))gof(x) = g(f(x)). Since f(x)=cos⁡xf(x) = \cos x, we put this into gg:

gof(x)=g(cos⁡x)=3(cos⁡x)2=3cos⁡2x.gof(x) = g(\cos x) = 3(\cos x)^2 = 3\cos^2 x.

So gofgof squares the cosine and multiplies by 3.

  1. Finding fogfog Now fog(x)=f(g(x))fog(x) = f(g(x)). Since g(x)=3x2g(x) = 3x^2, we put this into ff:

fog(x)=f(3x2)=cos⁡(3x2).fog(x) = f(3x^2) = \cos(3x^2).

So fogfog takes the cosine of 3x23x^2.

  1. Comparing the two At a glance, 3cos⁡2x3\cos^2 x and cos⁡(3x2)\cos(3x^2) look very different. But to be rigorous, we show they differ at a specific input. Take x=0x = 0: gof(0)=3cos⁡20=3⋅12=3,gof(0) = 3\cos^2 0 = 3 \cdot 1^2 = 3, …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.