I received a couple questions about the last exercise on the WebWork set “Functions – Operations” in which you are given two functions $f$ and $g$, and are asked to write down the compositions $(f \circ g)(x)$ and $(g \circ f)(x)$, and also write down their domains.

For example, let’s take

$f(x) = \sqrt{44 – 5x}$ and $g(x) = 5x^2 – 1$

Then $(f \circ g)(x) = f(g(x)) = \sqrt{44 – 5(5x^2 – 1)} = \sqrt{49 – 25x^2}$

and hence to find the domain of $f \circ g$, we need to solve the inequality:

$49 – 25x^2 \geq 0$

$49 \geq 25x^2$

$x^2 \leq 49/25$

$- 7/5 \leq x \leq 7/5$

i.e., the domain is $[ – 7/5 , 7/5 ]$.

Composing the functions in the opposite order:

$(g \circ f)(x) = g(f(x)) = 5(\sqrt{44 – 5x})^2 – 1 = 5(44-5x) – 1 = 219 – 25x$

Now it would seem that therefore the domain of $g \circ f$ is all real numbers, i.e., $(\infty, \infty)$, but this is incorrect, because it ignores that we simplified $(\sqrt{44 – 5x})^2$ to $44-5x$; the domain $(g \circ f)$ is actually restricted by the square root.

Another way of seeing this is to notice that, in order to calculate $(g \circ f)(x) = g(f(x))$ for a given input value of $x$, we first have to calculate $f(x) = \sqrt{44 – 5x}$ (and then we plug that value into $g$).

Hence, the domain of $(g \circ f)(x)$ is restricted to those inputs $x$ such that $44 – 5x \geq 0$, i.e., $x \leq 44/5$.