Composition Chains Math Example 2

Follow the full solution, then compare it with the other examples linked below.

Example 2

medium
Find the formula for (gโˆ˜f)(x)(g\circ f)(x) and (fโˆ˜g)(x)(f\circ g)(x) where f(x)=x2+1f(x)=x^2+1 and g(x)=xg(x)=\sqrt{x}. Show they are not equal.

Solution

  1. 1
    (gโˆ˜f)(x)=g(f(x))=g(x2+1)=x2+1(g\circ f)(x)=g(f(x))=g(x^2+1)=\sqrt{x^2+1}. Domain: all real xx (since x2+1โ‰ฅ1>0x^2+1\geq1>0).
  2. 2
    (fโˆ˜g)(x)=f(g(x))=f(x)=(x)2+1=x+1(f\circ g)(x)=f(g(x))=f(\sqrt{x})=(\sqrt{x})^2+1=x+1. Domain: xโ‰ฅ0x\geq0.
  3. 3
    At x=4x=4: (gโˆ˜f)(4)=17โ‰ˆ4.12(g\circ f)(4)=\sqrt{17}\approx4.12; (fโˆ˜g)(4)=4+1=5(f\circ g)(4)=4+1=5. Different results confirm gโˆ˜fโ‰ fโˆ˜gg\circ f\neq f\circ g.

Answer

(gโˆ˜f)(x)=x2+1(g\circ f)(x)=\sqrt{x^2+1}; (fโˆ˜g)(x)=x+1(f\circ g)(x)=x+1; they are not equal
Function composition is generally not commutative. The order matters: (gโˆ˜f)(g\circ f) applies ff first, (fโˆ˜g)(f\circ g) applies gg first. Even the domains differ here (R\mathbb{R} vs [0,โˆž)[0,\infty)).

About Composition Chains

A composition chain is a sequence of functions applied one after another: (fโˆ˜gโˆ˜h)(x)=f(g(h(x)))(f \circ g \circ h)(x) = f(g(h(x))), evaluated inside-out from right to left.

Learn more about Composition Chains โ†’

More Composition Chains Examples