integrate 'quotient by zero' error message



On 10/29/11 4:07 PM, Panagiotis Papasotiriou wrote:
> 2011/10/30 Edwin Woollett <woollett at charter.net
> <mailto:woollett at charter.net>>
>
>     I'm guessing  the integrate code finds divide by
>      zero here?
>
>     The "quotient by zero" error message seems
>     unclear English.
>     ----------------------
>
>
> Integrand's denominator is obviously nonzero for any x within the
> integration interval. If I were to guess, I'd say that Maxima tries to
> compute the indefinite integral first, doing a transformation maybe.
> Somewhere there the error message is generated, no idea why.
To know what it's doing, you'll have to dig through the code, putting
breakpoints or prints in appropriate places.  To find out where the
message is generated, I usually do what it says.  When the error is
generated, you're left in the maxima debugger.  I press C-c to interrupt
and look at the stack trace (> 20 levels) to see where the message was
generated.

It is a giant pain to debug problems in integration.  The 'quotient by
zero' bug is a well-known issue that is usually caused by the gcd
algorithm.  Sometimes changing the gcd algorithm fixes things, but
sometimes not.  It's probably a bug in the algorithm but no one has been
able to figure it out, mostly because no one has found a simple enough
problem to illustrate the error.

> Indefinite integral cannot be computed analytically, but that doesn't
> explain why Maxima gives that error message. However, it seems the
> error message is generated before any try to compute the integral
> numerically, as I guessed.
integrate never computes the integral numerically.  It's all symbolic,
but the symbolic answer might be a number.  Perhaps you had a different
meaning for "numerically"?

Ray