# How to make inverse to work here?

I have this equation:

$$\sqrt{5 - x} = 5 - x^2$$

My current approach is - I note that if I will let: $$f(x) = \sqrt{5 - x}, g(x) = 5 - x^2$$ then I will have $$f(g(x)) = g(f(x)) = x$$ Or, in other words, $$f(x) = g^{-1}(x)$$ (they're inverse) which means that if they intersect, then they must do so on the line y = x . This in turn means that the original equation is same as:

$$x = \sqrt{5 - x} = 5 - x^2$$

Which is of course much easier to solve. Since we have 5 - x under a square root we note that x should not be greater than 5, but also since square root is non-negative, right side should be non-negative as well, thus |x| cannot be greater than $$\sqrt{5}$$. With this, we can go and solve the quadratic equation:

$$x^2 + x - 5 = 0$$ this gives two solutions, $$x = \frac{-1\pm\sqrt{21}}{2}$$

and only one satisfies the condition for $$|x|\le\sqrt{5}$$ so we conclude $$x = \frac{-1+\sqrt{21}}{2}$$

Done deal! But.. if I verify this, it turns out this answer is not complete. Take a look:

Clearly there should be one more solution for this. I also plotted $$h(x) = -\sqrt{5 - x}$$ because that will be the inverse for the negative half of the $$g(x) = 5 - x^2$$ (the solution to the quadratic which we discarded earlier is the one which solves $$-\sqrt{5 - x} = 5 - x^2$$ which is also confirmed by $$y=x$$ passing through that point).

My questions:

• Where's my mistake?
• How to make this work with inverse functions (if possible at all)?
• Note that $f(g(x))=x$ is true only for $x\geq 0$; in general, we have $f(g(x))=|x|$. Commented Jun 13, 2020 at 21:10
• I found a YouTube video by a YouTuber named blackpenredpen that explains how to solve for the second solution that you are seeking. He basically uses infinitely nested square roots instead of inverses but you might find it helpful. Commented Jun 13, 2020 at 21:14
• @AidenChow my question is originated from there to be honest. I attempted to solve it with inverses and failed. But my point isn't to just "find the missing root" (i.e. its exact form), but rather to understand what do I miss in my approach with inverse function and whether it's possible to make it work Commented Jun 13, 2020 at 21:31

1. the function $$g$$ is not injective, hence not invertible;
2. for a bijective function, we have $$f(x)=x\implies f(x)=f^{-1}(x)$$, but $$f(x)=f^{-1}(x)\implies f(x)=x$$ doesn't holds, in general.
First note that the equation $$\sqrt{5 - x} = 5 - x^2$$ is equivalent to $$\left\{\begin{array}{l}|x|\leq 5\\(x^2-5)^2+x-5=0\end{array}\right.$$ As you noted, every root of $$x^2+x-5$$ is a root of $$(x^2-5)^2+x-5$$. Consequently, the polynomial $$(x^2-5)^2+x-5$$ is divisible by $$x^2+x-5$$, indeed we have $$(x^2-5)^2+x-5=(x^2+x-5)(x^2-x-4)$$ Hence the third solution of $$\sqrt{5 - x} = 5 - x^2$$ is a root of $$x^2-x-4$$.