I was trying to solve some differential equations. Mathematica is a little expensive to me, so I went for the free Wolfram Engine for Developers. It is said that the engine offers the full power of the Wolfram Language, just without the fantastic graphic frontend.

The problem is, I cannot get a readable result. The output contains some weird symbols like #1, &, and Inactive. I have consulted the document, but still have no idea what do them mean, presumably because it's mostly intended for GUI users.

In[1]:= DSolve[- m'[t] == f[t] * \[Rho][m[t] / m0 * P0], m, t]

Out[1]= {{m -> Function[{t}, InverseFunction[Inactive[Integrate][-----------,
                                                                     P0 K[1]

>           {K[1], 1, #1}] & ][C[1] +

>         Inactive[Integrate][-f[K[2]], {K[2], 1, t}]]]}}

I then tried exporting the result to $\LaTeX$, but the generated LaTeX source yields a huge error: Argument to \unicode must be a number. I looked around and found this question, which suggests TeXForm need to be fixed.

In[2]:= DSolve[- m'[t] == f[t] * \[Rho][m[t] / m0 * P0], m, t] // TeXForm

   \left\{\left\{m\to \left(\{t\}\unicode{f4a1}\text{InverseFunction}\left[\int
    _1^{\text{$\#$1}}\frac{1}{\rho \left(\frac{\text{P0}

How can I convert the output of the Wolfram language to mathematical formulas that I can understand, without access to a graphic frontend? For example, the resultant formula can be exported PDF, or PNG, or MS Word, whatever I can read.

  • $\begingroup$ I assume you also have definitions for your functions f and rho. Can you tell me what those definitions are? The output might be more understandable if those definitions were included but, just like doing differential equations by hand, it is easy to write down differential equations that nobody including Wolfram, have any idea what a solution is. You can read online documentation for everything, including #1 and & and Inactive, but there is a reasonably large amount you need to learn to be fluent in things like that. $\endgroup$ – Bill Sep 14 '19 at 7:27
  • $\begingroup$ If you just want stuff to be readable use InputForm on it. That'll be give you a simple linear syntax. $\endgroup$ – b3m2a1 Sep 14 '19 at 7:46
  • 1
    $\begingroup$ Also as for # and friends, if you don't understand those you'll have a hell of a time understanding even well-formatted results. Look up Function and Slot in the docs. That'll get you started. $\endgroup$ – b3m2a1 Sep 14 '19 at 7:48
  • 1
    $\begingroup$ Thank you for that info. No wonder you are getting incomprehensible output. Let's simplify this by looking at the solution only for t<0.2 for now. f[t_]:=100*t; \[Rho][t_]:=2*t^2+3*t+4; P0=3; m0=5; m[t]/.DSolve[{-m'[t]==f[t]*\[Rho][m[t]/m0*P0], m[0]==1}, m[t], t][[1]] which gives a warning about the complexity and then (-5*(3 + Sqrt[23]*Tan[(15*(2*Sqrt[23]*t^2 - (2*ArcTan[27/(5*Sqrt[23])])/15))/2]))/12. Is that comprehensible? If you want to post another question with your table for rho then we might be able to show you how to do the regression. Describe exactly what you need $\endgroup$ – Bill Sep 14 '19 at 8:27
  • 1
    $\begingroup$ And if a decimal approximation of that solution is good enough then it is -0.41667*(3. + 4.79583*Tan[7.5*(-0.11261 + 9.59166*t^2)]) which might be more comprehensible. $\endgroup$ – Bill Sep 14 '19 at 8:37

Your Answer

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

Browse other questions tagged or ask your own question.