ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 13 Mar 2017 21:38:08 +0100How to calculate $L'(1,\chi)/L(1,\chi)$?https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/Question as in title, where $L(s,\chi)$ is the Dirichlet $L$-function associated with the nontrivial character modulo $3$. Please provide complete SAGE code. Thank you in advance.Tue, 08 May 2012 17:14:26 +0200https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/Comment by bgins for <p>Question as in title, where $L(s,\chi)$ is the Dirichlet $L$-function associated with the nontrivial character modulo $3$. Please provide complete SAGE code. Thank you in advance.</p>
https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19806#post-id-19806Have you had a look at the [L-function tutorial](http://wiki.sagemath.org/days33/lfunction/tutorial) from Sage days 33? In particular, it has some fairly recent comments on the development status. I have no idea whether Sage yet implements, for example, the insights in Ihara, Murty & Shimura's paper from circa 2007, [On the Logarithmic Derivative of Dirichlet L-Functions at s=1](http://www.kurims.kyoto-u.ac.jp/~kenkyubu/emeritus/ihara/Publications-and-Recent-Preprints/RecentArticles/pdf-files/IMS.main.pdf).Tue, 08 May 2012 17:55:22 +0200https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19806#post-id-19806Comment by niles for <p>Question as in title, where $L(s,\chi)$ is the Dirichlet $L$-function associated with the nontrivial character modulo $3$. Please provide complete SAGE code. Thank you in advance.</p>
https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19807#post-id-19807Maybe you could start by showing us how much you have already?Tue, 08 May 2012 17:47:22 +0200https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19807#post-id-19807Comment by Anonymous for <p>Question as in title, where $L(s,\chi)$ is the Dirichlet $L$-function associated with the nontrivial character modulo $3$. Please provide complete SAGE code. Thank you in advance.</p>
https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19805#post-id-19805Actually I managed to calculate the particular example "by hand", using that $L(1,\chi)=\sum\chi(n)/n$ and $L'(1,\chi)=-\sum\chi(n)\log(n)/n$. Of course it would be nicer to use some built-in function for that purpose. Note that I am a beginner at SAGE. Also, I looked at http://wiki.sagemath.org/days33/lfunction/tutorial, but the command "LSeries" did not work at http://www.sagenb.org/ (upon calling "L=LSeries(DirichletGroup(3).0)" I get the error message "name 'LSeries' is not defined").Tue, 08 May 2012 18:28:29 +0200https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?comment=19805#post-id-19805Answer by dan_fulea for <p>Question as in title, where $L(s,\chi)$ is the Dirichlet $L$-function associated with the nontrivial character modulo $3$. Please provide complete SAGE code. Thank you in advance.</p>
https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?answer=36931#post-id-36931We can try to compute using bare hands. The following is thus not useful if the question wants more than this particular case. I cannot see how sage *supports* better this now.
First of all, we can compute $\displaystyle L(\chi,1)=\sum_{n\ge 0}\left( \frac 1{3n+1} - \frac 1 {3n+2}\right)=\sum_{n\ge 0}\frac 1{(3n+1)(3n+2)}$ exactly, for instance:
sage: sum( 1/(3*n+1)/(3*n+2), n, 0, oo )
1/9*pi*sqrt(3)
and the result is connected to "polylogarithmic computations".
Comment: We may start with $1+x^3 +x^6+\dots =1/(1-x^3)$ and integrate twice, first with $x$ from $0$ to $y$, then with $y$ from $0$ to $1$. Fubini shows we can forget about polylogarithms, since
$$
L(\chi, 1) = \int_0^1 dy\int_0^ydx\; \frac 1{1-x^3}
= \int_0^1dx\int_x^1dy\; \frac 1{1-x^3} =\int_0^1\frac {dx}{1+x+x^2}=\frac 1{\sqrt 3}\pi\ .$$
The derivative is more complex. Pari/GP gave
? sum( n=0,10000000, -log(3*n+1)/(3*n+1)+log(3*n+2)/(3*n+2) )
%6 = 0.2226631782653383756620209560
but `suminf( n=0,-log(3*n+1)/(3*n+1)+log(3*n+2)/(3*n+2) )` was testing my patience.
At any rate, the rest can be estimated by rewriting the sum as a sum over
$$
\frac 1{(3n+1)(3n+2)}
\left[\
\ln \left(1+\frac 1{3n+1}\right)^{3n+2}
-\ln(3n+2)
\ \right]
$$
or over
$$
\frac 1{(3n+1)(3n+2)}
\left[\
\ln \left(1+\frac 1{3n+1}\right)^{3n+1}
-\ln(3n+1)
\ \right]\ .
$$Mon, 13 Mar 2017 21:38:08 +0100https://ask.sagemath.org/question/8961/how-to-calculate-l1chil1chi/?answer=36931#post-id-36931