"How many users will be satisfied with:
(%i1) integrate(sqrt((x^2-2*x+1)/x),x,0,1);
(%o1) -4/3
(%i2) integrate(sqrt(x-2+1/x),x,0,1);
(%o2) 4/3
There are an infinite number of problems with integrate like Barton's one
above. Try
integrate(sqrt(x^2-2*a*x+a^2)*sqrt(x^2-2*b*x+b^2),x);
(2*x^3+(-3*b-3*a)*x^2+6*a*b*x)/6
This is wrong. As I suspect you already know, Barton. It has to do with
piecewise functions. You can fix integrate like this.
Always call scanmap('factor,%); for certain radical expressions.
scanmap('factor, sqrt(x^2-2*a*x+a^2)*sqrt(x^2-2*b*x+b^2));
then integrate with abs_integrate or pw.mac. The right final answer is
somewhat complicated.
Rich