For composite function: $$f(g(x))$$
where $$f(x)=-5-|x|$$
and $$g(x)=\sqrt x$$
what is the correct expansion of $$f(g(x)) ?$$
Is it: $$-5-\sqrt \lvert x \rvert$$
Or should it be written: $$-5-\lvert \sqrt x\rvert ?$$
In the first case, I believe the domain to be $x \in \mathbb{R}$, since the absolute value function renders all $x \geq 0$, so it is never the case that the radical is negative. However the second case implies that the domain is restricted to $x \geq 0$
The text I am working out of gives the answer to the question of the domain as $x \geq 0$. This suggests to me that the authors rendered $f(g(x))$ as $-5-\lvert \sqrt x\rvert $
However a graphing calculator I am using (in which I have defined the functions $f(x)$ and $g(x)$ as above) converts $f(g(x))$ to: $$-(\sqrt \lvert x \rvert)-5$$ and thus the domain is $x \in \mathbb{R}$ such that it’s graph is a “wave crest” with peak -5 at $x=0$. This is again contrary to the text which says that the graph is the reflection of the $\sqrt x$ “reflected in the y” axis.
In all probability, the authors are right and I’m still getting a handle on how to use and define functions in the graphing calculator (NCalc Fx).
Screenshots for clarity.


Just work it out step by step. We have that
$$f(g(x)) = - 5 - |g(x)| = - 5 - |\sqrt x|$$
The graphing calculator is wrong. For what it's worth, a different graphing calculator, Desmos, agrees with me.
Actually the domain includes $x=0$.