Ray,
Sorry that wasn't clear. The Maple 10 result is a split-rule function:
For z < -Pi / 2, the value is
(arctan(tan(z)*2^(1/2))+ceil(1/2*(-Pi+2*z)/Pi)*Pi) / sqrt(2), for
z = -Pi / 2, the value is -Pi sqrt(2) / 4, and ....
But outside the interval [-%pi/2, %pi/2] the Maple result is wrong.
Maybe this is controlled by a switch. I don't know much about Maple.
I think a better (than Maple 10 or Macsyma) antiderivative is
atan2(sqrt(2) * sin(x), cos(x)) / sqrt(2) + sqrt(2) * %pi *
floor((x-%pi)/(2*%pi));
It's graph looks continuous and
(%i14) atan2(sqrt(2) * sin(x), cos(x)) / sqrt(2) + sqrt(2) * %pi *
floor((x-%pi)/(2*%pi))$
(%i15) trigsimp(diff(%,x));
(%o15)
((sqrt(2)*%pi*sin(x)^2+sqrt(2)*%pi)*('diff(floor((x-%pi)/(2*%pi)),x,1))+1)/(sin(x)^2+1)
With 'diff(floor(...)) --> 0, this also looks OK. The atan2 function is
pretty
handy for antiderivatives.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To: Barton Willis
>From: Raymond Toy
>Sent by: maxima-bounces at math.utexas.edu
>Date: 06/27/2007 02:29PM
>cc: Maxima List
>Subject: Re: [Maxima] integrate(1/(sin(x)^2+1),x,a,b)?
>
>>>>>> "Barton" == Barton Willis writes:
>
> Barton> Here is what I get using Maple 10
>[snip]
> >> integrate(1/(sin(x)^2+1),x);
> >>
>
> Barton> 1/2 1/2
> Barton> 1/2 2 arctan(tan(x) 2 )
>
> >> _EnvAllSolutions := true:
> >> integrate(1/(sin(x)^2+1),x=0..z);
> >>
>
> Barton> {
> Barton> { 1/2 / 1/2 -Pi + 2 z \
> Pi
> Barton> { 1/2 2 |arctan(tan(z) 2 ) + ceil(---------) Pi| , z <
>- ----
> Barton> { \ 2 Pi /
> 2
>
> Barton> 1/2
> Barton> Pi 2 Pi
> Barton> - ------- , z = - ----
> Barton> 4 2
>
> Barton> 1/2 1/2 Pi
> Barton> 1/2 arctan(tan(z) 2 ) 2 , z < ----
> Barton> 2
>
> Barton> 1/2
> Barton> Pi 2 Pi
> Barton> ------- , z = ----
> Barton> 4 2
>
> Barton> 1/2 / 1/2 -Pi + 2 z
> \
> Barton> 1/2 2 |arctan(tan(z) 2 ) + Pi floor(---------) +
>Pi| ,
> Barton> \ 2 Pi
> /
>
> Barton> Pi
> Barton> ---- < z
> Barton> 2
>
>
>I'm sorry, I can't understand what this is trying to tell me. I see
>there are 3 possible answers? But what are those z things?
>
>Ray
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima