Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have solved an ODE using DSolve, but I have a problem with understanding the solution. In general the solution is in the form:

InverseFunction[[many expressions using # and #1]&][g x+C[1]]

where g is constant

What does #1 and & mean and what does InverseFunction mean in this context?

share|improve this question
up vote 14 down vote accepted

Some DEs are more simple to solve for the dependent variable rather than the independent variable, for example $$ \frac{dy}{dx} = y \quad\implies\quad \log(y)=x+c $$ from which you can obtain the solution for $y$ in terms of $x$ by using an inverse function, in this case $y=\exp(x+c)$. Not all examples are this easy to invert, so Mathematica sometimes has to leave the solution written in terms of InverseFunction.

The # and & are part of Mathematica's pure (or anonymous) function notation. In particular & occurs at the end of a pure function and #=#1 represents the first slot of the function. For example

(#^2 + 1&)

is equivalent to

Function[{x}, x^2 + 1]

and acts upon its arguments like any other function

(#^2 + 1&)[t] == Function[{x}, x^2 + 1][t] == t^2 + 1

So, your DE must have yielded a complicated algebraic expression $f(y)=x+c$ that needs to be solved for the variable that you are interested in, $y=f^{(-1)}(x+c)$, which Mathematica can only perform symbolically using InverseFunction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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