Is the domain of $g(f(x))$ always a subset of domain of $g(x)$?

115 Views Asked by At

Let there be two functions $f(x)=\sqrt{x}$ and $g(x)=\sqrt{2-x}$.

So, $g(f(x))=\sqrt{2-\sqrt{x}}$.

As evident the domain of $g(x)$ is $(-\infty, 2]$ and the domain of $g(f(x))$ is $[0,4]$. But from what I understand about composite functions, the domain of $g(f(x))$ must be a subset of domain of $g(x)$. So according to that, the domain of $g(f(x))$ should be $[0,2]$.

Which one is the correct domain of $g(f(x))$?

3

There are 3 best solutions below

0
On BEST ANSWER

The domain of the function $g(f(x))$ is not always a subset of the domain of $g(x)$. It depends on the specific functions $g(x)$ and $f(x)$. Instead, the domain of $g(f(x))$ must be a subset of the domain of $f(x)$, because before we check if $f(x)$ is in the domain of $g(x)$, we must first check that $x$ is in the domain of $f(x)$.

0
On

The implied domain of a real-valued function of a real variable is the largest subset of the real numbers that when substituted into the function produces real-valued images (output values).

Since $f(x) = \sqrt{x}$ yields real values when $x \geq 0$, the implied domain of $f$ is $[0, \infty)$. The implied domain of $g \circ f$ is the largest subset of the domain of $f$ such that $g \circ f$ is defined. Thus, the domain of $g \circ f$ is the largest subset of nonnegative real numbers such that $$(g \circ f)(x) = g(f(x)) = g(\sqrt{x}) = \sqrt{2 - \sqrt{x}}$$ is defined, which as you correctly determined is $[0, 4]$.

2
On

Warning, $f(x)$ is a number and $f$ is a function. You cannot write "domain of $f(x)$", the correct statement is "domain of $f$".

$g\circ f(x)$ exists if and only if $f(x)$ exists and $f(x)$ is in the domain of $g$.

Thus $x$ must be in the domain of $f$ and $f(x)$ must be in the domain of $g$. So $x$ is in a subset of domain of $f$

More precisely, if $D_f$ is the domain of $f$ and $D_g$ is the domain of $g$, then the domain of $g\circ f$ is $f^{-1}(D_g)$ (which is obviously included in $D_f$)

With your example, $D_f=\mathbb{R}^+$ and $D_g=(-\infty,2]$. You can see that $f^{-1}(D_g)=f^{-1}\left([0,2]\right)=[0,4]$ and this is the domain of $g\circ f$