# Tag Info

33

Here's some code that I used recently, based on code by Paul Abbott [1, 2]. Clear[TranscendentalRecognize] TranscendentalRecognize[num_Real, basis_List, ord_?Positive, debug:(True|False):False] := Module[{vect, mat, lr, ans}, vect = Round[10^Floor[ord - 1] Join[{num}, N[basis, ord]]]; mat = Append[IdentityMatrix[Length[vect]], vect]; lr = ...

28

I can offer a round-about method. First compute the numerical approximation. I obtain, to high precision, In[24]:= N[Sum[1/(2*n!), {n, 0, 100}], 100] Out[24]= 1.\ 3591409142295226176801437356763312488786235468499797874834838138620383\ 15176773797285691089262583214 Now paste that into a Wolfram|Alpha query, accessed by clicking on the '+' sign at upper ...

10

I asked a similar question on MathGroup some years ago. If you read that thread, you'll get some pointers about how these algorithms work (they're based on lattice reduction, see also here). There's a package by Eric Weisstein for doing something like this: see ToExact and TranscendentalRecognize in Simplify.m. This issue of the Mathematica Journal is ...

7

Let's say you have a set of data: data = {{-2., -9.424}, {-1.5, -2.586}, {-1., -3.047}, {-0.5, -1.203}, \ {0., 0.551}, {0.5, 4.566}, {1., 12.077}, {1.5, 21.2118}, {2., 44.752}}; and you suspect it can be modeled with a 3rd order polynomial. You can set up the design matrix using the following: a = DesignMatrix[data, {x, x^2, x^3}, x] This link ...

7

Here's a variant of Danny's answer, that's perhaps a bit more automated: WolframAlpha[ToString[ NSum[1/(2*n!), {n, 0, Infinity}, WorkingPrecision -> 50]], {{"PossibleClosedForm", 1}, "ComputableData"}]

7

Rationalize may be an option, although I doubt it is as powerful as what WA is doing. Here's the documentation.

5

This answer doesn't use Mathematica, but another great resource for this sort of thing is the Online Encyclopedia of Integer Sequences. I've used it successfully many times when Mathematica has given me a decimal approximation but I've been after an analytical expression. Among other things, the encyclopedia includes the decimal expansions of a huge number ...

5

Following up on Simon's note in his answer: This code can be cleaned up a little and made more efficient by using the PSLQ-based algorithm FindIntegerNullVector[] introduced in Mathematica version 8. here is a re-implementation of Abbott's TranscendentalRecognize[]: TranscendentalRecognize[num_?NumericQ, basis_?VectorQ] := Module[{lr, ans}, lr = ...

4

I think Mathematica is correct here: $$\int_{-2}^2 \delta(x^2+y^2+z^2-1)~ dx dy dz = \int_0^\infty dr \int_0^\pi d\theta \int_0^{2\pi}d\phi ~r^2\sin\theta~ \delta(r^2-1)$$ $$= \frac{1}{2}\int_0^\infty d(r^2) \int_0^\pi d\theta \int_0^{2\pi}d\phi ~r\sin\theta~ \delta(r^2-1) = \frac{1}{2}\int_0^\pi d\theta \int_0^{2\pi}d\phi ~ \sin\theta= 2\pi$$

4

This question reminds me somewhat of a post on the Wolfram Blog about finding rational approximations to Pi. It may be of interest to you. The only way I know to approach this sort of thing is by genetic programming. Expressions in Mathematica can be manipulated like trees. You could generate a population of random expressions, see how closely they come to ...

3

This is extremely hacky, because I don't know how to do proper html processing in Mathematica. The following looks looks up the value on the Inverse Symbolic Calculator and returns the best match. InverseSymbolic[x_] := Module[{url, result, start, end, preprocess, guess, formatted}, url = "http://isc.carma.newcastle.edu.au/standardCalc"; result = ...

3

@asad the comments are all appropriate and (if I understand your aim), I present a way to implement to perhaps kickstart your own approach. However, I suggest in future you post an attempt, however imperfect. Further, it is helpful to post a small example so people can be clear about what you mean. Finally, if I misunderstand your aim then comment, otherwise ...

1

Bill s already gave an answer as a comment. An explicit proof of the conjecture can be obtained by noting that (A^3)_{il}=A_{ij}A_{jk}A_{kl}=\sum_{j=1}^N\sum_{k=1}^N\text{Boole}[i\leq j]\text{Boole}[j\leq k]\text{Boole}[k\leq l]\\ =\sum_{j=1}^N\text{Boole}[i\leq j]\sum_{k=1}^N\text{Boole}[j\leq k]\text{Boole}[k\leq l]\\ =\sum_{j=1}^N\text{Boole}[i\leq ...

1

Use the built in function Sum: Sum[1/(2 p!), {p, 0, Infinity}] Mathematica outputs E/2.

Only top voted, non community-wiki answers of a minimum length are eligible