Skip to main content

Section 1.2 Combining Functions

This section focuses on arithmetic combination of functions and composition and the effect of these operations on domains and graphs.

Example 1.2.2.

The functions \(f(x)=\frac{1}{x}\) and \(g(x)=\sqrt{9-x^2}\) have domains \((-\infty,0)\cup (0,\infty)\) and \([-3,3]\text{,}\) respectively.

What are the domains of

  • \(\displaystyle (f+g)(x)=\frac{1}{x}+\sqrt{9-x^2}\)

  • \(\displaystyle (f-g)(x)=\frac{1}{x}-\sqrt{9-x^2}\)

  • \(\displaystyle (fg)(x)=\frac{1}{x}\sqrt{9-x^2}\)

Answer.

\([-3,0)\cup (0,3]\)

Example 1.2.4.

The functions \(f(x)=\frac{1}{x}\) and \(g(x)=\sqrt{9-x^2}\) have domains \((-\infty,0)\cup (0,\infty)\) and \([-3,3]\text{,}\) respectively.

What are the domains of

  • \(\displaystyle \left(\frac{f}{g}\right)(x) = \frac{1/x}{\sqrt{9-x^2}}\)

  • \(\displaystyle \left(\frac{g}{f}\right)(x) = \frac{\sqrt{9-x^2}}{1/x}\)

Answer.
  • \(\displaystyle (-3,0)\cup(0,3)\)

  • \([-3,0)\cup(0,3]\) (note this is not the same as \([-3,3]\text{;}\) also note that this is not the same as the domain of the function \(x\sqrt{9-x^2}\))

Definition 1.2.5.

Given functions \(f\) and \(g\text{,}\) the composition \(f\circ g\) is defined by \((f\circ g)(x)=f(g(x))\text{.}\)

Example 1.2.6.

The functions \(f(x)=\frac{1}{x}\) and \(g(x)=\sqrt{9-x^2}\) have domains \((-\infty,0)\cup (0,\infty)\) and \([-3,3]\text{,}\) respectively.

Find the values of \((f \circ g)(2)\text{,}\) \((g \circ f)(2)\) and formulas for \(f\circ g\) and \(g \circ f\text{.}\)

Answer.
  • \(\displaystyle (f \circ g)(2)=\frac{1}{\sqrt{5}}\)

  • \(\displaystyle (g \circ f)(2)=\sqrt{8\frac{3}{4}}=\frac{\sqrt{35}}{2}\)

  • \(\displaystyle (f \circ g)(x)=\frac{1}{\sqrt{9-x^2}}\)

  • \(\displaystyle (g \circ f)(x)=\sqrt{9-\left(\frac{1}{x}\right)^2}\)

Example 1.2.8.

The functions \(f(x)=\frac{1}{x}\) and \(g(x)=\sqrt{9-x^2}\) have domains \((-\infty,0)\cup (0,\infty)\) and \([-3,3]\text{,}\) respectively.

Find the domains of \(f\circ g\) and \(g \circ f\text{.}\)

Answer.
  • domain of \(f \circ g\text{:}\) \((-3,3)\)

  • domain of \(g \circ f\text{:}\) \((-\infty,-1/3)\cup(1/3,\infty)\)

Example 1.2.9.

Let \(f(x)=\sqrt{x}\) and \(g(x)=x^2\text{.}\)

Find the domains of \(f\circ g\) and \(g \circ f\text{.}\)

Example 1.2.10.

Let \(f(x) = x+5\text{,}\) \(g(x)=x^2\text{,}\) \(h(x) = -3x\text{,}\) \(j(x) = \sqrt{x}\text{,}\) and \(k(x) = \ln x\text{.}\) Express each of the following as a composition of one or more of the previous functions.

  1. \(\displaystyle y = \sqrt{x+5}\)

  2. \(\displaystyle y = \ln(x) + 5\)

  3. \(\displaystyle y = x^2+5\)

  4. \(\displaystyle y = -3x-15\)

  5. \(\displaystyle y = \sqrt{-3x}\)

  6. \(\displaystyle y = \ln(x^2+5)\)

Subsection 1.2.1 Transformations

Definition 1.2.11.

The graph of \(y=f(x)+k\) is a vertical shift of the graph of \(f\) by \(k\) units up.

The graph of \(y=f(x-h)\) is a horizontal shift of the graph of \(f\) by \(h\) units right.

Definition 1.2.14.

The graph of \(y=cf(x)\text{,}\) for \(c \gt 1\) is a vertical stretch of \(f\) by a factor of \(c\text{.}\)

The graph of \(y=cf(x)\text{,}\) for \(0 \lt c \lt 1\) is a vertical compression of \(f\) by a factor of \(c\text{.}\)

The graph of \(y=f(cx)\text{,}\) for \(c \gt 1\) is a horizontal compression of \(f\) by a factor of \(c\text{.}\)

The graph of \(y=f(cx)\text{,}\) for \(0 \lt c \lt 1\) is a horizontal stretch of \(f\) by a factor of \(c\text{.}\)

The graph of \(y=-f(x)\text{,}\) is a vertical reflection of \(f\text{.}\)

The graph of \(y=f(-x)\text{,}\) is a horizontal reflection of \(f\text{.}\)

Example 1.2.15.

For the function

\begin{equation*} f(x)=\begin{cases} 2 \amp x\leq -5\\ x \amp -5 \lt x \lt 3\\ -\frac{1}{9}x^2+4 \amp x\geq 3 \end{cases} \end{equation*}

sketch graphs of \(y=2f(x)\text{,}\) \(y=-3f(x)\text{,}\) \(y=f\left(\frac{1}{3}x\right)\text{,}\) and \(y=\frac{1}{3}f(2x)-1\text{.}\)

Answer.
Graphs of a transformed function
Figure 1.2.16. Graphs of transformations of a piecewise function, click here for an interactive version 1 .

Example 1.2.17.

Given the function \(y=\sqrt{x}\text{,}\) find the equation for the function shifted 3 units right and 2 units down. Sketch graphs of both.

Answer.

\(y=\sqrt{x-3}-2\)

Example 1.2.18.

Make up a (reasonably simple) piecewise graph \(y=f(x)\text{.}\) Trade with a neighbor and sketch \(y=f(3x)+2\) and \(y=-f(x+2)\text{.}\)

www.desmos.com/calculator/zamg65by0g