# How can I understand the result Mathematica returned from DSolve?

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]]

g is constant

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

PS: The solution is:

$\text{InverseFunction}\left[\frac{40 g \text{$\#$1} s^{2/5}+\frac{3 Q^{3/5} \left(\left(1+\sqrt{5}\right) \sqrt[5]{B} g n^{9/5}-\left(-1+\sqrt{5}\right) \sqrt[5]{Q} s^{9/10}\right) \log \left(\frac{1}{2} \left(-1+\sqrt{5}\right) \sqrt[5]{B} \sqrt[5]{n} \sqrt[5]{Q} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+B^{2/5} \sqrt[5]{s} \text{$\#$1}^{2/3}+n^{2/5} Q^{2/5}\right) \sqrt[10]{s}}{B^{4/5} n^{6/5}}+\frac{3 Q^{3/5} \left(\left(-1+\sqrt{5}\right) g n^{9/5} \sqrt[5]{B}+\left(1+\sqrt{5}\right) \sqrt[5]{Q} s^{9/10}\right) \log \left(\frac{1}{2} \left(1+\sqrt{5}\right) \sqrt[5]{B} \sqrt[5]{n} \sqrt[5]{Q} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+B^{2/5} \sqrt[5]{s} \text{$\#$1}^{2/3}+n^{2/5} Q^{2/5}\right) \sqrt[10]{s}}{B^{4/5} n^{6/5}}+\frac{3 Q^{3/5} \left(\left(1+\sqrt{5}\right) \sqrt[5]{Q} s^{9/10}-\left(-1+\sqrt{5}\right) \sqrt[5]{B} g n^{9/5}\right) \log \left(-\frac{1}{2} \left(1+\sqrt{5}\right) \sqrt[5]{B} \sqrt[5]{n} \sqrt[5]{Q} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+B^{2/5} \sqrt[5]{s} \text{$\#$1}^{2/3}+n^{2/5} Q^{2/5}\right) \sqrt[10]{s}}{B^{4/5} n^{6/5}}-\frac{3 Q^{3/5} \left(\left(1+\sqrt{5}\right) g n^{9/5} \sqrt[5]{B}+\left(-1+\sqrt{5}\right) \sqrt[5]{Q} s^{9/10}\right) \log \left(-\frac{1}{2} \left(-1+\sqrt{5}\right) \sqrt[5]{B} \sqrt[5]{n} \sqrt[5]{Q} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+B^{2/5} \sqrt[5]{s} \text{$\#$1}^{2/3}+n^{2/5} Q^{2/5}\right) \sqrt[10]{s}}{B^{4/5} n^{6/5}}+\frac{6 \left(\sqrt{10-2 \sqrt{5}} \sqrt[5]{B} g n^{9/5} Q^{3/5} \sqrt[10]{s}-\sqrt{2 \left(5+\sqrt{5}\right)} Q^{4/5} s\right) \tan ^{-1}\left(\frac{4 \sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}-\left(-1+\sqrt{5}\right) \sqrt[5]{n} \sqrt[5]{Q}}{\sqrt{2 \left(5+\sqrt{5}\right)} \sqrt[5]{n} \sqrt[5]{Q}}\right)}{B^{4/5} n^{6/5}}+\frac{6 \left(\sqrt{10-2 \sqrt{5}} g n^{9/5} Q^{3/5} \sqrt[10]{s} \sqrt[5]{B}+\sqrt{2 \left(5+\sqrt{5}\right)} Q^{4/5} s\right) \tan ^{-1}\left(\frac{4 \sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+\left(-1+\sqrt{5}\right) \sqrt[5]{n} \sqrt[5]{Q}}{\sqrt{2 \left(5+\sqrt{5}\right)} \sqrt[5]{n} \sqrt[5]{Q}}\right)}{B^{4/5} n^{6/5}}+\frac{12 \left(\sqrt[5]{B} g n^{9/5} Q^{3/5} \sqrt[10]{s}-Q^{4/5} s\right) \log \left(\sqrt[5]{n} \sqrt[5]{Q}-\sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}\right)}{B^{4/5} n^{6/5}}-\frac{6 \left(\sqrt{2 \left(5+\sqrt{5}\right)} \sqrt[5]{B} g n^{9/5} Q^{3/5} \sqrt[10]{s}-\sqrt{10-2 \sqrt{5}} Q^{4/5} s\right) \tan ^{-1}\left(\frac{4 \sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}-\left(1+\sqrt{5}\right) \sqrt[5]{n} \sqrt[5]{Q}}{\sqrt{10-2 \sqrt{5}} \sqrt[5]{n} \sqrt[5]{Q}}\right)}{B^{4/5} n^{6/5}}-\frac{6 \left(\sqrt{2 \left(5+\sqrt{5}\right)} g n^{9/5} Q^{3/5} \sqrt[10]{s} \sqrt[5]{B}+\sqrt{10-2 \sqrt{5}} Q^{4/5} s\right) \tan ^{-1}\left(\frac{4 \sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+\left(1+\sqrt{5}\right) \sqrt[5]{n} \sqrt[5]{Q}}{\sqrt{10-2 \sqrt{5}} \sqrt[5]{n} \sqrt[5]{Q}}\right)}{B^{4/5} n^{6/5}}-\frac{12 \left(g n^{9/5} Q^{3/5} \sqrt[10]{s} \sqrt[5]{B}+Q^{4/5} s\right) \log \left(\sqrt[5]{B} \sqrt[10]{s} \sqrt[3]{\text{$\#$1}}+\sqrt[5]{n} \sqrt[5]{Q}\right)}{B^{4/5} n^{6/5}}}{40 s^{7/5}}\&\right]\left[g x+c_1\right]$

-

1
# is explained here reference.wolfram.com/mathematica/ref/Slot.html first example answers your question about #1 and #2. For pure function please see reference.wolfram.com/mathematica/tutorial/PureFunctions.html which explains it well. For InverFunction please see reference.wolfram.com/mathematica/ref/InverseFunction.html – Nasser Dec 9 '12 at 5:24

## 1 Answer

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`.

-
lang-mma
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8672526478767395, "perplexity_flag": "middle"}