Neither Maple nor Mathematica nor MuPAD is
able to simplify this expression directly...
within several hours at Core 2 duo ;)
product(cos(Pi*2^j/1023), j= 0..9)/
product(cos(Pi*2^j/1025), j= 0..9);
Is there a simplification wizard who can
to display a set of a CAS commands leading
to the exact answer?
Best wishes,
Vladimir Bondarenko
VM and GEMM architect
Co-founder, CEO, Mathematical Director
http://www.cybertester.com/ Cyber Tester, LLC
http://maple.bug-list.org/ Maple Bugs Encyclopaedia
http://www.CAS-testing.org/ CAS Testing
Product(cos(Pi*2^j/(2^k*2-1)), j= 0..k)/Product(cos(Pi*2^j/(2^k*2+1)),
j= 0..k)=-1;
Chris
CW> -1
You are 100% right. I never had any doubt about your
personal math gift.
Also this concrete example is far from being kinda the
summit of Art of Computation. This concrete one is quite
obvious to a math-skilled human being.
Please note, however, that as I have emphasized repeatedly,
the Cyber Tester's challenges are NOT about human beings,
not about your or my resourcefulness, but about modern- and
next-generation computer algebra systems' potential to deal
with some objects in a *straightforward* way -- so that other
relatively math unskilled persons could use CASs' powers to
resolve the toughest industrial, educational and research
challenges coming.
By requesting to publish the explicit human-based solutions
we hope to create, to accumulate a solid stock of patterns
to be possibly used along with regular algorithms to handle
various math tasks automatically.
So the question remains,
VB> Is there a simplification wizard who can
VB> to display a set of a CAS commands leading
VB> to the exact answer?
Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025), j= 0..9):
p:=value(%):
convert(p, sin):
simplify(%);
-1
AV> p:=value(%):
AV> convert(p, sin):
AV> simplify(%);
AV> -1
Sir, I can summarize your answer in a single word,
An idyll ;)
I really look forward to seeing how someone can show what do you want,
with Mathematica.
In the meantime I am very impressed by the usefulness of Maple's
function convert.
Dimitris
Ο/Η Vladimir Bondarenko έγραψε:
Does Mathematica have a function like Maple's "combine",
which combines products of trigonometric functions into sums?
Because
product(cos(Pi*2^j/1023), j= 0..9)/product(cos(Pi*2^j/1025), j= 0..9):
combine(%);
simplify(%);
also works in Maple...
restart;
assume(d,integer,k,integer,2^k,integer);
print(Product(cos(Pi*2^j/1023), j= 0..9)/
Product(cos(Pi*2^j/1025), j= 0..9));
temp:=Product(cos(Pi*2^j/(2^k*2-1)), j= 0..k)/
Product(cos(Pi*2^j/(2^k*2+1)), j= 0..k);
EQ2:=Product(cos(Pi/d*2^j),j = 0 .. k) =
-2^(-k-1)*exp(I*Pi/d)*(-(exp(I*Pi/d)^2)^(2^k)+(exp(I*Pi/d)^2)^(-2^k))/(exp(I*Pi/d)^2-1);
print(`Substitute EQ2 into temp`);
temp:=subs(subs(d=2^k*2-1,EQ2),subs(d=2^k*2+1,EQ2),temp):
print('`Convert`',indets(temp,specfunc(anything,exp))):
temp:=(eval@subs)(exp=proc(x) exp(I*Pi)^(x/(I*Pi))
end,expand(temp,power)):
SIMP:=proc(E)
subs(map((x->x)=(x->op([1,1],x)^(op([1,2],x)*op(2,x))),select(evalb@proc(E)
is(op(2,E),integer)=true end,indets(E,(anything^anything)^anything))),E)
end:
SIMP2:=proc(E)
subs(map(proc(E) E=proc(E) local p; if type(E,`+`) then mul((-1)^p,p=E)
else (-1)^E fi end(frontend(convert,[op(2,E),parfrac,2^k]))
end,indets(E,(-1)^anything)),E);
end:
print(`Reduce & distribute exponents`);
Product(cos(Pi*2^j/(2^k*2-1)), j= 0..k)/
Product(cos(Pi*2^j/(2^k*2+1)), j= 0..k)=
(normal@SIMP2)(factor(combine(SIMP(temp),power)));
Chris
Very nice. This technique works quite well for the generalized expression:
f := n -> mul(cos(Pi*2^j/(2^n-1)),j=0..n-1)/mul(cos(Pi*2^j/(2^n+1)),j=0..n-1):
simplify(convert(f(200),sin));
-1
--
Joe Riel
But that's about the *only* kind of product/quotient of cosines
for which this 'technique' works. -
This is so because "convert(cos(x),sin);" produces
sin(2 x)
1/2 --------
sin(x)
and all of the resulting sine terms in the products cancel.
You could even have used
eval(convert(f(200),sin));
instead of "simplify(...)" and gotten the same result.
We agree that for the possitive values of the upper limit of the
iterator the expression
is actually equal to -1; doesn't we?
So...
>Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025), j=0..10):
> p:=value(%);
> convert(p, sin);
> simplify(%);
> evalf(%);
Pi 2 Pi 4 Pi 8 Pi 16 Pi 32 Pi
p := cos(----) cos(----) cos(----) cos(----) cos(-----) cos(-----)
1023 1023 1023 1023 1023 1023
64 Pi 128 Pi 256 Pi 511 Pi / /
cos(-----) cos(------) cos(------) cos(------) / |
1023 1023 1023 1023 / \
Pi 2 2 Pi 4 Pi 8 Pi 16 Pi
cos(----) cos(----) cos(----) cos(----) cos(-----)
1025 1025 1025 1025 1025
32 Pi 64 Pi 128 Pi 256 Pi 512 Pi \
cos(-----) cos(-----) cos(------) cos(------) cos(------)|
1025 1025 1025 1025 1025 /
512 Pi 1022 Pi Pi 2
2 sin(------) sin(-------) sin(----)
1023 1023 1025
--------------------------------------------
Pi 511 Pi 2 Pi 1024 Pi
sin(----) sin(------) sin(----) sin(-------)
1023 1023 1025 1025
Pi
2 sin(----)
1025
-----------
2 Pi
sin(----)
1025
1.000004697
which is correct.
BUT...
> Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025), j=0..17):
> p:=value(%);
> convert(p, sin);
> simplify(%);
> evalf(%);
Pi 2 Pi 4 Pi 8 Pi 16 Pi 32 Pi
p := cos(----) cos(----) cos(----) cos(----) cos(-----) cos(-----)
1023 1023 1023 1023 1023 1023
64 Pi 128 Pi 256 Pi 511 Pi / /
cos(-----) cos(------) cos(------) cos(------) / |
1023 1023 1023 1023 / \
Pi 2 2 Pi 2 4 Pi 2 8 Pi 2 16 Pi 2
cos(----) cos(----) cos(----) cos(----) cos(-----)
1025 1025 1025 1025 1025
32 Pi 2 64 Pi 2 128 Pi 2 256 Pi 512 Pi \
cos(-----) cos(-----) cos(------) cos(------) cos(------)|
1025 1025 1025 1025 1025 /
512 Pi 1022 Pi Pi 2
256 sin(------) sin(-------) sin(----)
1023 1023 1025
----------------------------------------------
Pi 511 Pi 256 Pi 1024 Pi
sin(----) sin(------) sin(------) sin(-------)
1023 1023 1025 1025
Pi
256 sin(----)
1025
-------------
256 Pi
sin(------)
1025
1.110486595
Dimitris
Ο/Η Axel Vogt έγραψε:
> I was quite impressed from your solution BUT...note it doesn't work
> for all the upper limits!
>
> We agree that for the possitive values of the upper limit of the
> iterator the expression
> is actually equal to -1; doesn't we?
>
> BUT...
>
>> Product(cos(Pi*2^j/1023), j= 0..9)/ Product(cos(Pi*2^j/1025), j=0..17):
You cannot arbitrarily change the expression. The general form is
Product(cos(Pi*2^j/(2^n-1))/cos(Pi*2^j/(2^n+1)), j=0..n-1);
To demonstrate that, you can do the following
fj1 := cos(Pi*2^j/(2^n-1))/cos(Pi*2^j/(2^n+1));
fj2 := eval(convert(fj1, sin));
for m from 0 to 4 do
F[m] := eval(convert(mul(subs(j=k,fj2), k=0..m),sin));
end do;
# From that we can do the following:
m := 'm':
F[m] := subs(2^(4+1)=2^(m+1), F[4]);
# we want m=n-1
F[n-1] := eval(F[m], m=n-1);
subs([2^n=K+1, 2^n+1=J, 2^n-1=K], F[n-1]);
simplify(%);
subs(K = J-2, %);
simplify(%);
-1
Note that it fails for n = 0, 1.
--
Joe Riel