Trigonometric definite integral resulting in sinc-likefunction



Maxima makes many simplifications which assume non-singular cases, for
example x/x=>1.  This is actually a perfectly reasonable thing to do, for
two reasons:

1) In many (most?) applications, a function with a removable singularity
might as well be treated as the function with the singularity removed.

2) Preserving the singularity via e.g. (if x=0 then UND else 1) creates
complexity which (a) makes it much harder to see what the values of the
function are almost everywhere and (b) complicates all subsequent
manipulations.

Rather than say that the result of integrate(cos(a*x),x) should be (if a=0
then x else sin(a*x)/a), I would prefer to say that the Maxima
expression sin(a*x)/a denotes the function defined by that expression when
a<>0 and its analytical continuation when a=0.

The problem with that of course is that 'subst' doesn't work that way.
 There are two solutions to that: 1) to keep subst as it is, and say that it
has a strictly syntactic interpretation of expressions (which is true); 2)
to make subst essentially a synonym for limit.

Yet another solution is to carry along global 'caveats' (this is RJF's
proposal).  That is, x/x would continue to simplify to 1, but the expression
as a whole would have attached to it the caveat that x<>0, leaving the value
for x=0 undefined.

              -s


On Sat, Jul 17, 2010 at 14:14, Robert Dodier <robert.dodier at gmail.com>wrote:

> On 7/17/10, Barton Willis <willisb at unk.edu> wrote:
>
> > I agree with Watson of Sherlock Holmes fame that "Singularity is
> > almost invariably a clue."  Accordingly, I would say that
> >
> >  (%i1) integrate(cos(a*x),x);
> >  (%o1) sin(a*x)/a
> >
> > is suboptimal. The function diffdiv (defined in sin.lisp) is, I think,
> > largely responsible for integration by substitution--it would be great
> > to patch diffdiv to make it be more careful. And that project might
> > not be all that difficult. If diffdiv returned conditional expressions,
> > the more challenging task would be to patch the rest of Maxima to
> > handle the conditional expressions more gracefully.
>
> I'm 100% in favor of such a project.
>
> > Of course, an alternative to returning a conditional is have diffdiv call
> asksign.
>
> Well, I'm no big fan of asksign, but calling asksign would at least
> be consistent with the behavior of other parts of Maxima
> (pending the widespread use of conditional expressions as
> described above).
>
> best
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>