[Math] n inverse for a quartic function

algebra-precalculus

For a programming project, I'm trying to figure out the inverse of a quadratic function: $f(x) = ax^4 + bx^3 + cx^2 + dx + e$. In my case, the numbers $a$, $b$, $c$, $d$ and $e$ are all known constants, but rather annoying non-integers going about five places past the decimal point.

I have a function that returns the result when $x$ is processed through the equation, but what I now need is a function that will return the result back to the original input.

Is there an inverse to the function above, which I would be able to re-use the same constants? If I have to go about finding this solution myself, are there any resources that will explain the steps involved in simple language?

It's been twenty years since my last math class, and I don't recall ever getting into solving fourth degree equations. I've found all sorts of information about trying to solve and find the roots for quartic equations, although I don't quite understand what they're doing, but nothing on a plain old inverse of the function.

Best Answer

The main problem you're going to have is a general forth degree polynomial will not be one-to-one, so you'll have to be careful to restrict the domain of your function. Take for example the most basic quartic:

$$ f(x)=x^4 $$ If $f(x)=1$, what is $x$? Well (if you're only considering real numbers), $x$ could be either $1$ or $-1$. So which is it? If you restrict your domain to only positive numbers, then the inverse is $1$.

The problem becomes more complex, of course, when you consider the "general" case, since the function will look like a "W" in general (you might have 4 possible solutions!)

If you're okay with inexact answers (as this is for programming, I'm guessing this might be the case?), you can always solve the equation $y=f(x)$ for $x$ by using a numerical method such as Newton's method. Of course, yet again, you'll have to worry about multiple solutions.

Related Question