# Domain of composition of functions

I'm teaching a precalculus course and was wanting to let my students try to solve the following problem. If

$$f(x)=\sqrt{x}, g(x)=\frac{x}{x-1},h(x)=\sqrt[3]{x}$$

Find the domain of

$$f\circ g\circ h$$

We have the following.

$$(f\circ g\circ h)(x)=f(g(\sqrt[3]{x}))=f(\frac{\sqrt[3]{x}}{\sqrt[3]{x}-1})=\sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{x}-1}}$$

Here is where things get interesting. To find the domain of this function, I need to find where

$$\frac{\sqrt[3]{x}}{\sqrt[3]{x}-1}\geq0$$

And this happens when the numerator and denominator have the same sign. Solving the inequality gives me that 0 and 1 are critical points, so I have the following intervals to test for the domain

$$(-\infty,0),(0,1),(1,\infty)$$

Testing points in each interval shows that only the middle interval doesn't satisfy the inequality. Thus, the domain of the composition is

$$(-\infty,0],(1,\infty)$$

However, when I double check this with Wolframalpha and with Symbolab, they both tell me the domain is

$$\{0\}\cup(1,\infty)$$

I have double checked my work, and even just blindly inputting test values such as -1 gives me a valid output, so I'm wondering what is going on? On Desmos, I graphed the function and it did include the negative portion of the domain. The only thing I can think of is maybe the other sites are simplifying the expression to get

$$\frac{x^{\frac{1}{6}}}{\sqrt{\sqrt[3]{x}-1}}$$

and maybe they are hesitant to input negative values into the 6th root. However, if you do this, the complex numbers end up cancelling and you get a real numbered answer.

Any ideas on what is going on?

• As an aside, my personal crusade is that problems like this should be described as composition of partial functions. Or, at least, should be described as something like "find the largest subset of real numbers on which this expression actually describes a well-defined function". – user14972 Aug 29 '18 at 21:33
• @Hurkyl : I agree. A rule of assignment is not a function — the domain and range must be specified as well before you can call it that. OP should strive to reinforce this idea if he is teaching a precalculus course. – MPW Aug 30 '18 at 3:21
• Our curriculum is set up in such a way where we rarely define the domain and range beforehand, but have the students figure it out, unless we are dealing with piecewise functions, or finding inverses of certain functions such as x^2. I don't see how this would be a composition of partial functions (which is something we certainly don't cover in the curriculum) as we are dealing the entire domain of the expression. – JohnC Aug 30 '18 at 22:08

The fact is that Wolfram assumes the domain $x\ge 0$ for the function $\sqrt[3] x$ even if for $x \in \mathbb{R}$ the function is well defined on the whole domain.
Usually, for $\alpha \notin \mathbb N$, mathematical packages only define $x \mapsto x^\alpha$ for $x \ge 0$.