What this les­son cov­ers

This les­son looks at how func­tions are writ­ten and com­bined. We dis­tin­guish explicit from implicit func­tions, state exactly when two func­tions are equal, and define the com­pos­ite of two func­tions, includ­ing a use­ful self-inverse func­tion.

Explicit and implicit func­tions

A func­tion y=f(x)y = f(x) is explicit if the depen­dent vari­able yy is expressed directly in terms of the inde­pen­dent vari­able xx. Exam­ples: y=x−cos⁡xy = x - \cos x and y=x+log⁡ex−2x3y = x + \log_e x - 2x^3.

A func­tion is implicit if yy can­not be expressed in terms of xx alone, so xx and yy stay tied together in one equa­tion. Exam­ples: 3x2−4x2y2+2xy=73x^2 - 4x^2y^2 + 2xy = 7 and xy=cos⁡(x+y)xy = \cos(x + y).

Equal­ity of func­tions

Two func­tions ff and gg are equal if

  1. the domain of ff equals the domain of gg, and
  2. f(x)=g(x)f(x) = g(x) for every xx in that domain.

Match­ing for­mu­las on part of the domain is not enough.

Exam­ple 1

Are f(x)=xf(x) = x and g(x)=x2g(x) = \sqrt{x^2} iden­ti­cal?

Df=Dg=RD_f = D_g = \mathbb{R}, but x2=∣x∣\sqrt{x^2} = |x|, so g(−2)=2g(-2) = 2 while f(−2)=−2f(-2) = -2. Also Rf=RR_f = \mathbb{R} while Rg=[0,∞)R_g = [0, \infty). Hence f(x)≠g(x)f(x) \neq g(x): the func­tions are not equal.

Exam­ple 2

Are f(x)=sgn⁡(x2+1)f(x) = \operatorname{sgn}(x^2 + 1) and g(x)=sin⁡2x+cos⁡2xg(x) = \sin^2 x + \cos^2 x equal?

Df=R=DgD_f = \mathbb{R} = D_g. Since x2+1>0x^2 + 1 > 0, f(x)=1f(x) = 1 for all xx; and g(x)=1g(x) = 1 for all xx. So f=gf = g.

Com­pos­ite func­tion

If f:A→Bf : A \to B and g:B→Cg : B \to C are func­tions, then the func­tion g∘f:A→Cg \circ f : A \to C defined by

(g∘f)(x)=g{f(x)},∀x∈A,(g \circ f)(x) = g\{f(x)\}, \quad \forall x \in A,

is called the com­pos­ite of ff and gg. You first apply ff, then apply gg to the result.

A self-inverse func­tion

If f(x)=ax+bcx−a\displaystyle f(x) = \dfrac{ax + b}{cx - a}, then

  1. (f∘f)(x)=x(f \circ f)(x) = x,
  2. (f∘f∘f)(x)=f(x)(f \circ f \circ f)(x) = f(x),
  3. in gen­eral, (f∘f∘⋯∘f)(x)(f \circ f \circ \dots \circ f)(x) equals xx if ff occurs an even num­ber of times and f(x)f(x) if ff occurs an odd num­ber of times.

Exam­ple 3

Ver­ify (f∘f)(x)=x(f \circ f)(x) = x for f(x)=2x+3x−2\displaystyle f(x) = \dfrac{2x + 3}{x - 2} (here a=2a = 2, b=3b = 3, c=1c = 1).

f(f(x))=2⋅2x+3x−2+32x+3x−2−2=4x+6+3x−62x+3−2x+4=7x7=x.\displaystyle \begin{aligned} f(f(x)) &= \frac{2\cdot\frac{2x+3}{x-2} + 3}{\frac{2x+3}{x-2} - 2} \\ &= \frac{4x + 6 + 3x - 6}{2x + 3 - 2x + 4} \\ &= \frac{7x}{7} = x. \end{aligned}

Exam­ple 4

If f(x)=x2f(x) = x^2 and g(x)=2x+1g(x) = 2x + 1, find (g∘f)(x)(g \circ f)(x) and (f∘g)(x)(f \circ g)(x).

(g∘f)(x)=g(x2)=2x2+1(g \circ f)(x) = g(x^2) = 2x^2 + 1, and (f∘g)(x)=(2x+1)2=4x2+4x+1(f \circ g)(x) = (2x + 1)^2 = 4x^2 + 4x + 1. The two are dif­fer­ent, so com­po­si­tion is not com­mu­ta­tive.

Prac­tice

  1. Is y2+xy+x=0y^2 + xy + x = 0 an explicit or an implicit equa­tion?
  2. Are f(x)=x2−1x−1\displaystyle f(x) = \dfrac{x^2 - 1}{x - 1} and g(x)=x+1g(x) = x + 1 equal func­tions? Why?
  3. If f(x)=x+3f(x) = x + 3 and g(x)=x2g(x) = x^2, find (g∘f)(2)(g \circ f)(2) and (f∘g)(2)(f \circ g)(2).
  4. If f(x)=3x+12x−3\displaystyle f(x) = \dfrac{3x + 1}{2x - 3}, find (f∘f)(5)(f \circ f)(5).
  5. If f(x)=x+4x−1\displaystyle f(x) = \dfrac{x + 4}{x - 1}, find (f∘f∘f)(3)(f \circ f \circ f)(3).
  6. If f(x)=3x−1f(x) = 3x - 1, find (f∘f)(x)(f \circ f)(x).

Answers

Show answers
  1. Implicit (as writ­ten, yy is not given directly in terms of xx).
  2. No: Df=R−{1}D_f = \mathbb{R} - \{1\} but Dg=RD_g = \mathbb{R}.
  3. (g∘f)(2)=52=25(g \circ f)(2) = 5^2 = 25; (f∘g)(2)=4+3=7(f \circ g)(2) = 4 + 3 = 7.
  4. ff has the form ax+bcx−a\displaystyle \frac{ax+b}{cx-a} with a=3a = 3, so (f∘f)(5)=5(f \circ f)(5) = 5.
  5. a=1a = 1, so ff is self-inverse and three appli­ca­tions give f(3)=72\displaystyle f(3) = \frac{7}{2}.
  6. 3(3x−1)−1=9x−43(3x - 1) - 1 = 9x - 4.