MathGroup Archive 2001

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

Search the Archive

Times Ordered Bug with trig functions??

  • To: mathgroup at
  • Subject: [mg29598] Times Ordered Bug with trig functions??
  • From: "Alan Mason" <amason2 at>
  • Date: Wed, 27 Jun 2001 05:12:33 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I've succeeded in writing a differential operator calculus program using **
However, my first choice was to set Times to Ordered by
ClearAttributes[Times, {Orderless}].  This seemed preferable since no change
of notation is involved. In so doing I discovered an apparent bug -- with
trig functions (but not others) a wrong answer results; something in the
Trig module is causing the system to forget that Times is supposed to be
Ordered. Probably an unwholesome interaction with Power, since the error
occurs when powers would be available with the normal Times.

The following code exhibits the problem (all symbols are global atoms):
ClearAttributes[Times, {Orderless}]
a c D a b e
a c D a b e
a c Cos[q] D v Cos[q] (* WRONG *)
\!\(a\ c\ D\ v\ Cos[q]\^2\)
a c Cos[q] D V Cos[w]
a c Cos[q] D V Cos[w]
a c Exp[q] D v Exp[q]
\!\(a\ c\ E\^q\ D\ v\ E\^q\)
a c Tan[x] D v Tan[x] (* WRONG *)
\!\(a\ c\ D\ v\ Tan[x]\^2\)

I spoke to support at Wolfram Research, but they deny this is a bug.  Seems
to me it at the very least breaks the pattern matcher.  I'm running
Mathematica 3.0; perhaps Times Ordered will not be supported in the future.
Fortunately, there are other (more complicated) ways to get the desired

  • Prev by Date: Re: overlay imported picture with Mathatmatica calc
  • Next by Date: Frame on Bar Chart
  • Previous by thread: InverseLaplaceTransform
  • Next by thread: Re: Times Ordered Bug with trig functions??