# Give a example of two functions h(x) and g(x), such

Give a example of two functions h(x) and g(x), such that (h o g) (x) does not exist.

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

Cristiano Sears
One way to do this is to find a function gg whose range is the set of nonnegative numbers and a function hh whose domain is the set of negative numbers. That way, there is no domain over which h∘g exists.
The easiest examples of functions that don't have R as their domain or range are rational functions like
$$\displaystyle{f{{\left({x}\right)}}}=\frac{{1}}{{x}}$$
which are not defined anywhere where the denominator is zero and often have restricted ranges as well and the square root function
$$\displaystyle{f{{\left({x}\right)}}}=√{x}$$
whose domain and range are all nonnegative numbers.
The first won't help us with our strategy, but we can see that the second immediately works as our function gg. So then we just need to find an hh whose domain is the set of negative numbers (or a subset of the negative numbers will also work). Here's the trick, let's modify the part under the radical in the square root function so that it's nonnegative only when xx is negative.
Here's one example of how you can do that
$$\displaystyle{h}{\left({x}\right)}=√{\left(-{x}−{1}\right)}$$
If you think about the graph of −x−1, you'll see that it's only nonnegative when $$\displaystyle{x}∈{\left(−∞,−{1}\right]}$$. And since a square root is only defined (over the reals) for nonnegative values, that means that that is the domain of this function.
So then with these choices for gg and h, h∘g does not exist. That is, there is no xx that you could possibly put into $$\displaystyle{\left({h}∘{g}\right)}{\left({x}\right)}=√−√{x}−{1}$$ that results in a real number.