2.4 Function operations, composition, and inverses

Functions can be combined to build richer models. Algebraic operations combine outputs at the same input, composition passes the output of one function into another, and inversion reverses a one-to-one relationship.

2.4.1 Arithmetic with functions

For functions \(f\) and \(g\),

\[(f+g)(x)=f(x)+g(x),\quad(f-g)(x)=f(x)-g(x),\]

\[(fg)(x)=f(x)g(x),\quad\left(\frac fg\right)(x)=\frac{f(x)}{g(x)}.\]

The domain of a sum, difference, or product is the intersection of the original domains. A quotient also excludes values for which \(g(x)=0\).

Worked Example: Combining inflow and outflow functions

Let inflow be \(I(t)=40+2t\) L/s and outflow be \(O(t)=18+t\) L/s. Net inflow is

\[(I-O)(t)=40+2t-(18+t)=22+t\ \text{L/s}.\]

Try It. If \(I(t)=30+3t\) and \(O(t)=12+2t\), find net inflow.
Check Your Work \((I-O)(t)=18+t\).

2.4.2 Composition of functions

Composite function. The function \((f\circ g)(x)=f(g(x))\), formed by using the output of \(g\) as the input of \(f\).

Composition order matters. In general, \(f\circ g\) differs from \(g\circ f\). Its domain consists of inputs in the domain of \(g\) whose outputs also lie in the domain of \(f\).

Worked Example: Composing radius and area

A circular spill radius grows as \(r(t)=24+8t\), and area is \(A(r)=\pi r^2\). Then

\[(A\circ r)(t)=\pi(24+8t)^2.\]

The composition converts time directly to area.

Try It. If a circular tank radius is \(r(t)=2+0.1t\), write its surface area as a function of time.
Check Your Work \(A(t)=\pi(2+0.1t)^2\).

2.4.3 One-to-one and onto functions

One-to-one function. A function in which distinct inputs always produce distinct outputs.

The horizontal line test identifies one-to-one graphs. Algebraically, assume \(f(a)=f(b)\) and show that \(a=b\). To prove that a function is not one-to-one, one counterexample with two inputs sharing an output is enough.

Onto function. A function whose range equals its stated codomain.

Onto depends on the codomain. The rule \(f(x)=x^2\) from \(\mathbb R\) to \(\mathbb R\) is not onto because it produces no negative outputs. The same rule from \(\mathbb R\) to \([0,\infty)\) is onto.

Worked Example: Testing one-to-one behaviour

For \(f(x)=5(x-2)^5-7\), suppose \(f(a)=f(b)\). Then \((a-2)^5=(b-2)^5\), so \(a-2=b-2\) and \(a=b\). Therefore, \(f\) is one-to-one.

Try It. Is \(h(x)=x^2-3x\) one-to-one on \(\mathbb R\)?
Check Your Work No. For example, \(h(0)=0\) and \(h(3)=0\).

2.4.4 Inverse functions

Inverse function. A function \(f^{-1}\) that reverses a one-to-one function, so \(f^{-1}(f(x))=x\) on the domain of \(f\).

The notation \(f^{-1}(x)\) does not mean \(1/f(x)\). To find an inverse, first establish that \(f\) is one-to-one, write \(y=f(x)\), interchange \(x\) and \(y\), solve for \(y\), and rename the result \(f^{-1}(x)\). The domain and range exchange roles. Verify the result with both compositions.

Worked Example: Inverting a calibration function

For \(V(C)=0.12C+0.8\), write \(y=0.12C+0.8\) and solve for \(C\):

\[C=\frac{y-0.8}{0.12}.\]

Thus \(V^{-1}(x)=(x-0.8)/0.12\), which converts sensor voltage back to concentration.

Try It. Find the inverse of \(f(x)=3x-5\).
Check Your Work \(f^{-1}(x)=(x+5)/3\).

Applied Problem: Building and reversing a sensor model. A linear sensor converts chlorine concentration \(C\) in mg/L to voltage using \(V(C)=1.5C+0.4\). Find the voltage at 0.8 mg/L, derive the inverse function, and use it to find the concentration corresponding to 2.2 V.

Check Your Work \(V(0.8)=1.6\) V. Solving \(V=1.5C+0.4\) gives \(C=(V-0.4)/1.5\), so \(V^{-1}(x)=(x-0.4)/1.5\). At 2.2 V, \(C=(2.2-0.4)/1.5=1.2\) mg/L.

2.4.5 Practice Problems

  1. If \(f(x)=x+2\) and \(g(x)=x^2\), find \((f+g)(x)\).
    Check Your Work \(x^2+x+2\).
  2. For the same functions, find \((f\circ g)(x)\).
    Check Your Work \(x^2+2\).
  3. For the same functions, find \((g\circ f)(x)\).
    Check Your Work \((x+2)^2\).
  4. Is \(f(x)=4x+1\) one-to-one on \(\mathbb R\)?
    Check Your Work Yes. It is a nonconstant linear function.
  5. Find the inverse of \(f(x)=(2x+1)/(x-3)\).
    Check Your Work \(f^{-1}(x)=(3x+1)/(x-2)\), with \(x\ne2\).
  6. Inflow is \(I(t)=50+4t\) and outflow is \(O(t)=22+t\). Find net flow.
    Check Your Work \(I(t)-O(t)=28+3t\) L/s.
  7. Pipe radius is \(r(d)=d/2\) and area is \(A(r)=\pi r^2\). Find \((A\circ r)(d)\).
    Check Your Work \(A(d)=\pi(d/2)^2=\pi d^2/4\).
  8. A sensor function is \(S(C)=0.25C+1\). Find its inverse and the concentration at output 3.5.
    Check Your Work \(S^{-1}(x)=4(x-1)\). At 3.5, \(C=10\).