Suppose I wish to expand sqrt(abs(r^2-1)) for large r. In the large r limit we can take r^2 -1 to be positive and abs(r^2 - 1) evaluates to r^2 - 1. I then pull out a factor of r from the sqrt() and do a Taylor expansion in negative powers of r. The series I get should be r - (1/2)*r^(-1) - (1/8) *r^(-3) + ...
To do this in maxima, I should call the function taylor(sqrt(abs(r^2-1)),[r,0,3,'asymp]).
However, this returns %i*r-%i/(2*r)-%i/(8*r^3)+...
I believe this is because the abs() function is evaluated at r=0 (as indeed it should be if we were taking a Taylor series in positive powers of r about 0), since expanding instead around r=2 produces the same answer regardless of whether of not abs() is present.
Harry Braviner
2010-06-27
Steps to reproduce the bug described above