[Math] Domain and Range for composite function

algebra-precalculuscalculusfunction-and-relation-compositionfunctions

Given the function $f(x) = x^2$ with the domain $[0, \infty)$ and
$g(x) = \sin(x)$ with domain $(- \infty, \infty)$. What are the domain
and range of $f(g(x))$ and $(g(f(x))$?

I start the problem by finding both $f(g(x))$ and $g(f(x))$. It appears that:

$g(f(x)) = \sin(x^2)$ and $f(g(x)) = (\sin(x))^2$

First, I consider the composition function $f(g(x))$:

We know that $Dom(g)$ is given by $(- \infty, \infty)$, and the $Ran(g)$ is $ [-1,1].$ We also know that $Dom(f)$ is given by $[0,\infty)$, and $Ran(f) = [0,\infty)$.

I realize that $Ran(g)$ is not a subset of $Dom(f)$. So, this does not exist (?)

For the second one, I realize that $Ran(f) \subset Dom(g),$ hence, the domain for $g(f(x)) = [0,\infty)$. Since $\sin(x)$ oscillates, then the range for $g(f(x)) = [-1,1]$.

Am i right? Thank you in advance.

Best Answer

You are wrong about the domain of $f$.

$f(x)=x^2$ has the domain $(-\infty,\infty)$. Therefore $Ran(g)$ is actually a subset of $Dom(f)$.

The domains of $f(g(x))$ and $g(f(x))$ are both $(-\infty,\infty)$: i.e. $\mathbb R$, all real numbers.

The range of $f(g(x))=(\sin(x))^2$ is $[0,1]$. The zero is attained at $x=0$ and the one at $x=\frac{\pi}2$. The continuity of the functions guarantees that all intermediate values are also attained.

The range of $g(f(x))=\sin(x^2)$ is $[-1,1]$. The minus-one is attained at $x=\sqrt{\frac{3\pi}2}$ and the one at $x=\sqrt{\frac\pi 2}$. The continuity of the functions guarantees that all intermediate values are also attained.

enter image description here

Related Question