MathGroup Archive 2008

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

Search the Archive

Re: A Problem with Simplify

  • To: mathgroup at
  • Subject: [mg87737] Re: A Problem with Simplify
  • From: Bill Rowe <readnews at>
  • Date: Wed, 16 Apr 2008 05:05:39 -0400 (EDT)

On 4/15/08 at 6:51 AM, popkov at (Alexey Popkov) wrote:

>And code:

>int1 = Integrate[Cos[a*x]/Sin[x], x]; int1 /. a -> 1

>MUST give us answer equal to

>int2 = Integrate[Cos[x]/Sin[x], x]

Mathematica simply doesn't work this way.

If you do Integrate[Cos[a x]/Sin[x],x] you will see a fairly
complex expression. I assume this expression is valid and can be
simplified to Log[Sin[x]] when a is 1 with the right
transformations. But it is far from obvious to me what
transformations are required. And Mathematica does not attempt
to simplify this expression.

Once you get this result, the replacement rule simply
substitutes 1 for a every where and evaluates. This simple
process results in division by 0.

There are two ways to avoid this problem. One would be to find
the set of transformations that reduce the expression to Log[Sin[x]].

The other is to re-write the problem as:

Integrate[Cos[a x]/Sin[x]/.a->1, x]

Despite the fact, Mathematica does not get the result you
desire, this is not a bug. Mathematica is working as intended.
So, you have a choice. Either accept this and figure out how to
use Mathematica as it is or find some other tool that works more
like you want.

  • Prev by Date: Re: smart change of variables?
  • Next by Date: Re: bar charts, frame ticks, and error bars
  • Previous by thread: Re: A Problem with Simplify
  • Next by thread: Re: A Problem with Simplify