Finding inverse when function conatains absolute value

1. Nov 17, 2013

Persimmon

1. The problem statement, all variables and given/known data

Given the function f(x) = (abs(x))*x +6, find f^-1(x)

2. Relevant equations

3. The attempt at a solution

for x≥ 0, f(x) = x^2 + 6
y=x^2 +6
x = √(y-6) for y≥6
→ f^-1(x) = √(x-6) for x≥6

for x< 0, f(x) = -x^2 + 6
y= -x^2 +6
x = √(6-y) for y<6
→ f^-1(x) = √(6-x) for x<6

f^-1(x) = ±√(x-6) with the domain and range as all real numbers.
How do I get the inverse function to not be piecewise?
Sorry about the lack of proper equations, I don't know how to use latex.

2. Nov 17, 2013

462chevelle

have to restrict its not a 1 to 1

3. Nov 17, 2013

Persimmon

Could you please elaborate? How is the function not one to one? f(x) = (abs(x))*x +6 results in a graph that essentially looks like a cubic function due to the absolute value sign.

4. Nov 17, 2013

462chevelle

alright. sorry, the way it was written caused me to jump the gun.
if you just solve it without the restrictions on x that's what you get.
but other than that im not sure. will have to wait on someone smarter.

5. Nov 17, 2013

LCKurtz

You should have $x =\pm\sqrt{6-y}$ and you need to choose the - sign. So you would have
$f^{-1}(x) = -\sqrt{6-x},~x<6$.

Their "correct answer" is wrong. Your two piece answer is correct once you fix that minus sign.

6. Nov 17, 2013

Persimmon

Yes, of course that makess sense regarding the minus sign. Oops. The reason why I specified that particular answer, ie ± √(x-6) is because that is what WolframAlpha gives as the result to the inverse of the original function. I can't think of how to arrive to that result.

7. Nov 17, 2013

462chevelle

8. Nov 17, 2013

Persimmon

It's confusing me, because that's the book answer and the wolfram answer! There must be some arithmetic trick.

9. Nov 17, 2013

LCKurtz

If you are confused, draw a graph of your original $f(x)$ and your $f^{-1}(x)$ on the same picture. If your inverse is the reflection of the original in the $45^\circ$ line, yours is correct. That's all there is to it.

10. Nov 17, 2013

462chevelle

11. Nov 17, 2013

LCKurtz

What's interesting about that? Neither is a complete and correct picture of what I suggested in post #9. Can't you just do it by hand picking a few nice numbers?

12. Nov 17, 2013

462chevelle

I guess if youre just plugging numbers in for y and solving for x with both -(6-x)^1/2 and (x-6)^1/2
you get the same x value.
nevermind that. I keep leaving out stupid details.
why are wolfram and the book both wrong? is there something else to consider?

Last edited: Nov 17, 2013
13. Nov 17, 2013

LCKurtz

They are wrong because they are wrong, what else is there to say. In post #2 you described the graph of $f(x)$. In post #5 I showed you a sign correction so you have $f^{-1}(x)$. As I said on post #9, graph them both on the same graph. Do it by hand if you can't make Wolfram behave with two piece functions.