Module 4 – Topic 4

Homework Solutions

Try each problem on your own before you open its solution. When a problem gives you trouble, go back to your notes for this topic.

Problem 1

Let \(f(x)=3x-4\) and \(g(x)=x^2+1\). Find:

  1. \((f\circ g)(1)\)
  2. \((g\circ f)(1)\)
  3. \((f\circ g)(-2)\)
  4. \((g\circ f)(0)\)

\((f\circ g)(x)\) means \(f\big(g(x)\big)\). Work from the inside out: find the inside function first, then put that answer into the outside function.

a. \((f\circ g)(1)=f\big(g(1)\big)\). The inside function is \(g\).

\[ \begin{aligned} g(1)&=1^2+1=2 \\ f(2)&=3(2)-4=2 \end{aligned} \]

\((f\circ g)(1)=2\)

b. \((g\circ f)(1)=g\big(f(1)\big)\). Now the inside function is \(f\).

\[ \begin{aligned} f(1)&=3(1)-4=-1 \\ g(-1)&=(-1)^2+1=2 \end{aligned} \]

\((g\circ f)(1)=2\)

c. \((f\circ g)(-2)=f\big(g(-2)\big)\).

\[ \begin{aligned} g(-2)&=(-2)^2+1=5 \\ f(5)&=3(5)-4=11 \end{aligned} \]

\((f\circ g)(-2)=11\)

d. \((g\circ f)(0)=g\big(f(0)\big)\).

\[ \begin{aligned} f(0)&=3(0)-4=-4 \\ g(-4)&=(-4)^2+1=17 \end{aligned} \]

\((g\circ f)(0)=17\)

Notice that parts a and b both came out to \(2\), but that is a coincidence. In general \((f\circ g)(x)\) and \((g\circ f)(x)\) are different, as parts c and d and Problem 2 show.

Problem 2

Let \(f(x)=3x-4\) and \(g(x)=x^2+1\). Find:

  1. \((f\circ g)(x)\)
  2. \((g\circ f)(x)\)
  3. \((f\circ f)(x)\)

To find a composite function, replace the \(x\) in the outside function with the entire inside function, in parentheses. Then simplify.

a. \((f\circ g)(x)=f\big(g(x)\big)\). Put \(x^2+1\) in for \(x\) in \(f(x)=3x-4\).

\[ \begin{aligned} (f\circ g)(x)&=3(x^2+1)-4 \\ &=3x^2+3-4 \\ &=3x^2-1 \end{aligned} \]

b. \((g\circ f)(x)=g\big(f(x)\big)\). Put \(3x-4\) in for \(x\) in \(g(x)=x^2+1\). Square the whole binomial: \((3x-4)^2=(3x-4)(3x-4)\), not \(9x^2+16\).

\[ \begin{aligned} (g\circ f)(x)&=(3x-4)^2+1 \\ &=9x^2-24x+16+1 \\ &=9x^2-24x+17 \end{aligned} \]

c. \((f\circ f)(x)=f\big(f(x)\big)\). Put \(3x-4\) in for \(x\) in \(f(x)=3x-4\).

\[ \begin{aligned} (f\circ f)(x)&=3(3x-4)-4 \\ &=9x-12-4 \\ &=9x-16 \end{aligned} \]

Check with Problem 1: \((f\circ g)(-2)=3(-2)^2-1=11\) and \((g\circ f)(0)=9(0)^2-24(0)+17=17\). Both match.

Problem 3

Let \(f(x)=\dfrac{1}{x-3}\) and \(g(x)=2x+1\). Find \((f\circ g)(x)\) and \((g\circ f)(x)\), and state the domain of each.

Show all of your work.

The domain of \(f\circ g\) is every \(x\) that (1) is in the domain of the inside function, and (2) gives an output the outside function can use. Find the domain before you simplify, so nothing gets lost.

Finding \((f\circ g)(x)\): put \(2x+1\) in for \(x\) in \(f\).

\[ \begin{aligned} (f\circ g)(x)&=\dfrac{1}{(2x+1)-3} \\ &=\dfrac{1}{2x-2} \end{aligned} \]

Domain of \(f\circ g\): the inside function \(g(x)=2x+1\) accepts every real number. The outside function \(f\) cannot have a zero denominator, so set it equal to \(0\) to find the \(x\)-value to exclude.

\[ \begin{aligned} 2x-2&=0 \\ x&=1 \end{aligned} \]

Domain: \((-\infty,\,1)\cup(1,\,\infty)\)

Finding \((g\circ f)(x)\): put \(\dfrac{1}{x-3}\) in for \(x\) in \(g\). To simplify, write \(1\) as \(\dfrac{x-3}{x-3}\) and combine over the common denominator.

\[ \begin{aligned} (g\circ f)(x)&=2\left(\dfrac{1}{x-3}\right)+1 \\ &=\dfrac{2}{x-3}+\dfrac{x-3}{x-3} \\ &=\dfrac{x-1}{x-3} \end{aligned} \]

Domain of \(g\circ f\): the inside function \(f(x)=\dfrac{1}{x-3}\) is not defined at \(x=3\), so \(x=3\) must be excluded. The outside function \(g\) accepts every real number, so nothing else is excluded.

Domain: \((-\infty,\,3)\cup(3,\,\infty)\)

Problem 4

