2
$\begingroup$

$$f(x) = \frac{1}{x^2} + 1$$

$$g(x) = \frac{1}{x - 1}$$

Do I just insert the $g(x)$ function into the $f(x)$ function giving me this terrible looking thing?:

$$\frac{1}{\frac{1}{x^2}+1-1}$$

Thanks for any help, I really just need confirmation I'm going in the right direction.

$\endgroup$
3
  • $\begingroup$ What you have written is $(g \circ f)(x)$. You need to do the opposite to get $f \circ g$. $\endgroup$
    – bzc
    Commented Oct 18, 2011 at 16:06
  • 2
    $\begingroup$ BTW, that terrible looking thing is not so terrible since it simplifies to $x^2$. $\endgroup$
    – Javier
    Commented Oct 18, 2011 at 16:14
  • 3
    $\begingroup$ @JavierBadia: Careful! The function $g\circ f$ is undefined at $x=0$, but the function $x^2$ is defined at $0$. So really you need to write $g\circ f(x) = x^2,\ x\neq 0$ to get a true equality of functions. $\endgroup$ Commented Oct 18, 2011 at 16:29

3 Answers 3

9
$\begingroup$

Actually, it would be the other way around. $(f \circ g)(x) = f(g(x))$, and $f(g(x)) = \frac{1}{g(x)^2}+1 = \frac{1}{\frac{1}{(x-1)^2}}+1$. This last expression is almost equal to $(x-1)^2+1$. The difference is that in the former, $ f \circ g$ is undefined at $x = 1$, while in the latter, it is. The correct function would be $(f \circ g )(x) = (x-1)^2 + 1, \forall x \neq 1$.

What you did is actually $(g\circ f)(x) = g(f(x)) = \frac{1}{f(x)-1} = \frac{1}{\frac{1}{x^2}+1-1} = \frac{1}{\frac{1}{x^2}}$. The same note about the function not existing at $x = 0$ applies; therefore, $(g \circ f)(x) = x^2, \forall x \neq 0$.

$\endgroup$
3
  • 1
    $\begingroup$ See my comment above: $g\circ f$ is undefined at $0$, but $y=x^2$ is defined everywhere. You need to be careful with the domains when you "simplify" an expression, given the convention that a function given by a formula is given its natural domain unless otherwise specified. $\endgroup$ Commented Oct 18, 2011 at 16:30
  • $\begingroup$ @Arturo: You're right, I'll add that in the answer. $\endgroup$
    – Javier
    Commented Oct 18, 2011 at 16:39
  • $\begingroup$ Great, thanks for the explanation. Using the correct problem sure does make a difference. $\endgroup$
    – erimar77
    Commented Oct 18, 2011 at 18:42
2
$\begingroup$

When you compute (f o g)(x) you take f(g(x)). In other words, g(x) becomes the variable x in f(x). So, with your example, f(g(x))=((1/(g(x)^2)+1). I think you can do the rest.

$\endgroup$
2
$\begingroup$

$g(x)=1/(x-1)$ => $x=1+1/g(x)$ => $f(x)=1/(1+1/g(x))^2+1=1/(1+2/g(x)+1/g^2(x))+1=g^2(x)/(g(x)+1)^2+1$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .