# Find a solution for f(x)=g(x) having 2 given values.

If $f,g\colon\mathbb{R}\to\mathbb{R}$ have the following properties:

i) $f(g(x))=x^2-3x+4$

ii) $g(f(2))=2$

Determine at least a Real solution for the equation $f(x)=g(x)$

$a)x=1$

$b)x=-2$

$c)x=2$

$d)x=-2$

$e)x=4$

$f)x=3$

I want to know how to solve this the practical way, not by plugging the solutions in. Thank you very much for your help!

-
Did you try to compute $f(g(f(2)))$? – Egbert May 25 '12 at 16:55
I didn't try that, could you write the answer if it works? Thank you! – Grozav Alex Ioan May 25 '12 at 17:01
This question is pretty contrived. The answers so far have not proven that such functions f and g can even exist. Isn't this a concern? – Mark May 25 '12 at 17:17
@Mark There's no reasons the functions need to be expressible in elementary forms, certainly such functions can exist. – process91 May 25 '12 at 17:20
@Mark: (1) whether such $f$ and $g$ exist isn't something we're being asked here, (2) clearly $f(x)=x$, $g(x)=x^2-3x+4$ satisfy the given conditions. – Chris Eagle May 25 '12 at 17:27

First we can compute that $f(2)=f(g(f(2)))=f(2)^2-3\cdot f(2)+4$. Now it follows that $f(2)^2-4f(2)+4=0$, or equivalently that $(f(2)-2)^2=0$. This shows that $f(2)=2$. Since $f(2)=2$, it follows that $g(2)=g(f(2))=2$, so we conclude that $f(2)=g(2)$.
This is incorrect, $f(g(f(2))=(f(2))^2-3\cdot f(2)+4$, not $2^2-3\cdot 2 +4$ – process91 May 25 '12 at 17:08
We have $f(2)=f(g(f(2)))=(f(2))^2-3f(2)+4$. Thus $f(2)$ is a solution of the equation $x=x^2-3x+4$. But this simplifies to $x^2-4x+4=0$ and then $(x-2)^2=0$, so in fact $f(2)=2$. Thus $2=g(f(2))=g(2)$ and so $f(2)=g(2)=2$.