Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Mathematica bug in handling trigonometric functions? (and more)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55683] Mathematica bug in handling trigonometric functions? (and more)
  • From: APC <caraman48 at yahoo.com>
  • Date: Sun, 3 Apr 2005 05:50:51 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

a)"Sum"-Command

mathematica 5.1:

input:   Sum[Sin[k]*Cos[k + 1], {k, 1, n}] 
output:  (1/4)*(Cos[2] - Cos[2 + 2*n])*Csc[1]

which is obviously incorrect.

with the more general Sum[Sin[a*k]*Cos[k + 1], {k, 1, n}] i get correct results, though.

(mathematica 2.2's "SymbolicSum" command has no problems at all)

another example:

input:  Sum[Log[k]/Exp[k], {k, 1, Infinity}]
output:  (-(E*Derivative[1, 0][PolyLog][0, E^(-1)]) + 
  Derivative[0, 1, 0][LerchPhi][E^(-1), 0, 1])/E

which is incorrect. -Derivative[1, 0][PolyLog][0, E^(-1)]alone is the correct result, the LerchPhi term is identical so the output could be simplified to "0", which is wrong, of course. there seems to be a problem with "Sum" and derivatives of functions, as 

Sum[Log[k]^2/k^3, {k, 1, Infinity}]

for example yields an incorrect result under similar circumstances.

b)"Integrate" command

input:  Integrate[Sqrt[Sin[x] + Cos[x]], x]
output:  (2*(Cos[x] + Sin[x] + Null*(1 + Sin[2*x])^(1/4)))/Sqrt[Cos[x] + Sin[x]]

the output includes a "Null"-term.

the result for the more general case 

input:  Integrate[Sqrt[a*Sin[x] + b*Cos[x]], x]

is correct, though.

apparently "Sum" and "Integrate" have problems handling special cases involving trigonometric functions.
please check for yourself. if i'm correct, i can no more trust any "Sum" or "Integrate" results without checking twice.


  • Prev by Date: Re: transpose
  • Next by Date: file corrupted
  • Previous by thread: Re: Re: power series in more than one variables
  • Next by thread: Re: Mathematica bug in handling trigonometric functions? (and more)