• To: mathgroup at smc.vnet.net
• Subject: [mg71157] RE: [mg71099] Question about trig simplify
• From: "David Park" <djmp at earthlink.net>
• Date: Thu, 9 Nov 2006 03:39:22 -0500 (EST)

```Robert,

It seems strange. Also notice the following.

Sin[a]*Cos[a] // Simplify
Cos[a] Sin[a]

My idea attitude toward Simplify is that it is great when it works the way
you want, and it often does, but when it doesn't it is better to abandon
Simplify and work with more specific routines, or apply Simplify or other
routines to specific parts of an expression.  (You can do that with rules,
or with Tensorial you can often do it with MapLevelParts or
MapLevelPatterns, or you can do it with ReplacePart)

-2*Sin[a]*Cos[a] // TrigReduce
-Sin[2 a]

David Park

TZ != -5

From: Robert Pigeon [mailto:robert.pigeon at videotron.ca]
To: mathgroup at smc.vnet.net

Hello all,
Is this a bug?

2*Sin[a]*Cos[a] // Simplify  gives Sin[2 a] as expected.

But

-2*Sin[a]*Cos[a] // Simplify  gives -2*Cos[a]*Sin[a]  ...... Why?
If I do -2*(Sin[a]*Cos[a]) // Simplify I get the same answer.

This comes from the rotation matrix: r = {{Cos[a],Sin[a]},{-Sin[a],Cos[a]}}.
Then I do: r.r // Simplify. That gives: {{Cos[2 a],Sin[2 a]},{-2 Cos[a]
Sin[a],Cos[2 a]}}. It does not matter if I do a FullSimplify instead of
Simplify.

After if I do r.r.r // Simplify. The answer is simplified correctly.

I am using Mathematica 5.2 on Windows XP Home.

Any idea?

Robert

Robert Pigeon
TZ = -5

```

• Prev by Date: Re: Efficiency of repeatedly appending to a List
• Next by Date: Re: Points sampled by FindMinimum