# Composite Function

## Basic Concept

Given two functions, $$f(x)$$ and $$g(x)$$, both functions can create composite functions $$fg$$ and $$gf$$.

Composite function $$fg$$

Composite function of $$fg$$ can be done by substituting the function of g into the function of f.

One condition must be satisfied, range of function of g is subset of domain of function of f ($$R_g \subseteq D_f$$)

Composite function $$gf$$

Composite function of $$gf$$ can be done by substituting the function of f into the function of g.

One condition must be satisfied, range of function of f is subset of domain of function of g ($$R_f \subseteq D_g$$)

###### Example 1

Given two functions:

$$f(x) = x^2, \: x \in R$$

$$g(x) = \sqrt{x}, \: x \geq 0$$

(i) determine if composite function $$fg$$ exists

(ii) determine the composite functions $$fg$$ if it exists

(i) determine if composite function $$fg$$ exists

Composite function $$fg$$ is exist if $$R_g \subseteq D_f$$

$$R_g: y \geq 0$$

$$D_f: x \in R$$

Since $$R_g$$ is a subset of $$D_f$$, $$R_g \subseteq D_f$$, hence composite function $$fg$$ exists

(ii) determine the composite functions $$fg$$ if it exists

Substiitute the function g into the function f

\begin{equation*} \begin{split} fg & = (\sqrt{x})^2 \\ fg & = x \end{split} \end{equation*}

###### Example 2

Given two functions:

$$f(x) = 2x + 5, \: x \in R$$

$$g(x) = \ln x, \: x > 0$$

(i) determine if composite function $$gf$$ exists

(ii) determine the composite functions $$gf$$ if it exists

(i) determine if composite function $$gf$$ exists

Composite function $$gf$$ is exist if $$R_f \subseteq D_g$$

$$R_f: y \in R$$

$$D_g: x > 0$$

Since $$R_f$$ is not a subset of $$D_g$$, $$R_f \nsubseteq D_g$$, hence composite function $$gf$$ does not exist

(ii) determine the composite functions $$gf$$ if it exists

The composite function $$gf$$ does not exist.