Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

There is a useful feature in WolframAlpha that allows to find a possible closed form for approximate numeric values. It can be used, for example, to guess the value of an integral that Mathematica cannot evaluate symbolically.

Integrate[LogIntegral[x]^3/x^5, {x, 1, ∞}]
(* Integrate[LogIntegral[x]^3/x^5, {x, 1, ∞}] *)

N[%, 20]
(* -2.7107171698324070788 *)

Sign[%] WolframAlpha[ToString[Abs[%]], {{"PossibleClosedForm", 1}, "FormulaData"}] /. Hold[expr_ ≈ _] :> expr
(* -1/4 π^2 Log[3] *)

I noticed that sometimes Inverse Symbolic Calculator+ can find a closed form for numbers that cannot be recognized by WolframAlpha.

Can anybody suggest Mathematica code that queries Inverse Symbolic Calculator+, parses a closed form returned by it and converts it into a Mathematica expression?

share|improve this question

2 Answers 2

Only a suggestion, not a full answer: As far as I can see the ISC returns Maple code. Therefore, after importing the output of the website as string into Mathematica, the biggest challenge is to convert the output from Maple to Mathematica code.

A quick google search reveals that there is a package in the MathLibrary. I guess chances are good that the output of ISC is basic enough so that it can be reliably converted to Mathematica.

Side note: Someone voted to close this question as "too broad". I think the opposite is the case. This is very localised and to give a satisfying answer, no general Mathematica knowledge can be used. You really have to hack down this translator which (i) probably no one has ever done and (ii) clearly goes beyond a normal answer of this site. Anyway, I like this question and it got my upvote.

share|improve this answer

Here is an example of how you can fetch the results, but there is the question of what to do if multiple results are returned. I'm using URLBuild but you could do the same manually if you don't have Mathematica 10.

num = 4.17

Cases[
  Import[
    URLBuild[
      "http://isc.carma.newcastle.edu.au/advancedCalc",
      {"input" -> num}], "XMLObject"],
  XMLElement[_, {___, "class" -> "left", ___}, c_] -> c,
  Infinity][[All, 1]]

"F(20/53;1/53 ;1)"

"(19+19*sqrt(2))/11"

"Im((23+5*I)^(20/13))"

"4/95923"

"GAM(23/24)^ln(3)+Pi"

"1/2398073"

"6^(3/4)+1/5*2^(3/4)"

"1/239807"

"F(41/46;13/24;1)"

"3/71942"

Most of this can be transformed with ToExpression, though you will need to map the functions first or use the package @halirutan suggested.

share|improve this answer

Your Answer

 
discard

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.