For the commands Digits:=20; identify(evalf(k/Pi^4));
I get the closed form result with k=105 but not with k=104 or k=106. I have tried to understand this behavior from looking at the identify help page but haven't figured it out.
Maybe one of the (many) options to `identify` would need to be adjusted, in order to get success for other values N/Pi^4 .
Here's one idea (of many possible). Maybe it has to do with the default number or size of prime factors that might be involved in the rational part? Consider the size and number of prime factors that appear alongside the instances of success here next,
It appears as if the prime factor 7 is the highest that is present for success above. And 105 fits that, with factorization of 3*5*7, but 104, 106, etc, do not. (Digits might also figure in, I'm not sure.) I'm not sure which if any optional argument to `identify` might control that key value, if that interpretation is correct.
Extending the basis will make it work for 106/Pi^4 too, but it understandably gets slower. I had to raise Digits again, to get it to work. The dependence on the Digits setting is less clear.
The help-page for identify clearly mentions that the default values for BasisProdConst is only [2,3,5,7,Pi,exp(1),ln(2),ln(3),Zeta(3),Zeta(5)]
That should explain why the other values in your sequence were not found. I think that my two posts above illustrated these points (both the cause, and how to accomodate it by extending the basis).
Of course, identify works beautifully if you cheat:
flts:=[seq]( (evalf@eval)(k/Pi^4,k=i),i=100..110):
map(identify, flts, BasisPolyConst=[Pi^4]);
100 101 102 103 104 105 106 107 108 109 110
[---, ---, ---, ---, ---, ---, ---, ---, ---, ---, ---]
4 4 4 4 4 4 4 4 4 4 4
Pi Pi Pi Pi Pi Pi Pi Pi Pi Pi Pi
In this special case one can use a method which is part of 'identify':
Digits:=20:
k/Pi^4; subs(k=104,%); a:=evalf(%);
w := [a, Pi, Pi^2, Pi^3, Pi^4, 1/Pi, 1/(Pi^2), 1/(Pi^3), 1/(Pi^4)]
u:=IntegerRelations:-LinearDependency(evalf(w), method=LLL);
'A'*u[1]+'Sum( u[i]*w[i],i=2..nops(w))': value(%);
eval( isolate(%,A), A=a);
`error` = evalf(lhs(%)-rhs(%));
104
1.0676621544871708597 = ---
4
Pi
error = 0.
This is very fast (but weaker than 'identify', it fails with 1/a).
Playing with it (higher precision, larger base) gives examples,
where it will be difficult to find a 'correct' presentation, the
precision may be up to the last decimals - but are not correct
(mainly because of rational representations of floats).
As I read the help page, the constants in BasisProdConst only matter for test 9. Why doesn't 106/Pi^4, for example, match the a[n]*t^k term of test 5?
It seems to me that the workarounds require me to know in advance that Pi is the pertinent basis item. In general I will only start with a floating point number, and I want identify to do some magic on it. It looks like I am expecting too much of identify. Next I was going to ask it to get from a floating point number to 34459425/(3617Pi^8).
The tree which identify must search is enormous. By default it also searches for sums, and sums of powers (with coefficients), etc. The tree has to be heavily cut, or else it would take far too long. If you know that sums, etc, are not to be considered then those rules can be excluded. That's not an unreasonable demand, given the tree growth as the basis and digits increase. But even then, an exact quantity like 34459425/(3617Pi^8) has a large number (depending on the digits of input data) of other constants which are quite close to it. In order to pinpoint just that single desired value one might reasonably need to specifiy a large number of digits of input data, and increase the "multiplicative constant basis" by so many new terms that `identify` would take a prohibitively long time.
ps. Plouffe announced a new version of his inverter today, with 2.459e9 constants in it. For fun, I gave 0.0322515344331994891844220526885 = evalf[30](1/Pi^3) to his (current, or new?) inverter and it returned 1/Pi^3*ln(exp(1)) which is curiously delightful. I wasn't able to get it to resolve evalf[n](1/Pi^4) though.
The basic technology for identify is PSLQ (essentially a descendant of LLL). It is basically all (very clever) linear algebra, no trees anywhere. Looking at the problem as a search problem in a database is an approach favoured by Wolfram Research. Maplesoft favours algorithms, which is what PSLQ is.
One should not have high expectations for "identify." Clearly it should only act as a "suggestion."
For example,
identify(0.999);
returns 1.
Many of us have struggled to teach the structure of the real number line to undergraduates, and are constantly frustrated by the student who knows that 0.999 is not equal to 1, but clings tightly to the idea that 0.999(repeating) is something ever so slightly less than 1.
I am very careful to not use the "identify" command when I teach Calculus, although math majors in Analysis can appreciate the command.
Having said this, the construction
int(f(x),x=a..b) so often returns the wrong numerical value that you start to think that
Acer, thanks for the info on Plouffe's inverter. At 50 digits, it can do both Zeta(8) and Zeta(16), but not Zeta(8)/Zeta(16). (That was the expression I mentioned with Pi^8.) The Maple identify command can do Zeta(8) only, and identifies it as Pi^8/9450. When the new version of the inverter shows up, I'll see if it's any different on these constants.
It used to have 2 searches - basic (on the web page), just looking through the database, and advanced - applying various transformations (few hundreds of them - much more than identify does), and emailing you the result. I didn't see the advanced search there now.
seems OK
Try this:
restart;
Digits:=20;
identify(evalf(k/Pi^4));
seq( eval(%,k=i),i=100..110);
Hope this helps
J. Tarr
second attempt
I was able to reproduce the problem and a work around as follows:
restart; Digits := 20;
104/Pi^4;
evalf(%);
identify(%);
convert(%%%,rational);
It does seem that identify has problems, but convert(x, rational) works.
J. Tarr
convert/rational
It should be %% instead of %%% above.
convert(104/Pi^4,rational) gives 104/Pi^4, but
convert(evalf(104/Pi^4),rational); 2494128918 ---------- 2336065681Alec
just an idea
Maybe one of the (many) options to `identify` would need to be adjusted, in order to get success for other values N/Pi^4 .
Here's one idea (of many possible). Maybe it has to do with the default number or size of prime factors that might be involved in the rational part? Consider the size and number of prime factors that appear alongside the instances of success here next,
It appears as if the prime factor 7 is the highest that is present for success above. And 105 fits that, with factorization of 3*5*7, but 104, 106, etc, do not. (Digits might also figure in, I'm not sure.) I'm not sure which if any optional argument to `identify` might control that key value, if that interpretation is correct.
acer
BasisProdConst
Using the first ten primes and Pi as the basis for product constants gets success for 104=2*3*13 but not for 106=2*53.
> restart: > Digits:=20: > S:=seq(ithprime(i),i=1..10); S := 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 > seq(printf("%a \n",[[ifactors(N)], > identify(evalf(N/Pi^4), > BasisProdConst=[S,Pi],ProdConst=true)]), > N=100..110); [[[1, [[2, 2], [5, 2]]]], 100/Pi^4] [[[1, [[101, 1]]]], 1.0368642077231178541] [[[1, [[2, 1], [3, 1], [17, 1]]]], 102/Pi^4] [[[1, [[103, 1]]]], 1.0573961722324865245] [[[1, [[2, 3], [13, 1]]]], 104/Pi^4] [[[1, [[3, 1], [5, 1], [7, 1]]]], 105/Pi^4] [[[1, [[2, 1], [53, 1]]]], 1.0881941189965395300] [[[1, [[107, 1]]]], 1.0984601012512238652] [[[1, [[2, 2], [3, 3]]]], 108/Pi^4] [[[1, [[109, 1]]]], 1.1189920657605925356] [[[1, [[2, 1], [5, 1], [11, 1]]]], 110/Pi^4]Extending the basis will make it work for 106/Pi^4 too, but it understandably gets slower. I had to raise Digits again, to get it to work. The dependence on the Digits setting is less clear.
> S:=seq(ithprime(i),i=1..17); S := 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59 > Digits:=40: > seq(printf("%a \n",[[ifactors(N)], > identify(evalf(N/Pi^4), > BasisProdConst=[S,Pi],ProdConst=true)]),N=100..110); [[[1, [[2, 2], [5, 2]]]], 100/Pi^4] [[[1, [[101, 1]]]], 1.036864207723117854104431109978988108325] [[[1, [[2, 1], [3, 1], [17, 1]]]], 102/Pi^4] [[[1, [[103, 1]]]], 1.057396172232486524482736676513225496608] [[[1, [[2, 3], [13, 1]]]], 104/Pi^4] [[[1, [[3, 1], [5, 1], [7, 1]]]], 105/Pi^4] [[[1, [[2, 1], [53, 1]]]], 106/Pi^4] [[[1, [[107, 1]]]], 1.098460101251223865239347809581700273176] [[[1, [[2, 2], [3, 3]]]], 108/Pi^4] [[[1, [[109, 1]]]], 1.118992065760592535617653376115937661459] [[[1, [[2, 1], [5, 1], [11, 1]]]], 110/Pi^4]acer
I don't know if this can help!
>Digits:=20:
>L := [seq(evalf(k/Pi^4), k = 100 .. 120)];
>[seq(identify(L[i]), i = 1 .. nops(L))];
# Only 100, 105, 108, 112 and 120 is identify correctly
> map(ifactors, [100, 105, 108, 112, 120]);
[[1, [[2, 2], [5, 2]]], [1, [[3, 1], [5, 1], [7, 1]]], [1, [[2, 2], [3, 3]]],
[1, [[2, 4], [7, 1]]], [1, [[2, 3], [3, 1], [5, 1]]]]
I don't know if you find the same thing. I think that this should be report as a bug in the beta site.
mario.lemelin@cgocable.ca
no
No, that (by itself) is not showing a bug.
The help-page for identify clearly mentions that the default values for BasisProdConst is only [2,3,5,7,Pi,exp(1),ln(2),ln(3),Zeta(3),Zeta(5)]
That should explain why the other values in your sequence were not found. I think that my two posts above illustrated these points (both the cause, and how to accomodate it by extending the basis).
acer
Cheating
Of course, identify works beautifully if you cheat:
flts:=[seq]( (evalf@eval)(k/Pi^4,k=i),i=100..110): map(identify, flts, BasisPolyConst=[Pi^4]); 100 101 102 103 104 105 106 107 108 109 110 [---, ---, ---, ---, ---, ---, ---, ---, ---, ---, ---] 4 4 4 4 4 4 4 4 4 4 4 Pi Pi Pi Pi Pi Pi Pi Pi Pi Pi PiJohn
only some 'cheating': extension
BTW
Extending basis
As I read the help page, the constants in BasisProdConst only matter for test 9. Why doesn't 106/Pi^4, for example, match the a[n]*t^k term of test 5?
It seems to me that the workarounds require me to know in advance that Pi is the pertinent basis item. In general I will only start with a floating point number, and I want identify to do some magic on it. It looks like I am expecting too much of identify. Next I was going to ask it to get from a floating point number to 34459425/(3617Pi^8).
magic
The tree which identify must search is enormous. By default it also searches for sums, and sums of powers (with coefficients), etc. The tree has to be heavily cut, or else it would take far too long. If you know that sums, etc, are not to be considered then those rules can be excluded. That's not an unreasonable demand, given the tree growth as the basis and digits increase. But even then, an exact quantity like 34459425/(3617Pi^8) has a large number (depending on the digits of input data) of other constants which are quite close to it. In order to pinpoint just that single desired value one might reasonably need to specifiy a large number of digits of input data, and increase the "multiplicative constant basis" by so many new terms that `identify` would take a prohibitively long time.
ps. Plouffe announced a new version of his inverter today, with 2.459e9 constants in it. For fun, I gave 0.0322515344331994891844220526885 = evalf[30](1/Pi^3) to his (current, or new?) inverter and it returned 1/Pi^3*ln(exp(1)) which is curiously delightful. I wasn't able to get it to resolve evalf[n](1/Pi^4) though.
acer
Not a tree
The basic technology for identify is PSLQ (essentially a descendant of LLL). It is basically all (very clever) linear algebra, no trees anywhere. Looking at the problem as a search problem in a database is an approach favoured by Wolfram Research. Maplesoft favours algorithms, which is what PSLQ is.
identify expectations
One should not have high expectations for "identify." Clearly it should only act as a "suggestion."
For example,
identify(0.999);
returns 1.
Many of us have struggled to teach the structure of the real number line to undergraduates, and are constantly frustrated by the student who knows that 0.999 is not equal to 1, but clings tightly to the idea that 0.999(repeating) is something ever so slightly less than 1.
I am very careful to not use the "identify" command when I teach Calculus, although math majors in Analysis can appreciate the command.
Having said this, the construction
int(f(x),x=a..b) so often returns the wrong numerical value that you start to think that
identify(evalf(Int(f(x),x=a..b)));
is more reliable!
Useful database
Acer, thanks for the info on Plouffe's inverter. At 50 digits, it can do both Zeta(8) and Zeta(16), but not Zeta(8)/Zeta(16). (That was the expression I mentioned with Pi^8.) The Maple identify command can do Zeta(8) only, and identifies it as Pi^8/9450. When the new version of the inverter shows up, I'll see if it's any different on these constants.
Advanced search
It used to have 2 searches - basic (on the web page), just looking through the database, and advanced - applying various transformations (few hundreds of them - much more than identify does), and emailing you the result. I didn't see the advanced search there now.
_______________
Alec Mihailovs
Maplesoft Member