real and imaginary parts of asech(x)



Edwin,

Thanks for the bug report.  Could you please file it at sourceforge,
following the directions given by bug_report(); ?

As far as I can tell, there is no special interaction between realpart and
quad_qags, so I would recommend not mentioning it at all in the bug report.

By the way, here's another bad case:

    rectform(log(sqrt(x)+1)) => log(sqrt(x)+1)

Obviously this is incorrect for e.g. x=-1.  I will report in sourceforge.

            -s



On Fri, Nov 25, 2011 at 16:37, Edwin Woollett <woollett at charter.net> wrote:

> Maxima has issues with the
> real and imaginary parts of asech(x).
>
> (%i1) realpart(asech(x));
>
> (%o1) asech(x)
>
> (%i2) imagpart(asech(x));
>
> (%o2) 0
>
> In fact, asech(x) has both real and
> imaginary parts for real x.
>
>
> Despite these incorrect evaluations, Maxima
> gives correct numerical values for the imaginary part
> of asech(x) when x is a number:
>
> (%i3) imagpart(asech(1.5));
>
> (%o3) 0.84106867056793
>
> (%i4) imagpart(asech(-1.5));
>
> (%o4) 2.300523983021863
>
> However the incorrect evaluation
>  imagpart(asech(x)) --> 0
>
> prevents quad_qags from finding the
> correct value of a simple numerical integral:
>
> (%i5) quad_qags(imagpart(asech(x)),**x,1.1,2);
>
> (%o5) [0.0,0.0,21,0]
>
> (The correct answer is about 0.748336.)
>
> Likewise, Maxima gives correct
> numbers for the real part if x
> is a number, but quad_qags returns
> a noun form for what should be a
> simple integral:
>
> (%i6) realpart(asech(1.1));
>
> (%o6) 2.2204460492503128E-16
>
> (%i7) realpart(asech(1.2));
>
> (%o7) 0
>
> (%i8) realpart(asech(0.999));
>
> (%o8) 0.044740005477517
>
> (%i9) quad_qags(realpart(asech(x)),**x,0.999,1.2);
>
> (%o9) quad_qags(asech(x),x,0.999,1.**2,epsrel = 1.0E-8,epsabs = 0.0,limit
> = 200)
>
> -----------------------------
> On Nov. 22, I demonstrated similar problems with acosh(x).
>
> Ted Woollett
> (v. 5.25.1gcl, Windows)
>
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>