# Range and domain

## Homework Statement

Given two functions f(x)=\frac{x}{x+1} , g(x)=\frac{x+2}{x}

(1) find the domain of f and g

so D_f all real x , $$x\neq -1$$

D_g is all real x , $$x\neq 0$$

(2) Find the composite function gf and state its domain and range

g o f = 3+ 2/x , then its domain would be all x , $$x\neq 0$$ , am i correct ?

What is the easiest way to find its range , graph sketching ?

Mark44
Mentor

## Homework Statement

Given two functions f(x)=\frac{x}{x+1} , g(x)=\frac{x+2}{x}
\frac{}{} is a LaTeX command, so needs to be inside [ tex] tags, like this:
$$f(x)=\frac{x}{x+1}$$
$$g(x)=\frac{x + 2}{x}$$
Double-click either one to see what I did.
(1) find the domain of f and g

so D_f all real x , $$x\neq -1$$

D_g is all real x , $$x\neq 0$$

(2) Find the composite function gf and state its domain and range

g o f = 3+ 2/x , then its domain would be all x , $$x\neq 0$$ , am i correct ?

What is the easiest way to find its range , graph sketching ?

Part 1 is right, but part 2 isn't. (g o f)(x) = g(f(x)) = $$g(1 + 2/x)$$
Think about what g does to an input...

\frac{}{} is a LaTeX command, so needs to be inside [ tex] tags, like this:
$$f(x)=\frac{x}{x+1}$$
$$g(x)=\frac{x + 2}{x}$$
Double-click either one to see what I did.

Part 1 is right, but part 2 isn't. (g o f)(x) = g(f(x)) = $$g(1 + 2/x)$$
Think about what g does to an input...

thanks Mark , but did u mean (g o f)(x)=g(x/(x+1)) ?

If so , i can see that g can take all real x , except for x=-1 from f and g itself has its own restriction so after combining , the domain of g o f would be all real x , except for x=-1 and x=0 .

Am i correct ? so i can apply this way of checking for all such questions ?

Also , whats the easiest way to find the range for this question ? I can sketch the graph but would it be tedious to do so ?

Mark44
Mentor
thanks Mark , but did u mean (g o f)(x)=g(x/(x+1)) ?
Yes, what you have is right. I mistakenly put in the formula for g(x), but meant to put in the formula for f(x).
If so , i can see that g can take all real x , except for x=-1 from f and g itself has its own restriction so after combining , the domain of g o f would be all real x , except for x=-1 and x=0 .
Right.
$$g(f(x)) = g\left(\frac{x}{x + 1}\right) = 1 + \frac{\frac{x}{x+1} + 2}{\frac{x}{x+1}}$$
The last expression can be simplified, but it's OK for our purposes right now. That expression is undefined if x = -1, because the two denominators in the rational expressions in the main numerator and denominator will be zero. The expression is also undefined if x = 0, since that would make the rational expression in the main denominator zero.

If you simplify that latter expression by multiplying top and bottom by (x + 1)/x over itself, you get f(g(x)) = 3 + 2/x, so it's no longer obvious that x can't be -1, but the only way that simplification could occur is if x is neither -1 nor 0.
Am i correct ? so i can apply this way of checking for all such questions ?

Also , whats the easiest way to find the range for this question ? I can sketch the graph but would it be tedious to do so ?

Each of the graphs that make up the composite function is relatively easy to sketch. f(x) = x/(x + 1) = 1 - 1/(x + 1), by long division, and this is related to y = 1/x, but with a reflection and two translations, one horizontal and one vertical. Rf = {y | y != 1}.

g(x) = (x + 2)/x = 1 + 2/x, and this is also related to y = 1/x, with a stretch and a vertical translation. It turns out that Rg = {y | y != 1}.

Yes, what you have is right. I mistakenly put in the formula for g(x), but meant to put in the formula for f(x).
Right.
$$g(f(x)) = g\left(\frac{x}{x + 1}\right) = 1 + \frac{\frac{x}{x+1} + 2}{\frac{x}{x+1}}$$
The last expression can be simplified, but it's OK for our purposes right now. That expression is undefined if x = -1, because the two denominators in the rational expressions in the main numerator and denominator will be zero. The expression is also undefined if x = 0, since that would make the rational expression in the main denominator zero.

If you simplify that latter expression by multiplying top and bottom by (x + 1)/x over itself, you get f(g(x)) = 3 + 2/x, so it's no longer obvious that x can't be -1, but the only way that simplification could occur is if x is neither -1 nor 0.

Each of the graphs that make up the composite function is relatively easy to sketch. f(x) = x/(x + 1) = 1 - 1/(x + 1), by long division, and this is related to y = 1/x, but with a reflection and two translations, one horizontal and one vertical. Rf = {y | y != 1}.

g(x) = (x + 2)/x = 1 + 2/x, and this is also related to y = 1/x, with a stretch and a vertical translation. It turns out that Rg = {y | y != 1}.

got it , thanks Mark , that helps a tons , appreciate that ! Have a nice day !