0
$\begingroup$

I'm programming a piece of math that requires solving an equation of a form $f(x)/x=y$. Now I already have $f^{-1}(z)$ coded (efficiently, and not by me) so I'd prefer using this implementation instead of, say, coding bisection for $f(x)/x$. Is there a way to do that?

If it were $f(x)=y$, I would just use $x=f^{-1}(y)$. But with $f(x)/x=y$ I doubt it's even possible to have a closed-form solution with $f$ and $f^{-1}$ but I can't come up with a reasoning for that.

$\endgroup$
2
  • $\begingroup$ What is formula for $f(x)$ ? $\endgroup$
    – coffeemath
    Commented Jan 21, 2019 at 17:49
  • 1
    $\begingroup$ @coffeemath, it's very large and clumsy and is constructed in several steps. It's not the first time I faced this problem, previously with different expressions for $f(x)$, so I'm asking a question in general, for arbitrary $f(x)$. $\endgroup$
    – Glinka
    Commented Jan 21, 2019 at 17:55

1 Answer 1

3
$\begingroup$

Not possible in general. For example, if $f(x) = e^x$ then $f^{-1}(x) = \log x$. But the solution $x$ of $$ \frac{e^x}{x} = y $$ is not elementary: $$ x = -W\left(\frac{-1}{y}\right) $$ where W is the Lambert W function. Knowing how to compute $e^x$ and $\log x$ does not tell you how to compute this solution.

$\endgroup$
1
  • $\begingroup$ Thanks, that answers it $\endgroup$
    – Glinka
    Commented Jan 21, 2019 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .