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

To find a possible closed form of a number, I can use the function

WolframAlpha["6.38905609893065", IncludePods -> "PossibleClosedForm"]

It returns a result in the following form:

Possible closed forms

The InputForm of this result displays quite a large expression containing pods and cells represented as XMLElements.

Is there an easy way to extract the first suggested closed form as a normal expression (in this case, E^2 - 1)?

share|improve this question
is this "easy"? WolframAlpha[ "6.38905609893065", {{"PossibleClosedForm", 1}, "FormulaData"}][[1, 1]] – chuy Oct 31 '13 at 21:03
up vote 4 down vote accepted

Here is how you attack this: First click on the little "+" in the right upper corner. Then you select either "Subpod content" or directly "Formula data". Both will result in a more specific request which gives you the hint you need:

  "6.38905609893065", {{"PossibleClosedForm", 1}, "FormulaData"}], 
  "6.38905609893065", {{"PossibleClosedForm", 2}, "FormulaData"}], 
  "6.38905609893065", {{"PossibleClosedForm", 3}, "FormulaData"}]}

From this, it is only one step to

  "6.38905609893065", {{"PossibleClosedForm", 1}, "FormulaData"}] /. 
 Hold[expr_ ≈ _] :> expr

Mathematica graphics

share|improve this answer
Thanks, this was very useful. Unfortunately, it does not handle cases like 9.4536360064616926. In this case WolframAlpha returns $\frac{L^4}5$ with a comment that $L$ is the lemniscate constant. The FormulaData in this case is $Failed, while ideally it would be Gamma[1/4]^8/(320 π^2). – Vladimir Reshetnikov Nov 1 '13 at 0:34
@VladimirReshetnikov Yes, this is very unfortunate, although I kind of expected that this does not work for every possible example. WolframAlpha is more a tool for a human user. – halirutan Nov 1 '13 at 14:30

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.