Re: RE: Magic number 23
- To: mathgroup at smc.vnet.net
- Subject: [mg41499] Re: [mg41464] RE: [mg41445] Magic number 23
- From: "Ingolf Dahl" <ingolf.dahl at telia.com>
- Date: Fri, 23 May 2003 03:24:45 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
It is sometimes said that the Mathematica help system is poor, without a freetext search tool. But I now know that Mathematica has not only one help system, it has four, and two of them even pass the Turing test. First, we have the nominal Help system, built into Mathematica. Secondly we have the MathWorld, which has answered many of my questions even before I have formulated them (thank you for the links!). Thirdly we have the Wolfram Support, and they give fast, complete and elaborate answers including 20 references to the ignorant inquirer. And at last, but not least, we have the Mathgroup, always overwhelming helpful. Thank you all! More recreational comments (This is not a heavy serious problem for me, I am just playing around. But that is a good way to learn.): I made a comment on Sin[Pi/8]. We surely can find the trigonometric expansion for it, by for instance FunctionExpand. What I refered to in [mg41464] was that if you take for instance Sin[Pi/8] + Sin[Pi/10] + Sin[Pi/12] and evaluate, Mathematica will return (-1 + Sqrt[3])/(2*Sqrt[2]) + (-1 + Sqrt[5])/4 + Sin[Pi/8] with Sin[Pi/8] unevaluated, but Sin[Pi/10] and Sin[Pi/12] evaluated. The first reaction from the ignorant user (that's me) is to test with Simplify and FullSimplify, but that does not help. And FullSimplify crashed the operating system for Sin[Pi/23]. Now I have learnt from Wolfram and from you in the Mathgroup that the following operations may help (RootReduce[FullSimplify[#1]] & ) /@ TrigToExp[Sin[Pi/n]] (gives Root expressions both for n=8 and n=17) ToRadicals[RootReduce[FullSimplify[TrigToExp[Sin[Pi/n]]]]] (gives a radical expression for n=8 but a Root expression for n=17) FullSimplify[TrigFactor[Sin[Pi/n]]] (gives radical expression for n=8 but a expression involving powers of -1 for n=17) FunctionExpand (gives radical expressions, both for n=8 and n=17) Developer`TrigToRadicals (also gives radical expressions, both for n=8 and n=17) You might also test with n=257 (a Fermat prime), if your computer has idle spare time. Now I see that Wolfram Support explains the problem with FullSimplify[Sin[Pi/23]] by the following statement: "In the examples given, the timings for FullSimplify arise basically from FullSimplify calling FunctionExpand and FunctionExpand doing the work of writing the trigonometric expressions in minimal radicals." Then I wonder why FullSimplify[Sin[Pi/8]] and FullSimplify[FunctionExpand[Sin[Pi/8]]] do not give the same result. It is possible to play with this a lot more. Try: FullSimplify[Sin[Pi/8] + Cos[Pi/8] - Sqrt[2 + Sqrt[2]]/2] FullSimplify[Sin[Pi/8] - Cos[Pi/8] - Sqrt[2 + Sqrt[2]]/2] FullSimplify[Sin[Pi/8] - Sqrt[8 - Sqrt[32]]/4] FullSimplify[FunctionExpand[Sin[Pi/8] - Sqrt[8 - Sqrt[32]]/4]] FullSimplify[Sin[Pi/8] + Cos[Pi/8] - Sqrt[8 + Sqrt[32]]/4] FullSimplify[Sin[Pi/8] - Cos[Pi/8] - Sqrt[8 - Sqrt[32]]/4] FullSimplify[ Sin[Pi/8] + Sin[Pi/15] - Sqrt[7/16 - Sqrt[5]/16 - (1/2)*Sqrt[15/32 - (3*Sqrt[5])/32]]] and so on. Do you understand the behaviour, any systematic trend or so? Ingolf Dahl Sweden