💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!

# Find the functions (a) $f \circ g,$ (b) $g \circ f,$ (c) $f \circ f,$ and (d) $g \circ g$ and their domains.$$f(x)=x+\frac{1}{x}, \quad g(x)=\frac{x+1}{x+2}$$

## $f(x)=x+\frac{1}{x}, \quad D=\{x | x \neq 0\} ; \quad g(x)=\frac{x+1}{x+2}, \quad D=\{x | x \neq-2\}$(a) $(f \circ g)(x)=f(g(x))=f\left(\frac{x+1}{x+2}\right)=\frac{x+1}{x+2}+\frac{1}{\frac{x+1}{x+2}}=\frac{x+1}{x+2}+\frac{x+2}{x+1}$$=\frac{(x+1)(x+1)+(x+2)(x+2)}{(x+2)(x+1)}=\frac{\left(x^{2}+2 x+1\right)+\left(x^{2}+4 x+4\right)}{(x+2)(x+1)}=\frac{2 x^{2}+6 x+5}{(x+2)(x+1)}since g(x) is not defined for x=-2 and f(g(x)) is not defined for x=-2 and x=-1,the domain of (f \circ g)(x) is D=\{x | x \neq-2,-1\}.(b) (g \circ f)(x)=g(f(x))=g\left(x+\frac{1}{x}\right)=\frac{\left(x+\frac{1}{x}\right)+1}{\left(x+\frac{1}{x}\right)+2}=\frac{\frac{x^{2}+1+x}{x}}{\frac{x^{2}+1+2 x}{x}}=\frac{x^{2}+x+1}{x^{2}+2 x+1}=\frac{x^{2}+x+1}{(x+1)^{2}}since f(x) is not defined for x=0 and g(f(x)) is not defined for x=-1, the domain of (g \circ f)(x) is D=\{x | x \neq-1,0\}.(c) (f \circ f)(x)=f(f(x))=f\left(x+\frac{1}{x}\right)=\left(x+\frac{1}{x}\right)+\frac{1}{x+\frac{1}{x}}=x+\frac{1}{x}+\frac{1}{\frac{x^{2}+1}{x}}=x+\frac{1}{x}+\frac{x}{x^{2}+1}$$=\frac{x(x)\left(x^{2}+1\right)+1\left(x^{2}+1\right)+x(x)}{x\left(x^{2}+1\right)}=\frac{x^{4}+x^{2}+x^{2}+1+x^{2}}{x\left(x^{2}+1\right)}$$=\frac{x^{4}+3 x^{2}+1}{x\left(x^{2}+1\right)}, \quad D=\{x | x \neq 0\}$$(d)(g \circ g)(x)=g(g(x))=g\left(\frac{x+1}{x+2}\right)=\frac{\frac{x+1}{x+2}+1}{\frac{x+1}{x+2}+2}=\frac{\frac{x+1+1(x+2)}{x+2}}{\frac{x+1+2(x+2)}{x+2}}=\frac{x+1+x+2}{x+1+2 x+4}=\frac{2 x+3}{3 x+5}$since $g(x)$ is not defined for $x=-2$ and $g(g(x))$ is not defined for $x=-\frac{n}{3}$, the domain of $(g \circ g)(x)$ is $D=\left\{x | x \neq-2,-\frac{5}{3}\right\}$.

### Discussion

You must be signed in to discuss.
##### Lily A.

Johns Hopkins University

##### Heather Z.

Oregon State University

##### Kristen K.

University of Michigan - Ann Arbor

Lectures

Join Bootcamp

### Video Transcript

Oregon State University
##### Lily A.

Johns Hopkins University

##### Heather Z.

Oregon State University

##### Kristen K.

University of Michigan - Ann Arbor

Lectures

Join Bootcamp