Let \(f(x)=\sqrt{x}\) and \(g(x)=x+5\). Find \((f\circ g)(x)\) and \((g\circ f)(x)\), and state the domain of each.

Show all of your work.

Finding \((f\circ g)(x)\): put \(x+5\) in for \(x\) in \(f\).

\[ \begin{aligned} (f\circ g)(x)&=\sqrt{x+5} \end{aligned} \]

Domain of \(f\circ g\): \(g\) accepts every real number. The square root needs what is under it to be \(0\) or more.

\[ \begin{aligned} x+5&\ge0 \\ x&\ge-5 \end{aligned} \]

Domain: \([-5,\,\infty)\)

Finding \((g\circ f)(x)\): put \(\sqrt{x}\) in for \(x\) in \(g\).

\[ \begin{aligned} (g\circ f)(x)&=\sqrt{x}+5 \end{aligned} \]

Domain of \(g\circ f\): the inside function \(\sqrt{x}\) needs \(x\ge0\). The outside function \(g\) accepts every real number.

Domain: \([0,\,\infty)\)

Problem 5

Let \(f(x)=\dfrac{2}{x}\) and \(g(x)=x-4\). Find \((f\circ g)(x)\) and \((g\circ f)(x)\), and state the domain of each.

Show all of your work.

Finding \((f\circ g)(x)\): put \(x-4\) in for \(x\) in \(f\).

\[ \begin{aligned} (f\circ g)(x)&=\dfrac{2}{x-4} \end{aligned} \]

Domain of \(f\circ g\): \(g\) accepts every real number. The denominator cannot be \(0\), and \(x-4=0\) at \(x=4\).

Domain: \((-\infty,\,4)\cup(4,\,\infty)\)

Finding \((g\circ f)(x)\): put \(\dfrac{2}{x}\) in for \(x\) in \(g\). To combine, write \(4\) as \(\dfrac{4x}{x}\).

\[ \begin{aligned} (g\circ f)(x)&=\dfrac{2}{x}-4 \\ &=\dfrac{2}{x}-\dfrac{4x}{x} \\ &=\dfrac{2-4x}{x} \end{aligned} \]

Domain of \(g\circ f\): the inside function \(\dfrac{2}{x}\) is not defined at \(x=0\). The outside function \(g\) accepts every real number.

Domain: \((-\infty,\,0)\cup(0,\,\infty)\)

Problem 6

Let \(f(x)=x^2\) and \(g(x)=x+1\). Find all \(x\) for which \((f\circ g)(x)=9\).

Show all of your work.

First find \((f\circ g)(x)\) by putting \(x+1\) in for \(x\) in \(f\).

\[ \begin{aligned} (f\circ g)(x)&=(x+1)^2 \end{aligned} \]

Set it equal to \(9\) and solve. Take the square root of both sides, and remember both the positive and the negative root.

\[ \begin{aligned} (x+1)^2&=9 \\ x+1&=\pm3 \end{aligned} \]

Solve each equation.

\[ \begin{aligned} x+1=3 &\quad\text{or}\quad x+1=-3 \\ x=2 &\quad\text{or}\quad x=-4 \end{aligned} \]

Check: \((2+1)^2=9\) and \((-4+1)^2=(-3)^2=9\). Both work.

The answers are \(x=2\) and \(x=-4\).

Problem 7

Find the vertical and horizontal asymptotes of \(f(x)=\dfrac{2x-1}{x+5}\).

Nothing factors, so nothing cancels.

Vertical asymptote: the denominator is \(0\) when \(x+5=0\), so \(x=-5\)

Horizontal asymptote: the degrees are equal (both \(1\)), so divide the leading coefficients: \(y=\tfrac21=2\)

Problem 8

Find the intercepts of \(f(x)=x^2-2x-8\). State each as an ordered pair.

Show all of your work.

\(x\)-intercepts: set \(f(x)=0\) and factor.

\[ \begin{aligned} x^2-2x-8&=0 \\ (x-4)(x+2)&=0 \end{aligned} \]

So \(x=4\) or \(x=-2\). The \(x\)-intercepts are \((4,\,0)\) and \((-2,\,0)\).

\(y\)-intercept: find \(f(0)=0^2-2(0)-8=-8\), so \((0,\,-8)\)

Problem 9

Find and simplify the difference quotient for \(f(x)=x^2-3x\).

Show all of your work.

The difference quotient is \(\dfrac{f(x+h)-f(x)}{h}\). First find \(f(x+h)\) by putting \(x+h\) in for every \(x\).

\[ \begin{aligned} f(x+h)&=(x+h)^2-3(x+h) \\ &=x^2+2xh+h^2-3x-3h \end{aligned} \]

Subtract \(f(x)=x^2-3x\). Use parentheses so the subtraction reaches both terms. The \(x^2\) and \(-3x\) terms cancel.

\[ \begin{aligned} f(x+h)-f(x)&=\left(x^2+2xh+h^2-3x-3h\right) \\ &\quad-\left(x^2-3x\right) \\ &=2xh+h^2-3h \end{aligned} \]

Divide by \(h\). Every term has a factor of \(h\), so factor it out and cancel.

\[ \begin{aligned} \dfrac{f(x+h)-f(x)}{h}&=\dfrac{h(2x+h-3)}{h} \\ &=2x+h-3 \end{aligned} \]