Don't claim this is a bug, but don't understand this.

Define {x} the fractional part of x by (source mathworld):

def fra1(x):  
        """
        fractional part
        """
        return 1/2+I/(2*pi)*log(-exp(-2*pi*I*x))


sage: var('x')
x
sage: ii=integrate(fra1(1/x),x,1/2,1);ii
log(2)

According to Maple and mathworld this integral equals
-1/2 + ln(2)

Part of the problem is log() is multivalued, but I suppose
for all branches of log(), fra1() should be correct $\mod 1$,
yet the result is not correct $\mod 1$.

Probably this is related:
sage: diff(fra1(x),x)
1

Why so?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to