Message-ID: <55D47DAC.19F9EDD3@freenet.de> Date: Wed, 19 Aug 2015 14:59:24 +0200 From: clicliclic@freenet.de X-Mailer: Mozilla 4.75 [de] (Win98; U) X-Accept-Language: de MIME-Version: 1.0 Newsgroups: comp.soft-sys.math.maple,sci.math.symbolic Subject: Re: Simplify trigonometric expressions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: news.synserver.de X-Trace: news.synserver.de 1439988853 217.184.102.249 (19 Aug 2015 14:54:13 +0200) Organization: synergetic AG Lines: 78 X-Complaints-To: abuse@synergetic.ag X-SynServer-News: news.synserver.de Path: csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!news1.dtag.de!news.synserver.de!not-for-mail Xref: csiph.com comp.soft-sys.math.maple:1185 sci.math.symbolic:5465 Axel Vogt schrieb: > > On 14.08.2015 18:45, Peter Luschny wrote: > > > > OK. So what about these? > > > > [1] -1/7+x-(2/7)*cos((2/7)*Pi)+(2/7)*cos((3/7)*Pi)+(2/7)*cos((1/7)*Pi) > > > > [2] (4/7)*x*cos((1/7)*Pi)-(2/7)*cos((1/7)*Pi)-(4/7)*x*cos((2/7)*Pi)+(2/7)*cos((2/7)*Pi)+(4/7)*x*cos((3/7)*Pi)-(2/7)*cos((3/7)*Pi)+1/7-(2/7)*x+x^2 > > > > [3] (2/7)*cos((1/7)*Pi)+(6/7)*x^2*cos((1/7)*Pi)-(6/7)*x*cos((1/7)*Pi)-(2/7)*cos((2/7)*Pi)-(6/7)*cos((2/7)*Pi)*x^2+(6/7)*x*cos((2/7)*Pi)+(2/7)*cos((3/7)*Pi)+(6/7)*x^2*cos((3/7)*Pi)-(6/7)*x*cos((3/7)*Pi)-1/7+(3/7)*x-(3/7)*x^2+x^3 > > > > [4] -(2/7)*cos((1/7)*Pi)-(12/7)*x^2*cos((1/7)*Pi)+(8/7)*x*cos((1/7)*Pi)+(8/7)*x^3*cos((1/7)*Pi)-(8/7)*cos((2/7)*Pi)*x^3+(2/7)*cos((2/7)*Pi)+(12/7)*cos((2/7)*Pi)*x^2-(8/7)*x*cos((2/7)*Pi)-(2/7)*cos((3/7)*Pi)-(12/7)*x^2*cos((3/7)*Pi)+(8/7)*x*cos((3/7)*Pi)+(8/7)*x^3*cos((3/7)*Pi)+1/7-(4/7)*x+(6/7)*x^2-(4/7)*x^3+x^4 > > > > evalf[20](L): fnormal(%): identify(%); # to have a guess > > 2 3 4 > [x, x , x , x ] > > convert(L, RootOf): # nun aber in echt ... > simplify(%); > 2 3 4 > [x, x , x , x ] > > I think it is also "what is intended by simplify (and should trig > survive)?" Thus I included sci.math.symbolic for further answers. > > PS: would you mind to post as list > > PPS: well, it may break down at some degree Derive 6.10 doesn't need any teaching: your quadruple expression [-1/7+x-2/7*COS(2/7*pi)+2/7*COS(3/7*pi)+2/7*COS(1/7*pi),4/7*x*CO~ S(1/7*pi)-2/7*COS(1/7*pi)-4/7*x*COS(2/7*pi)+2/7*COS(2/7*pi)+4/7*~ x*COS(3/7*pi)-2/7*COS(3/7*pi)+1/7-2/7*x+x^2,2/7*COS(1/7*pi)+6/7*~ x^2*COS(1/7*pi)-6/7*x*COS(1/7*pi)-2/7*COS(2/7*pi)-6/7*COS(2/7*pi~ )*x^2+6/7*x*COS(2/7*pi)+2/7*COS(3/7*pi)+6/7*x^2*COS(3/7*pi)-6/7*~ x*COS(3/7*pi)-1/7+3/7*x-3/7*x^2+x^3,-2/7*COS(1/7*pi)-12/7*x^2*CO~ S(1/7*pi)+8/7*x*COS(1/7*pi)+8/7*x^3*COS(1/7*pi)-8/7*COS(2/7*pi)*~ x^3+2/7*COS(2/7*pi)+12/7*COS(2/7*pi)*x^2-8/7*x*COS(2/7*pi)-2/7*C~ OS(3/7*pi)-12/7*x^2*COS(3/7*pi)+8/7*x*COS(3/7*pi)+8/7*x^3*COS(3/~ 7*pi)+1/7-4/7*x+6/7*x^2-4/7*x^3+x^4] is automatically simplified to [x,x^2,x^3,x^4] within a fraction of a second. These are the reduction steps for the first expression: -1/7+x-2/7*COS(2/7*pi)+2/7*COS(3/7*pi)+2/7*COS(1/7*pi) " COS(n*pi) -> SIN((1/2-n)*pi) " -1/7+x-2*SIN(3*pi/14)/7+2*COS(3*pi/7)/7+2*COS(pi/7)/7 " COS(n*pi) -> SIN((1/2-n)*pi) " -1/7+x-2*SIN(3*pi/14)/7+2*SIN(pi/14)/7+2*COS(pi/7)/7 " SIN(3*pi/14)-SIN(pi/14) -> COS(pi/7)-1/2 " -1/7+x-2*(COS(pi/7)-1/2)/7+2*COS(pi/7)/7 " one final step " x I expect the remainder to be handled in the same manner. But I don't see why Derive should not fail to simplify similar expressions whose trigonometric arguments involve larger denominators, as the rule to handle SIN(3*pi/14) - SIN(pi/14) is not generic. Martin.