I apologize for my mathematical ignorance regarding this, but could someone help me understand why it isn't possible to (symbolically) find an inverse function for $f(x)=xe^x$?

The most obvious (but presumably the most trivial) is that $f$ does not pass the "horizontal line test". However, if we restrict the domain to $x\geq-1$ this should not be a problem (derivative is positive for $x>-1$ so function is strictly increasing). So now my question becomes: "Why can't we find an inverse function for $f$ over the interval $[-1,\infty)$?"

Perhaps it is because $e^x$ is transcendental (not algebraic). However, we can find an inverse for $g(x) = e^x$, which is also transcendental. Is that because we're "cheating" by defining another transcendental function, namely $\ln(x)$, to be its inverse? In other words, would it be fundamentally no different to define a new function, call it $\text{lnx}(x)$ (if that's not already something else), to be the inverse of $xe^x$ over $[-1,\infty)$ and then say that $f$ has a "closed form" / "symbolic" / ??? inverse function $f^{-1}(x)=\text{lnx}(x)$ over the interval $[-1, \infty)$?

graph of y=x,y=e^x,and y=x*e^x

SageMath source to generate plot

xs = (x,-5,2) ys = (y,-1,5) p1 = implicit_plot(x*exp(x)-y,xs,ys, color='blue', legend_label='y=x*e^x') p2 = implicit_plot(x-y,xs,ys, color='orange', linestyle='dashed', legend_label='y=x') p3 = implicit_plot(exp(x)-y,xs,ys, color='green', linestyle='dotted', legend_label='y=e^x') combined = p1 + p2 + p3 combined.axes_labels(['x', 'y']) combined.legend(True) combined.show(title='Transcendental Stuff', frame=True, axes=True, legend_loc='lower right')

See also

  • 1
    $\begingroup$ it can be solved by the following function $$\{\{x\to W(y)\}\}$$ the product Logarithmus by Mathematica $\endgroup$ – Dr. Sonnhard Graubner Mar 21 '18 at 15:49
  • $\begingroup$ It can be solved, and an inverse function can be found in the given interval, just not analytically. $\endgroup$ – Thern Mar 21 '18 at 15:51
  • 5
    $\begingroup$ Yes, you're right that "fundamentally" it would "be no different" to invent a label for the inverse function, which is guaranteed to exist because your function is injective. $\endgroup$ – symplectomorphic Mar 21 '18 at 15:51
  • 1
    $\begingroup$ This question is so high quality, why aren't people upvoting this $\endgroup$ – vrugtehagel Mar 21 '18 at 15:54
  • $\begingroup$ @vrugtehagel that is what I have about this site more than anything else. There's so much good content that goes unappreciated. This is an excellent question. I upvoted it. $\endgroup$ – user223391 Mar 21 '18 at 16:03

It can be solved by inventing new functions, but it cannot be solved in closed form using trigonometric, logarithmic or exponential etc. Read this: Chow, Timothy Y. (May 1999), "What is a Closed-Form Number?"

  • 1
    $\begingroup$ I believe you, but I was trying to get a better answer to the why part of the question. $\endgroup$ – iX3 Mar 21 '18 at 16:02
  • $\begingroup$ Read the linked article for the why part. $\endgroup$ – Shubhashish Mar 21 '18 at 16:06
  • $\begingroup$ Wow, this paper talks about exactly what I wanted to know! (Did you just add that? I can't believe I didn't see it before.) BTW, it was hard to read on that site (not scalable, not searchable, etc.), but I found a link to a PDF version on the author's website here $\endgroup$ – iX3 Mar 21 '18 at 16:18
  • $\begingroup$ Yes I have updated the link $\endgroup$ – Shubhashish Mar 21 '18 at 16:19

You can use the Lambert-$W$ function to solve it symbolically.

$y = xe^x$ gives $x = W(y)$.

You may run solve(x*exp(x)-y,x) on SymPy Live as an alternative to SageMath.

screenshot of sympy

  • 1
    $\begingroup$ Just for reference, here is a Wolfram Alpha example solving $xe^x=\pi$ $\endgroup$ – gt6989b Mar 21 '18 at 15:56
  • $\begingroup$ Thank you for showing me the Lambert-W function (was just finding that in the answer to another question on here too). It seems that what determines whether it is possible to solve something in "closed form" has largely to do with what functions/expressions are allowed. e.g. $y = e^x$ cannot be "solved for $x$" unless something like $\ln$ is allowed. Similarly, the answer to my question depends on whether or not something like $W$ is acceptable. $\endgroup$ – iX3 Mar 21 '18 at 16:00
  • $\begingroup$ @iX3 In the tag info of (closed-form), it's said that a "closed form expression" is anything written in terms of "known" functions. Though the Lambert-W function is not elementary, but I believe it qualifies a known function. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Mar 21 '18 at 16:09
  • $\begingroup$ Hmm, solve(x*exp(x)-y,x) --> Traceback (most recent call last):...line 1055, in solve solution = _solve_system(f, symbols, **flags) ... line 158, in _lambert solns[i] = tmp.subs(u, rhs) AttributeError: 'dict' object has no attribute 'subs' I may need to go read & learn about SymPy to figure out what's wrong. (I think SageMath uses SymPy though, so in theory I should be able to access all of the same functionality through that.) $\endgroup$ – iX3 Mar 21 '18 at 18:25
  • $\begingroup$ @iX3 I've edited my post in response to your comment. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Mar 21 '18 at 18:33

