# How do you compute (fog) and (gof) if f(x)= x/(x-2), g(x)=3/x?

Jan 2, 2016

$\left(f \circ g\right) \left(x\right) = \frac{3}{3 - 2 x} , \left(g \circ f\right) \left(x\right) = \frac{3 \left(x - 2\right)}{x}$

#### Explanation:

$\left(f \circ g\right) \left(x\right)$ is the same as $f \left(g \left(x\right)\right)$. This means that you take $g \left(x\right)$, or $\frac{3}{x}$, plug it in for all the spots with $x$ in $f \left(x\right)$.

$f \left(g \left(x\right)\right) = \frac{\frac{3}{x}}{\frac{3}{x} - 2}$

Find a common denominator in the denominator.

$f \left(g \left(x\right)\right) = \frac{\frac{3}{x}}{\frac{3}{x} - \frac{2 x}{x}}$

Simplify.

$f \left(g \left(x\right)\right) = \frac{\frac{3}{x}}{\frac{3 - 2 x}{x}}$

Multiply by $\frac{x}{x}$.

$f \left(g \left(x\right)\right) = \frac{3}{3 - 2 x} = \left(f \circ g\right) \left(x\right)$

To find $\left(g \circ f\right) \left(x\right)$, use a similar method: plug $\frac{x}{x - 2}$ into the $x$ in $\frac{3}{x}$.

$g \left(f \left(x\right)\right) = \frac{3}{\frac{x}{x - 2}}$

Recall that division is the same as multiplying by the reciprocal.

$g \left(f \left(x\right)\right) = 3 \left(\frac{x - 2}{x}\right)$

$g \left(f \left(x\right)\right) = \frac{3 \left(x - 2\right)}{x} = \left(g \circ f\right) \left(x\right)$