Q.Find gof and fog, if f:R→R and g:R→R are given by f(x)=cosx and g(x)=3x2. Show that gof=fog.
🔒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 →Concept understanding — Domain Of Composite Function
Domain of a Composite Function
Picture a building with two doors: the first opens with a blue pass, the second with a red pass. Walking through f(g(x)) means passing the inner door g first, then the outer door f. The domain of the composite is simply: which inputs make it through both doors?
The intuition
Take f(x)=x and g(x)=x−5, so f(g(x))=x−5.
- The inner g(x)=x−5 accepts every real number.
- The outer f accepts only non-negative inputs.
So the real question is: which x make g(x) land inside the domain of f? The domain of the composite is not just the domain of g, nor just the domain of f — it is the overlap seen through g.
The precise statement
Domain(f∘g)={x∈Domain(g)∣g(x)∈Domain(f)}.
Two steps, in order:
- Keep only the x that g can handle.
- Among those, keep only the x for which g(x) is something f can handle.
A frequent mistake is to restrict x using the domain of f directly. The restriction comes from g(x) lying in Domain(f), not from x itself.
A worked check
For f(x)=x, g(x)=x−11:
- Domain of g: x=1.
- Outer condition: g(x)≥0⇒x−11≥0⇒x−1>0⇒x>1.
So Domain(f∘g)=(1,∞) — the condition from f already excludes x=1.
Order matters …
Concept: Domain of composite function — both f and g map R→R, so all compositions are defined on R.
Step 1: Compute gof.
gof(x)=g(f(x))=g(cosx)=3(cosx)2=3cos2x.
Step 2: Compute fog.
fog(x)=f(g(x))=f(3x2)=cos(3x2).
Step 3: Compare. …
The composition gof means apply f first, then g; fog means apply g first, then f. For f(x)=cosx and g(x)=3x2, we get gof(x)=3cos2x and fog(x)=cos(3x2). These are different functions — for example at x=0, gof(0)=3 but fog(0)=1, so gof=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 gof, we read it as "g after f": first do f, then feed that result into g. For fog, it's the reverse: first g, then f.
Let's build each composition step by step.
- Finding gof We start with gof(x)=g(f(x)). Since f(x)=cosx, we put this into g:
gof(x)=g(cosx)=3(cosx)2=3cos2x.
So gof squares the cosine and multiplies by 3.
- Finding fog Now fog(x)=f(g(x)). Since g(x)=3x2, we put this into f:
fog(x)=f(3x2)=cos(3x2).
So fog takes the cosine of 3x2.
- Comparing the two At a glance, 3cos2x and cos(3x2) look very different. But to be rigorous, we show they differ at a specific input. Take x=0: gof(0)=3cos20=3⋅12=3, …
Method: Finding g∘f, f∘g and showing they differ
Use this when asked to compute both composites of two real functions and prove composition is not commutative.
Steps
Step 1: Build g∘f
(g∘f)(x)=g(f(x)): substitute the whole expression for f(x) into g's rule and simplify.
Step 2: Build f∘g
(f∘g)(x)=f(g(x)): substitute g(x) into f's rule. Keep the order straight — the function on the right acts first.
Step 3: Show inequality with a single test point …
Common Mistakes
Mistake 1: Confusing composition with multiplication or reversing the order
Why it's wrong: g∘f is g(f(x))=3cos2x, not cosx⋅3x2 and not cos(3x2). Correct approach: substitute the inner function into the outer one, keeping f (right side) acting first.
Mistake 2: Claiming g∘f=f∘g "because they look different" without proof …
Showing the 12 most recent of 17 on this concept.
- AP EAPCET 2026Set eng-2026-05-13-FN1 markMCQQ.Let f be a function with domain [0,7] and g be a function defined by g(x)=∣2x+1∣. Then the domain of (f∘g)(x) is (A) [0,7] (B) [−7,0] (C) [−4,3] (D) [−3,4]
›Reveal solutionSolution
The domain of the composite function f∘g consists of all x such that g(x) lies inside the domain of f.
Since f has domain [0,7] and g(x)=∣2x+1∣, we require 0≤∣2x+1∣≤7.
Solving gives x∈[−4,3], so the correct option is (C).
Concept and intuition
When we form (f∘g)(x)=f(g(x)), the “inner” function g must produce outputs that the “outer” function f can accept.
The domain of f is the set of allowed inputs for f. So for f(g(x)) to be defined, g(x) must land in that set.
Here f only accepts numbers from 0 to 7 inclusive. Therefore we need
0≤g(x)≤7.
Since g(x)=∣2x+1∣ is always non‑negative, the lower bound 0 is automatically satisfied for all x (absolute value is never negative). The real restriction comes from the upper bound:
∣2x+1∣≤7.
Step‑by‑step solution
- Set up the inequality We require
∣2x+1∣≤7.
This is a standard absolute‑value inequality: it means the distance from 2x+1 to 0 is at most 7.
- Rewrite without absolute value For any real number a, ∣a∣≤k (with k≥0) is equivalent to −k≤a≤k. Hence
−7≤2x+1≤7.
- Solve the compound inequality Subtract 1 from all three parts:
−8≤2x≤6.
Then divide by 2 (positive, so inequality signs stay the same):
−4≤x≤3.
- Check the lower bound …
- AP EAPCET 2022Set eng-2022-07-06-AN1 markMCQQ.The domain of the real valued function f(x) = x2+3x+2log2(x+3) is (A) (−3,∞) (B) (−3,−1)∪(−1,∞) (C) (−3,−2)∪(−2,−1)∪(−1,∞) (D) (−3,−2)∪(−1,∞)
›Reveal solutionSolution
Combine the log's domain condition with the square-root-in-denominator condition to get (−3,−2)∪(−1,∞).
Concept and Intuition
For a quotient with a log in the numerator and a square root in the denominator, every piece imposes its own domain restriction, and the final domain is the intersection of all of them: the log argument must be strictly positive, and the expression under the root must be strictly positive (not just non-negative, since it also sits in the denominator and can't be zero).
Step-by-Step Solution
- Log condition: x+3>0⇒x>−3.
- Denominator condition: x2+3x+2>0. Factor: (x+1)(x+2)>0, true when x<−2 or x>−1.
- Intersect x>−3 with (x<−2 or x>−1):
- x>−3 and x<−2 gives (−3,−2).
- x>−3 and x>−1 gives (−1,∞). …
- AP EAPCET 2025Set eng-2025-05-26-FN1 markMCQQ.The domain of the real valued function f(x)=4−x23+log10(x3−x) is (A) (1,2)∪(2,∞) (B) (−1,0)∪(1,2) (C) (−1,0)∪(1,2)∪(2,∞) (D) (−∞,−1)∪(1,2)∪(2,∞)
›Reveal solutionSolution
The domain needs x=±2 (denominator non-zero) and x3−x>0 (log argument positive); combining gives (−1,0)∪(1,2)∪(2,∞).
Concept and Intuition
For f(x)=4−x23+log10(x3−x) to be real-valued, every term must individually be defined: the rational term needs a non-zero denominator, and the logarithm needs a strictly positive argument. The domain of f is the intersection of the domains required by each term.
Step-by-Step Solution
- Denominator condition: 4−x2=0⇒x2=4⇒x=2 and x=−2.
- Logarithm condition: need x3−x>0, i.e. x(x−1)(x+1)>0. The roots are x=−1,0,1, dividing the real line into four intervals; testing a point in each:
- x<−1 (e.g. x=−2): (−2)(−3)(−1)=−6<0.
- −1<x<0 (e.g. x=−0.5): (−0.5)(−1.5)(0.5)=0.375>0.
- 0<x<1 (e.g. x=0.5): (0.5)(−0.5)(1.5)=−0.375<0.
- x>1 (e.g. x=2): (2)(1)(3)=6>0. So x3−x>0 exactly on (−1,0)∪(1,∞). …
- AP EAPCET 2026Set eng-2026-05-13-FN1 markMCQQ.A⊆R and f:A→R is a function defined by f(x)=x+1x−1. If the domain of the function f(2x) is B, then A∩B= (A) R−{−1,−2} (B) R−{−1,−21} (C) R−{−1,31} (D) R−{−1,1}
›Reveal solutionSolution
The domain of f excludes x=−1; the domain of f(2x) excludes x=−21; their intersection excludes both, so A∩B=R−{−1,−21}, which is option (B).
We need to find A, the natural domain of f(x)=x+1x−1, then B, the natural domain of f(2x), and finally their intersection.
Why this approach works:
The domain of a composite function like f(2x) is found by first requiring that the “inside” expression 2x belongs to the domain of f, and then also requiring that the “inside” expression itself is defined (it always is, since 2x is defined for all real x). So we simply take the domain of f and replace x by 2x, solving for the restriction.
- Find A — the domain of f(x). f(x)=x+1x−1 is a rational function. The only restriction is that the denominator cannot be zero:
x+1=0⇒x=−1.
Hence
A=R−{−1}.
- Find B — the domain of f(2x). The function f(2x) means we substitute 2x into f:
f(2x)=2x+12x−1.
Again, the denominator cannot be zero:
2x+1=0⇒x=−21.
So
B=R−{−21}.
- Find A∩B. …
- AP EAPCET 2026Set eng-2026-05-15-AN1 markMCQQ.The domain of the real valued function f(x)=cos−1(42−∣x∣)+[log(3−x)]−1 is (A) (−6,2)∪(2,3) (B) [−6,2)∪(2,3) (C) (−∞,2)∪(2,3) (D) [−6,2)∪(2,3]
›Reveal solutionSolution
The domain is the intersection of the domains of the inverse cosine term and the logarithmic term, excluding points where the log denominator is zero. The final domain is [−6,2)∪(2,3), which corresponds to option (B).
We need the set of all real x for which f(x) is defined. The function has two parts:
- cos−1(42−∣x∣)
- [log(3−x)]−1, i.e., log(3−x)1
Each imposes conditions. Let’s find them step by step.
- Domain of cos−1(u) The inverse cosine is defined only when its argument u satisfies −1≤u≤1. Here u=42−∣x∣, so we require:
−1≤42−∣x∣≤1
Multiply by 4 (positive, so inequality direction unchanged):
−4≤2−∣x∣≤4
Subtract 2 from all parts:
−6≤−∣x∣≤2
Multiply by −1 (reverses inequalities):
6≥∣x∣≥−2
The right inequality ∣x∣≥−2 is always true (absolute value is nonnegative).
The left inequality ∣x∣≤6 gives:
−6≤x≤6
So the inverse cosine part is defined for x∈[−6,6].
- Domain of log(3−x) The logarithm (presumably base 10 or natural — domain is the same) requires its argument positive:
3−x>0⇒x<3
So log(3−x) is defined for x∈(−∞,3).
- Denominator condition: [log(3−x)]−1 The reciprocal log(3−x)1 is undefined when the denominator is zero:
log(3−x)=0⇒3−x=1⇒x=2
So we must exclude x=2 from the domain. …
- AP EAPCET 2026Set eng-2026-05-15-FN1 markMCQQ.The domain of f(x)=Cos−1[log2(x2+5x+8)] is (A) [−4,−3] (B) [−3,−2] (C) [−2,−1] (D) [−1,2]
›Reveal solutionSolution
The domain requires the log expression to lie in [−1,1]; one side is automatically satisfied and the other reduces to a simple quadratic inequality, giving [−3,−2].
Concept and Intuition
cos−1(t) is only defined for t∈[−1,1]. So finding the domain of cos−1[log2(⋯)] is really a two-sided inequality problem on the inner expression, which then converts (via the monotonic exponential 2t) into a bound on the underlying quadratic.
Step-by-Step Solution
- Require −1≤log2(x2+5x+8)≤1.
- Convert using 2(⋅) (monotonic increasing, preserves inequality direction): 2−1≤x2+5x+8≤21, i.e. 0.5≤x2+5x+8≤2.
- Lower bound: x2+5x+8≥0.5⇔x2+5x+7.5≥0. Discriminant =25−30=−5<0 and leading coefficient positive, so this quadratic is always positive — the lower bound holds for all real x, imposing no restriction.
- Upper bound: x2+5x+8≤2⇔x2+5x+6≤0⇔(x+2)(x+3)≤0. …
- AP EAPCET 2024Set eng-2024-05-19-AN1 markMCQQ.The domain of the real valued function f(x)=log0.5(2x−3)1+4−9x2 is (A) [32,23) (B) Null Set (C) [32,2) (D) [−32,32]
›Reveal solutionSolution
The two terms of f(x) impose disjoint requirements on x (23<x<2 vs −32≤x≤32), so no x satisfies both — the domain is empty, option (B).
Concept and Intuition
For a sum of two functions to be defined, both pieces must individually be defined at x — the domain of the sum is the intersection of the individual domains. Here:
- log0.5(2x−3)1 requires the expression under the square root, log0.5(2x−3), to be strictly positive (it can't be zero, since it's in a denominator, and can't be negative, since it's under a real square root).
- 4−9x2 requires 4−9x2≥0.
For a log with base b<1 (here b=0.5), logb(t) is a decreasing function of t, and logb(1)=0. So logb(t)>0⟺t<1 (combined with the log's own domain requirement t>0), giving 0<t<1.
Step-by-Step Solution
- Log argument domain + positivity: need log0.5(2x−3)>0. Since base <1: this holds iff 0<2x−3<1. 0<2x−3⇒x>23; and 2x−3<1⇒x<2. So first term needs x∈(23,2).
- Square-root domain: need 4−9x2≥0⇒9x2≤4⇒x2≤94⇒x∈[−32,32]. …
- AP EAPCET 2023Set eng-2023-05-15-FN1 markMCQQ.For x∈R if f(x)=log10(x3−x), then the domain of f is (A) [0,23] (B) (0,23] (C) [0,1] (D) (0,1]
›Reveal solutionSolution
Two conditions — the log's argument must be positive, and (for the outer square root) at least 1 — combine to give the domain (0,3/2].
Concept and Intuition
For f(x)=log10(g(x)) to be real we need (i) g(x)>0 so the log is defined, and (ii) log10(g(x))≥0, i.e. g(x)≥1, so the square root has a non-negative argument.
Step-by-Step Solution
- Let g(x)=x3−x.
- Condition (i) g(x)>0: numerator and denominator must share sign. For x>0: need 3−x>0⇒x<3, giving 0<x<3. For x<0: need 3−x<0⇒x>3, impossible. So condition (i) gives x∈(0,3). …
- AP EAPCET 2024Set eng-2024-05-22-FN1 markMCQQ.The domain of the real valued function f(x)=9−x2−144, is (A) [−15,−12]∪[12,15] (B) (−∞,−12]∪[12,∞) (C) [−15,15] (D) [−12,12]
›Reveal solutionSolution
The domain requires the inner square root to exist AND the outer square root's argument to be non-negative. Answer: [−15,−12]∪[12,15].
Concept and Intuition
For f(x)=9−x2−144 to be real we need two nested conditions: the inner radical x2−144 must be defined, and once it is, the quantity 9−x2−144 must be ≥0 for the outer radical to be defined.
Step-by-Step Solution
- Inner radical needs x2−144≥0⇒∣x∣≥12.
- Outer radical needs 9−x2−144≥0⇒x2−144≤9⇒x2−144≤81⇒x2≤225⇒∣x∣≤15. …
- AP EAPCET 2024Set eng-2024-05-23-FN1 markMCQQ.If ∫cos4x−sin4xsinxcosxdx=−2f(x)+c, then domain of f(x) is (A) [2nπ,(2n+1)π], n=0,1,2... (B) [(4n−1)2π,(4n+1)2π], n=0,1,2,... (C) [(4n−1)4π,(4n+1)4π], n=0,1,2,... (D) [2n4π,(2n+1)4π], n=0,1,2,...
›Reveal solutionSolution
Rewriting cos4x−sin4x as cos2x turns the integral into a simple u=cos2x substitution; the resulting f(x)=cos2x is only real where cos2x≥0.
Concept and Intuition
The expression under the root, cos4x−sin4x, is a difference of squares: (cos2x−sin2x)(cos2x+sin2x). Since cos2x+sin2x=1, this is simply cos2x. Likewise sinxcosx=21sin2x is the double-angle identity. Recognizing both identities turns a scary-looking radical integral into a one-step substitution problem — always hunt for double-angle simplification when you see sinxcosx and even powers of sine/cosine together.
Step-by-Step Solution
- Simplify: cos4x−sin4x=cos2x, and sinxcosx=21sin2x.
- The integral becomes ∫cos2x21sin2xdx=21∫cos2xsin2xdx.
- Let u=cos2x, so du=−2sin2xdx⇒sin2xdx=−21du.
- The integral becomes 21∫u−21du=−41∫u−1/2du=−41⋅2u1/2=−21cos2x+c.
- Matching this to the given form −2f(x)+c gives f(x)=cos2x. …
- AP EAPCET 2024Set eng-2024-05-21-FN1 markMCQQ.The domain of the real valued function f(x)=log2log3log5(x2−5x+11) is (A) (2,∞) (B) (−∞,3) (C) (2,3) (D) (−∞,2)∪(3,∞)
›Reveal solutionSolution
A triple-nested logarithm requires working from the innermost expression outward, each time ensuring the argument of the next-outer log is strictly positive; here this reduces to x2−5x+11>5, giving domain (−∞,2)∪(3,∞).
Concept and Intuition
For logb(u) to be a real number we need u>0 (and b>0,b=1, which is already satisfied for bases 2, 3, 5). When logs are nested, log2(log3(log5(g))), we must ensure positivity at every level, working from the inside out:
- log5(g) needs g>0.
- log3(log5(g)) needs log5(g)>0, i.e. g>50=1.
- log2(log3(log5(g))) needs log3(log5(g))>0, i.e. log5(g)>30=1, i.e. g>51=5.
So the binding constraint is always the outermost one once you propagate it inward — here it collapses to a single simple quadratic inequality.
Step-by-Step Solution
- Let g(x)=x2−5x+11. Its discriminant is (−5)2−4(1)(11)=25−44=−19<0, and the leading coefficient is positive, so g(x)>0 for all real x — this level imposes no restriction.
- For log3(log5(g)) to be defined we need log5(g)>0⇔g>1.
- For log2(log3(log5(g))) to be defined we need log3(log5(g))>0⇔log5(g)>1⇔g>5. …
- AP EAPCET 2025Set eng-2025-05-24-FN1 markMCQQ.The domain of the function f(x)=loge(x2−4x+41)+Sin−1(x2−2) is (A) [1,3] (B) [1,3) (C) [1,3] (D) [1,3)
›Reveal solutionSolution
The domain is the intersection of the constraints from the log-square-root term (giving x∈[1,3]) and the arcsine term (giving x∈[−3,−1]∪[1,3]), which works out to the closed interval [1,3].
Concept and Intuition
Whenever a function is a sum of two pieces, its domain is the intersection of each piece's individual domain — both must be simultaneously defined. Here one piece needs a square root's argument to be non-negative (which itself requires a logarithm to be non-negative, i.e. its argument ≥1), and the other piece needs an arcsine's argument to lie in [−1,1].
Step-by-Step Solution
- First term: loge(x2−4x+41). Note x2−4x+4=(x−2)2≥0, equal to 0 only at x=2 (so x=2 is required just for the fraction to exist). For the square root to be real, we need loge((x−2)21)≥0, i.e. (x−2)21≥1 (since logeu≥0⇔u≥1 for u>0). This gives (x−2)2≤1, i.e. −1≤x−2≤1, i.e. x∈[1,3] (and this automatically excludes the problem point x=2 from being undefined, since (x−2)2≤1 still permits x=2 where the fraction blows up — but that single point is excluded separately since the fraction itself is undefined there; it doesn't affect the final interval once intersected with the next constraint since 2∈/[1,3] anyway).
- Second term: Sin−1(x2−2) requires −1≤x2−2≤1, i.e. 1≤x2≤3. Since x2≥1⇔x≤−1 or x≥1, and x2≤3⇔−3≤x≤3, combining gives x∈[−3,−1]∪[1,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.