As indicated in the comments and in another answer, there is a special function that has been defined which can serve as an inverse here. However, this doesn't address your basic question, which is: why is this necessary?

Before I talk about that, let me say something about $\ln x$ and $e^x$. Those are both transcendental functions, and they're inverses of each other, but neither is really defined simply to be the inverse of the other. Both of these functions arise very naturally, each on their own. The natural log function is the integral of $x^{-1}$, for a suitably defined integral, and the exponential function is the solution of a differential equation modeling the simplest kind of constant relative growth. They end up being inverses of each other, and that's a cool set of facts to understand and wonder at.

Anyway, you can't use elementary functions to invert lots of things, such as $f(x)=xe^x$. This often happens when we mix different types of functions together. The functions $g(x)=x$ and $h(x)=e^x$ are perfectly invertible, and they are, respectively, polynomial and exponential. The function $f=gh$, on the other hand, is the product of a polynomial function with an exponential function. We expect that to be more complicated. It's not solvable, with the usual algebraic methods, because whatever technique we apply to simplify $e^x$ messes up the polynomial part. Similarly, if you try to solve $e^x(x^2-x)=k$, anything you do to simplify the polynomial part will just make an exponential mess.

It's the blending of different types of functions, which are amenable to transforming with completely different tools, that makes such functions complicated. Other notorious examples include $\frac{\sin x}{x}$, and $e^{x^2}$. It's not always that they're hard to invert, but try doing integral calculus with such functions!

  • $\begingroup$ Thank you; this makes a lot of sense, at least intuitively. Is there a more precise definition regarding the "blending of different types of functions" and does that always produce tough situations like this? $\endgroup$ – iX3 Mar 21 '18 at 16:10
  • 1
    $\begingroup$ I'd say the different kinds are 1. polynomial/rational/radical (algebraic), 2. Trigonometric, 3. Inverse trigonometric, 4. Exponential, 5. Logarithmic. If it's done right, to allow for cancellation, you can blend 2 with 3 and 4 with 5 and still be able to work analytically. If you're very careful, you can blend any kinds, as long as there's a way to cancel stuff until you have something pure. I don't know of any real precise definitions and theory that address this "blending" though. $\endgroup$ – G Tony Jacobs Mar 21 '18 at 16:14

I am going to break your question into two separate questions:

  1. Does an inverse function to $y=x \cdot e^x$ exist on the domain $[-1,+\infty)$?
  2. Can we find that inverse function in the "standard list" of functions that everyone knows?

Question 1 has an easy answer: yes, that inverse function exists. Its existence is an application of the inverse function theorem which most students first encounter without proof in an ordinary calculus class, and which they then encounter with proof in some kind of advanced calculus class. And then if you're quick enough, you might even be able to attach a name to that function, although it appears that Lambert beat you to it as shown in the answer of @GNUSupporter.

Question 2 is more difficult to answer. First there is no "standard list" of functions that everyone knows. Nonetheless, perhaps that's just because we haven't tried hard enough to list all functions. Can we keep adding functions to the "standard list" until we don't have to add any more? For example, as suggested in the answer of @GNUSupporter, can we just add the "Lambert-W function" $x=W(y)$ to our list if we had never heard of it before, and then declare ourselves happy? Well, maybe, but then you would be perfectly justified to ask whether there is an inverse function to $z=yW(y)$ on some appropriately chosen domain......................

These kinds of questions are addressed (but not definitively answered) in a branch of mathematics called differential algebra which is a kind of broad generalization of differential equations.

  • $\begingroup$ Thank you for the reference to differential algebra. I gather from your answer that the "answer" to my "why?" question is basically "Differential algebra deals with this question but does not provide a complete/general answer." Is that about right? $\endgroup$ – iX3 Mar 21 '18 at 16:12
  • 1
    $\begingroup$ Yes, that's about right. Nonetheless, one can often answer specific questions, which is what's so nice about the link to Chow's paper provided in the answer of @ShubhashishChauhan. $\endgroup$ – Lee Mosher Mar 21 '18 at 17:05
  • $\begingroup$ Although, to qualify my last comment, even Chow's paper does not provide a definitive answer to questions about Lambert's function, instead reducing them to applications of big unsolved conjectures. $\endgroup$ – Lee Mosher Mar 21 '18 at 17:13

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.