Well, the derivative of the fractional part is indeed 1 where it is
defined, as
lim((fra(x+eps)-fra(x))/eps)=lim(eps/eps)=1 unless adding eps crosses a
boundary,
which it won't do for eps small enough.
Maxima (5.29) returns (4 pi log 2 + i log(-1) +pi)/(4 pi).
Depending on the value of log(-1), this is either log(2) or log(2)+1/2,
which I must confess I don't understand.
I conjecture Sage is getting log(2) from taking the "conventional"
log(-1)=i pi in Maxima's result.
On Saturday, 24 August 2013 12:59:41 UTC+1, Georgi Guninski wrote:
>
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.