Tool for expressing $x=f^{-1}(y)$ if $y=f(x)$ is given

66 Views Asked by At

I have many equations of nature -

$y=ax^{12}+bx^5+5x^4+1$

For all these equations, I need to express x in terms of y. What tool or software would you recommend for this? I would much prefer to have a software give me the answer than me having to solve it by hand. Some of the equations are downright scary and way more complex that the one above.

5

There are 5 best solutions below

2
On BEST ANSWER

Unfortunately, most equations such as you give do not have a nice inverse.

Consider a function like $y=x^2$. This has exactly one $y$-value for each $x$-value -- that's what makes it a function. What you are asking is about the inverse. You can visualize this by taking the graph of the original function, and swapping the roles of $y$ and $x$. The result is a function if the original equation has exactly one $x$-value for each $y$-value. Even for $y=x^2$, things get complicated. There are two values, namely $\sqrt{y}$ and $-\sqrt{y}$, if $y>0$. There is one value, namely $0$, if $y=0$. And there are no values if $y<0$. So there isn't an inverse, there are two, or one, or zero.

If you need a numerical approximation, i.e. you have numbers for $a,b$, and you know precisely which $y$ you care about, then there are various software packages that can find all the $x$ values that work, more or less.

0
On

MathCad, its a great software which i also use.

0
On

One question that comes into mind is, what makes you thing that this can be done mathematically? Here is a different approach that may help you. Go into parametrics. So for example you have $y=x^{12}+2x^4 + 3$ First invert: $x=y^{12}+2y^4+3$ Now use parametrics: Set $y=t$ then $x=t^{12}+2t^4+3$ Maybe that helps for your purpose?

0
On

A function (such as in your example) does not necessarily have an inverse function. For a given value of $y$, there can be many values of $x$ for which $f(x) = y$. In the case of an irreducible degree $12$ polynomial, there will typically be $12$ different values of $x$ for which $f(x) = y$ for random choices of $y$.

There are lots of choices of software to solve equations of the form $y = f(x)$ for $x$, given $y$. I'd recommend playing around with WolframAlpha.

0
On

First fact:

Polynomial equation of order $n$ has up to $n$ real solutions. So, expect $12$ solutions. If this appears in engineering as some model, and you know there has to be a unique inverse, you probably have very specific coefficients and very specific domain (if $x$ guaranteed to be in some range).

Second fact:

Polynomials with order above $4$ have no general algebraic expression for their roots (like quadratic formula for order $2$).

Third fact:

Polynomial solving is ubiquitous, you get solvers in all mathematical software packages, all numerical libraries in any language you want, and if you know the domain, a straight-forward solution can be reached by bisection in about 10 lines of code in any programming language. Or on paper, if you want. The idea is easy. Accuracy and reliability depends on how ill-behaved your polynomial is (hopefully, your functions are nice enough to prevent wild roundoff errors that can quickly happen with higher powers).