# Thread: Finding g(x) given f(x) and f o g(x)?

1. ## Finding g(x) given f(x) and f o g(x)?

How do I find g(x) if f(x) = x+1/x and f o g(x) = 3x+1?

I've gotten as far as g(x) + 1 = g(x)(3x + 1)

What do I have to do next?

Thanks for the help!

2. Originally Posted by strigy
How do I find g(x) if f(x) = x+1/x and f o g(x) = 3x+1?

I've gotten as far as g(x) + 1 = g(x)(3x + 1)
That should be $g^2(x)$ on the left.

What do I have to do next?

Thanks for the help!
Think of g(x) as being a variable itself rather than a function:
f(g)= g+ 1/g= 3x+1. Now solve for g. Multiplying both sides by g gives $g^2+ 1= (3x+1)g$, a quadratic equation. Use the quadratic formula to solve for all x.

3. Uhm, how did it get to be g^2 on the left? Shouldn't the denominator on g+1/g have cancelled out when I multiplied the whole equation with g?

4. Hello strigy
Originally Posted by strigy
How do I find g(x) if f(x) = x+1/x and f o g(x) = 3x+1?

I've gotten as far as g(x) + 1 = g(x)(3x + 1)

What do I have to do next?

Thanks for the help!
Having read what has been written so far, I wonder if the question is really
$f(x) = \frac{x+1}{x}$
If it is, then you're right: $g(x) + 1 = g(x)(3x+1)$. So you can now say:
$g(x) + 1 = 3x.g(x)+ g(x)$

$\Rightarrow 3x.g(x) =1$

$\Rightarrow g(x) = \frac{1}{3x}$
You can now check this:
$f\circ g(x) = f\left(\frac{1}{3x}\right)$
$= \frac{\dfrac{1}{3x}+1}{\dfrac{1}{3x}}$

$=\frac{1+3x}{1}$

$=1+3x$
If $f(x) = x + \frac1x$, then you'll have to do as HoI suggests and use the quadratic formula.

5. Grandad, it is f(x) = x+1/x, thank you so much!

HoI, thanks for showing me what to do if ever I get an equation like that.

6. As you originally wrote it, $f(x)= x+ 1/x= x+ \frac{1}{x}$, is not the same as $(x+1)/x= \frac{x+ 1}{x}$.

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

7. Oh,ok HoI, my bad. Thanks!