# Solving for x for equation $y=x(8-x)$

I am trying to find the equation of $y=x(8-x)$

So what I did so far ...

$y=8x-x^2$

But no matter what I did after, I still will have $x$ of different degrees? eg. 1 squared, 1 "normal"? else it will be 1 square root, 1 "normal"?

How do I solve this?

Given answer: $f^{-1}=4-\sqrt{16-x}$ (I'm solving for x to find the inverse of the function actually)

-
You could use the quadratic formula on $x^2-8x+y=0$ – J. M. Sep 4 '11 at 2:32
$y$ is a variable, can I just treat it as $c$? If so I will get $x=\frac{-(-8) \pm \sqrt{(-8)^2 - 4y}}{2}$ then $x=\frac{8 \pm \sqrt{64-4y}}{2}$, then how do I simplify further? – Jiew Meng Sep 4 '11 at 2:51
you factor a $\sqrt 4 = 2$ out from under the radical – The Chaz 2.0 Sep 4 '11 at 3:04

To find the inverse of a function like this, you can switch the roles of $x$ and $y$ and solve the new equation for $y$. So, you would want to solve $x = -y^2 + 8y$ for $y$.

Rewriting that a little, we get $y^2 - 8y + x = 0$, which is a quadratic in $y$. That is, you would be taking $a = 1$, $b = -8$, and $c = x$ in the quadratic formula. Don't let the fact that $x$ is a variable bother you: the function $y^2 - 8y + x$ is quadratic in $y$ and that's all that matters here.

Applying the formula, you would get

\begin{align*} y &= \frac{8 \pm \sqrt{64 - 4x}}{2}\\ &= \frac{8 \pm \sqrt{4(16 - x)}}{2}\\ &= \frac{8 \pm 2\sqrt{16 - x}}{2}\\ &= 4 \pm \sqrt{16 - x} \end{align*}

The fact that you get $\pm$ in your solution means that the original function doesn't have an inverse on the entire real line. Depending on how you restrict the domain of the original function, your inverse can be either $4 - \sqrt{16 - x}$ or $4 + \sqrt{16 - x}$.

-
Could someone please edit my question or explain why the align environment is behaving strangely? – Austin Mohr Sep 4 '11 at 3:08
You either need to double up the backslashes, i.e., use \\\\ instead of \\ or enclose the align environment in double dollar signs. That's because backslashes have act as escape characters in markdown, so in order for the MathJaX engine to see a backslash you need to escape it first, using a backslash. By using dollar signs you deactivate the markdown engine. – t.b. Sep 4 '11 at 3:13
Good answer. Better for worrying about the $\pm$ sign. – Ross Millikan Sep 4 '11 at 3:45