Hot answers tagged

38

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


32

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


15

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


14

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


12

Amplifying on answer by @rhermans f[m_] = Product[(1296 n^4 (1 + (1 + n)^3))/((-1 + 36 n^2)^2 (-1 + (1 + n)^3)), {n, 1, m}] (* (Pi^2*Gamma[1 + m]^3*Gamma[3 + m])/ (6*(3 + 3*m + m^2)*Gamma[5/6 + m]^ 2*Gamma[7/6 + m]^2) *) This product converges Limit[f[m + 1]/f[m], m -> Infinity] (* 1 *) Limit[f[m], m -> Infinity] (* Pi^2/6 *)...


11

Product[ (1296 n^4 (1 + (1 + n)^3))/((-1 + 36 n^2)^2 (-1 + (1 + n)^3)) , {n, 1, ∞} ] === Zeta[2] True Zeta[2] π^2/6


9

First I create a set of data to simulate yours. data = RandomVariate[ExponentialDistribution[1], 10^4]; Now you can take advantage of the EmpiricalDistribution function to define a model-free distribution based on your data. edist = EmpiricalDistribution[data]; The core of what you are asking for is to obtain a TransformedDistribution, i.e starting ...


9

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


8

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


7

I changed tri to List of your code. d = 9; x = {}; For[t = 1, t <= d, t++, If[t < d, AppendTo[x, {t, 1, 1} <-> {t + 1, 1, 1}]]; For[r = 2, r <= d, r++, If[t < d, AppendTo[x, {t, r, 1} <-> {t + 1, r, 1}]]; For[i = 2, i <= r, i++, If[t < d, AppendTo[x, {t, r, i} <-> {t + 1, r, i}]]; AppendTo[x, {t, r, i - 1} <-...


7

First we can see that ${\frac{(6k+1)^{k}}{(2k+5)^{k}}}$ behaves asymptotically as $3^k$, while $(z-2i)^k$ is divergent if $\|z-2i\|>1 $, however when $\|z-2i\|<1 $ it is convergent. For $\|z-2i\|=1$ this criterion is not conclusive. On the other hand we can carefully extend this argument to the full sequence, so we need only $\|z-2i\| < \frac{1}{3}...


7

I tried to find an even simpler product. Here's my solution: $$ \zeta(2) =\prod _{n=1}^{\infty } \frac{1}{\left(1-\frac{1}{4 n^2}\right) \left(1-\frac{1}{36 n^2}\right)}$$ In Mathematica Product[ 1/(1 - 1/(4 n^2)) 1/(1 - 1/(36 n^2)), {n, 1, \[Infinity]}] (* Out[76]= \[Pi]^2/6 *) We can derive this from the well-known product formula of the sine ...


6

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

This is going to be an alternative answer to Dr. Wolfgang Hintze's question. Consider a limit: \begin{equation} g := \prod\limits_{n=1}^\infty \frac{1}{\left(1-\frac{A^2}{n^2}\right)\left(1-\frac{B^2}{n^2}\right)\left(1-\frac{C^2}{n^2}\right)\left(1-\frac{D^2}{n^2}\right)} \end{equation} Taking logs we have: \begin{equation} \log(g) = - \sum\limits_{n=1}^\...


5

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


5

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


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

You can get rid of the problematic powers of -1 by combining pairs. Then do a ration test. I only do an approximation below so this rests on Series not dropping important terms e.g. from unrecognized cancellation. My guess is it's fine, and some numeric tests indicate the approximation below is reliable. It shows that ratios of paired sums decreases as O(1/n)...


4

This is a problem known as finding moments of moments. In this case, we seek the covariance (i.e. the $\mu_{1,1}$ central moment) of various sample moments. The modus operandi for solving such problems is to work with power sum notation $s_r$, namely: $$s_r = \sum_{i=1}^n X_i^r$$ In this case, you are interested in the sample mean $ = \frac{s_1}{n}$, and ...


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


3

k[] is function defined by you and tri is making UndirectedEdge-s k[j_List] := Block[{t = j[[1]], r = j[[2]], i = j[[3]]},(2 t - 1) 2^(-i + r) 3^(-1 + i)] tri[{t_, r_, i_}] := {{t, r, i} <-> {t, r + 1, i}, {t, r + 1, i} <-> {t, r + 1, i + 1},{t, r + 1, i + 1} <-> {t, r, i}} I remaked your code like this for making Graph. d = 4; data ...


3

You can apply your transformation to your sample data and use EmpiricalDistribution on the transformed data without having to use TransformedDistribution: data = RandomVariate[ExponentialDistribution[1], 10^4]; ed = EmpiricalDistribution[data]; edtr = EmpiricalDistribution[Sqrt@data]; Plot[{CDF[ed, x], CDF[edtr, x]}, {x, 0, 4}, PlotLegends -> {"CDF\...


3

my stab at it, unfortunately only a marginal improvement in time: ii=13; Clear[a, b]; b = FoldList[Times, 1, Table[ Exp[MangoldtLambda[n]], {n, 2, ii}]]; a = Prepend[Table[ Limit[ Zeta[s] Total[Exp[Divisors[n]]^(s - 1) MoebiusMu[Divisors[n]]], s -> 1], {n, 2, ii}], 1] ; Monitor[aa = Prepend[Table[ Min[...


2

I realized now that I included unnecessary many terms of the Dirichlet inverse of the Euler totient. Therefore a better program is: ii = 13 aa = Range[ii]*0; Monitor[Do[ Clear[A, a, b, n, k]; b = Table[Product[Exp[MangoldtLambda[n]], {n, 1, k}], {k, 1, nn}]; a = Table[ If[n == 1, 1, Limit[Zeta[s] Total[ Exp[Divisors[n]]^(s - 1)*...


2

I can only answer to the first part of your question. One can show that the function converge to a number 1.) with a plot (first guess) f = 1/Binomial[1/8 (2 n (n + 2) + (-1)^(n + 1) + 1), 1/8 (2 n^2 + (-1)^n - 1)] DiscretePlot[Sum[f, {n, 0, k}], {k, 25}] 2.) with EulerSum in the NumericalCalculus package. Unfortunately works EulerSumonly with ...


1

An observation rather than an answer: interestingly, ContourPlot[z[x + I y] - z[-1/(x + I y)], {x, -1, 1}, {y, .001, 1}, AspectRatio -> Automatic] produces this: Seemingly Mathematica recognizes that one indeed gets zero along these circular arcs...


1

This is not an answer. I have additional observations about the answer by Dr. Wolfgang Hintze. In response to his first comment: From here, when we omit the first two primes from Euler's product, we get a square: $$\frac{\pi^2}{9} =\prod _{n=3}^{\infty } \frac{1}{1-p_n^{-2}},$$ then substituting $6n$ for $p_n,$ we get the square root: $$\frac{\pi}{3} =\prod ...


1

Denominators of first sequence: A003418, which are symmetric sequences of greatest divisors <= ii. The denominators of the differences are these greatest divisors. See here and here. Edit: I missed that ii=9 is 840 instead of 2520 in the first sequence and is a zero instead of 9 in the second. So, the symmetry stops at 9. I'll leave this answer in case ...


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 j]\...


1

The following function splits m=Binomial[n,k] into one or two parts whose product is m. The parts satisfy the conditions you specified, to the best of my understanding. UVfactors[n_, k_] := With[{f = FactorInteger[Binomial[n, k]]}, Print[Binomial[n, k]]; Print[f]; Apply[Times, Map[#[[All,1]]^#[[All,2]]&, SplitBy[f, ...



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