# If $f(x)=\sqrt{1-x}$ and $g(x)=\log _{e} x$ are two real functions, then describe functions fog and $g \circ f$.

Question.
If $f(x)=\sqrt{1-x}$ and $g(x)=\log _{e} x$ are two real functions, then describe functions fog and $g \circ f$.

Solution:
$f(x)=\sqrt{1-x}$
For domain, $1-\mathrm{x} \geq 0$
$\Rightarrow x \leq 1$
$\Rightarrow$ domain of $f=(-\infty, 1]$
$\Rightarrow f:(-\infty, 1] \rightarrow(0, \infty)$
$g(x)=\log _{e} x$
Clearly, $g:(0, \infty) \rightarrow R$
Computation of $\mathrm{fog}$ :
Clearly, the range of $g$ is not a subset of the domain of $f$.
So, we need to compute the domain of fog.
$\Rightarrow$ Domain $(f o g)=\{x: x \in$ Domain $(g)$ and $g(x) \in$ Domain of $\mathrm{f}\}$
$\Rightarrow$ Domain $(f o g)=\left\{x: x \in(0, \infty)\right.$ and $\left.\log _{e} \mathrm{x} \in(-\infty, 1]\right\}$
$\Rightarrow$ Domain $(f o g)=\{x: x \in(0, \infty)$ and $x \in(0, e]\}$
$\Rightarrow$ Domain $(f o g)=\{x: x \in(0, e]\}$
$\Rightarrow$ Domain $(f o g)=(0, \mathrm{e}]$
$\Rightarrow$ fog $:(0, e) \rightarrow R$ So, $(f o g)(x)=f(g(x))$
$=f\left(\log _{e} x\right)$
$=\sqrt{1-\log _{e} x}$
Computation of $g o f:$
Clearly, the range of $f$ is a subset of the domain of $g$.
$\Rightarrow g \circ f:(-\infty, 1] \rightarrow R$
$\Rightarrow(g o f)(x)=g(f(x))$
$=g(\sqrt{1-x})$
$=\log _{e} \sqrt{1-x}$
$=\log _{e}(1-x)^{\frac{1}{2}}$
$=\frac{1}{2} \log _{e}(1-x)$