given $g(x)=x^2 + x-2$ and $ g \circ f = 2 [2x^2-5x +2]$, find $f(x)$ ( $f(x)$ is form $ax+b$)
I found the inverse of g as two functions,
$$ y =( x + \frac12)^2 - \frac94 $$
$$ \pm (\sqrt{y + \frac94} -\frac12 ) = x$$
or,
$ g^{-1} (y) = \pm (\sqrt{y + \frac94} -\frac12 ) $
Ok, so into this function I plugged in $ y= g \circ f = 2 [2x^2 - 5x +2]$
and this gave me:
$ f(x) = \begin{cases} 2x -3 \\ 2-2x \\ \end{cases}$
Now there are two different functions which f(x) could have been.
Now, If I try do this another way, that is, using derivatives,
$$ g( ax+b) = (ax+b)^2 + (ax+b) -2$$
$$ g \circ f = 2 [ 2x^2 - 5x +2]$$
Equating the two different definitions,
$$ 2 [ 2x^2 - 5x +2]=(ax+b)^2 + (ax+b) -2$$
Taking a derivative,
$$ 2 ( ax+b)a + a- 2 = 8x - 10$$
And one more,
$$ 2 a^2 = 8 $$
$$ a^2= 4$$
Evaluating the equation after first derivative at x=0, I get $ b=-6$
so, $ f(x) = 4x - 6$
which is inconsistent with the previous answer. What went wrong?
Edit: fixed a method in derivative.
A more easy way is the following :
If $f(x)=ax+b$, then $$g \circ f(x) = (ax+b)^2 + (ax+b) - 2 = a^2x^2 + (2ab+a)x + (b^2+b-2)$$
By identification, you must have $a^2 = 4$, $2ab+a = -10$ and $b^2+b-2 = 4$. If $a=2$, you obtain $b=-3$ which works ; if $a=-2$, you obtain $b=2$ which also works. So you have two solutions : $$f(x) = 2x-3 \quad \text{ and } \quad f(x)=-2x+2 $$