1
$\begingroup$

Does an inverse function for

$f(x) = a⋅e^{bx} + cx + d$

exist where a, b, c, d are constants? If so, what is it?

I've tried lots of methods, but they've all failed.

What I ended up doing to approximate an inverse:

For very small (very negative) values of y, I ended up using the following function:

$x = \frac{ln(\frac{y-cx-d}{a})}{b}$

to assist in a recursive approximation by which, after seeding x with a guess, I feed the function back on itself a few times. For greater values of y, I used a similar method/function inspired by binary search algorithms. My implementations converged quickly for my purposes.

Thanks everyone who commented.

$\endgroup$
  • 1
    $\begingroup$ There isn't a solution in general. Some might reference the W Lambert function but I am not a fan of that argument. It's almost like saying "the solution is the solution!" The W Lambert function is constructed to be a solution to a related problem so it's circular to me. $\endgroup$ – Cameron Williams Feb 19 '15 at 1:29
  • 2
    $\begingroup$ @CameronWilliams But distinguish between the two cases (1) There is no inverse because the function is not $1-1$ and (2) There is an inverse, but not one with a closed form. $\endgroup$ – Thomas Andrews Feb 19 '15 at 1:38
  • $\begingroup$ @ThomasAndrews Oh doh. I meant to say "no solution in elementary functions." Slipped my mind. You're completely right. $\endgroup$ – Cameron Williams Feb 19 '15 at 1:40
  • 1
    $\begingroup$ @CameronWilliams The one nice thing about special functions like the Lambert W function is that they reduce a large family of problems to a smaller family of problems. This makes robust numerical implementation a lot easier. Solving an equation like that in the OP with Newton's method, the convergence properties may depend very strongly on the parameters. $\endgroup$ – Ian Feb 19 '15 at 1:51
  • 1
    $\begingroup$ @CameronWilliams: the benefit of "standardizing" the problem to the Lambert function is that the latter is a well-studied function. As soon as you reduce a problem to it, you immediately "inherit" all the knowledge about it. For instance, we know that it has no closed form. $\endgroup$ – Yves Daoust Feb 19 '15 at 13:55
2
$\begingroup$

Consider $$y = a⋅e^{bx} + cx + d$$ and make a change of variable $e^{bx}=z$. This then leads to $$y=a.z+\frac cb .\log(z)+d$$Any equation which can write $A+B x+C\log(Dx+E)=0$ has solution(s) in terms of Lambert function. For the particular case in the post, we should then obtain $$z=\frac{c }{a b}W(t)$$ where $$t=\frac{a b }{c}e^{\frac{b (y-d)}{c}}$$ and, back to $x$ (taking into account the fact that $t=W(t).e^{W(t)}$), $$x= \frac{y-d}{c}-\frac{1}{b}W(t)$$ The advantage of this is that there are very good approximations of Lambert function.

For illustration purposes, let us use $a=1,b=2,c=3,d=10^6$ and let us try to solve the equation for $y=2.10^6$. So, replacing, we have $$x=\frac{1000000}{3}-\frac{1}{2} W\left(\frac{2 e^{2000000/3}}{3}\right)$$ Now, let us use for the approximation $$W(t)\approx L_1-L_2+\frac{L_2}{L_1}+\cdots$$ where $L_1=\log(t)$,$L_2=\log(L_1)$. This then leads to $x=6.907744917$ which is the exact solution for ten significant figures.

$\endgroup$
1
$\begingroup$

It is quite possible for a function to have an inverse but with no closed formula for the inverse.

In this case, $f(x)$ is $1-1$ if and only if $f'(x)\neq 0$ for all $x$ in the (interior of the) domain, which means if $abe^{bx}\neq -b$ has no solution, so if $\frac{-d}{ab}$ is negative.

However, combinations of $x$ and $e^x$ generally make it impossible to find a formula for the inverse function.

We can easily find a way to compute the inverse when $f$ is increasing or decreasing - just apply a binary-search algorithm to get a sequence of approximations to the inverse.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.