# Finding the Domain and Range of a function composition

I'm having trouble finding the domain and range of a function composition.

$f(x) = x^2 - 3x$

$g(x) = \sqrt{x}$

$(g \circ f)(x) = g(f(x)) = \sqrt{(x^2 - 3x)}$

How do I find the domain and range of $(g \circ f)(x)$?

(I know the answer because it's in the back of the book, but please tell me how?)

• At $x=0$ we get $g\circ f(0)=0$ and for other values for $x$, that $$\sqrt{.}$$ makes the function positive. – mrs Sep 25 '13 at 4:55
The outer function $g:\ y\mapsto\sqrt{\mathstrut y}$ is defined when $y\geq 0$. The inner function $f:\ x\mapsto y:=x(x-3)$ is $\geq0$ when $x\leq0$ or $x\geq 3$, and is $<0$ when $0<x<3$. It follows that the domain of $g\circ f$ is ${\mathbb R}\setminus\>]0,3[\$.
Since the graph of $f$ is a parabola it follows that $f$ takes all values $y\in{\mathbb R}_{\geq0}$ when $x$ goes from $3$ to $\infty$, and the same is true when $x$ goes from $-\infty$ to $0$. Since $g$ maps the set ${\mathbb R}_{\geq0}$ onto itself we therefore conclude that the range of $g\circ f$ is ${\mathbb R}_{\geq0}$, whereby each value is taken exactly two times.