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.Sat, 17 Feb 2024 11:59:17 +0100Special value of Dedekind Zeta Functionshttps://ask.sagemath.org/question/76035/special-value-of-dedekind-zeta-functions/Is there a way to compute the values of the following special kind of Dedekind Zeta Function: <p>
Assume $a,b \in \mathbb N$ and $K = \mathbb Q(\sqrt{5}) \subset L= \mathbb Q(\sqrt{a+b\sqrt{5}})$. Set $d = \sqrt{a+b\sqrt{5}}$ which is also totally negative and furthermore a discriminant of L. <p>
Now my problem is, can I calculate the (exact or numerical) values of the Dedekind Zeta function $\zeta_L(s)$ for s positive odd integer? <p>
Thanks for any help!imbluedabedeeSat, 17 Feb 2024 11:59:17 +0100https://ask.sagemath.org/question/76035/Dedekind Zeta function of cyclotomic field wrongly evaluating to zero on -1?https://ask.sagemath.org/question/55607/dedekind-zeta-function-of-cyclotomic-field-wrongly-evaluating-to-zero-on-1/Let $K := \mathbb{Q}(\zeta)$ be the pth cyclotomic extension of $\mathbb{Q}$. I would like to verify the results of a paper which states the quotient of their Dedekind zeta functions have particular values. Below Z is the Riemann zeta function (Dedekind zeta function of $\mathbb{Q}$).
x = var('x')
K = NumberField(x**2 + x + 1,'a')
L = K.zeta_function(algorithm='gp')
Z = Dokchitser(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], init='1')
The expected values are nonzero! For example. `(L/Z)(-1)` is expected to be `1.333333333` (i.e. 4/3).
`L(-1)` returns `0.000000000000000`, as does `L(-1)/Z(-1)`.
`Z(-1)` returns `-0.0833333333333333`. `L/Z` returns a type error, as does `L(x)/Z(x)`.
Here is my first question: Have I incorrectly implemented the Dedekind Zeta function of a cyclotomic number field? Why is `L(-1) = 0`?
Here is my second question: How do I implement the evaluation of the L-series after I've taken their quotient? That is, `A = L/Z, A(-1);` instead of `L(-1)/Z(-1)`. tzeentchSat, 06 Feb 2021 23:44:49 +0100https://ask.sagemath.org/question/55607/Issue on numerical_integral with a Pari/GP functionhttps://ask.sagemath.org/question/56235/issue-on-numerical_integral-with-a-parigp-function/Hello there,
I tried to evaluate the integral of a Pari/GP function but failed so far. Here is an example code on (SageMath version 8.9, Release Date: 2019-09-29 and windows 10):
sage: lchi4 = DirichletGroup(4).list()[1].lfunction(); lchi4
PARI L-function associated to Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1
sage: numerical_integral(lambda t: lchi4(t).real(), 2,3)
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
/opt/sagemath-8.9/local/lib/python2.7/site-packages/sage/all_cmdline.pyc in <module>()
----> 1 numerical_integral(lambda t: lchi4(t).real(), Integer(2),Integer(3))
/opt/sagemath-8.9/local/lib/python2.7/site-packages/sage/calculus/integration.pyx in
sage.calculus.integration.numerical_integral (build/cythonized/sage/calculus/integration.c:4061)()
353 _b = b
354 W = <gsl_integration_workspace*> gsl_integration_workspace_alloc(n)
--> 355 sig_on()
356 gsl_integration_qag(&F,_a,_b,eps_abs,eps_rel,n,rule,W,&result,&abs_err)
357 sig_off()
SystemError: calling remove_from_pari_stack() inside sig_on()
However, for the Riemann zeta function, numerical_integral works fine as below:
sage: numerical_integral(lambda t: zeta(t), 2,3)
(1.3675256886839795, 1.518258506343328e-14)
It looks like it would work for lchi4 if it can be coerced into a symbolic expression like zeta(x) as shown below:
sage: type(lchi4(3))
<type 'sage.rings.complex_number.ComplexNumber'>
sage: type(zeta(3))
<type 'sage.symbolic.expression.Expression'>
Can you please let me know how to evaluate the integral numerically for a Pari/GP function as lchi4?
Thank you in advance.jbThu, 18 Mar 2021 22:37:39 +0100https://ask.sagemath.org/question/56235/How to find partial sums of dedekind zeta function of any number field?https://ask.sagemath.org/question/50135/how-to-find-partial-sums-of-dedekind-zeta-function-of-any-number-field/ I searched for my question through internet but could not find a clear way to do it. So, how can I find partial sums of the value of the Dedekind zeta function of any number field?captainMon, 02 Mar 2020 12:58:56 +0100https://ask.sagemath.org/question/50135/Finding zeros of zeta function.https://ask.sagemath.org/question/38007/finding-zeros-of-zeta-function/I am trying to make the following code work.
t = var('t')
f = zeta(1/2+i*t).abs()
ff = fast_callable(f, vars=[t], domain=CDF)
print find_root(ff, 0, 40)
There are actually 6 roots between 0 and 40. But find_root could not find any of them.
Is there any walkaround?ablmfMon, 19 Jun 2017 08:57:54 +0200https://ask.sagemath.org/question/38007/Plotting point when coordinate involves symbolic and numerical valueshttps://ask.sagemath.org/question/34937/plotting-point-when-coordinate-involves-symbolic-and-numerical-values/Consider the following single piece of code:
point([real_part(zeta(I))+1,0])
When trying to compile it, I get the following error message:
Error in lines 1-1
Traceback (most recent call last):
File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 957, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/sage/plot/point.py", line 353, in point
return point3d(points, **kwds)
File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/sage/plot/plot3d/shapes2.py", line 1143, in point3d
A = sum([Point(z, size, **kwds) for z in v])
File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/sage/plot/plot3d/shapes2.py", line 720, in __init__
self.loc = (float(center[0]), float(center[1]), float(center[2]))
TypeError: 'sage.symbolic.expression.Expression' object does not support indexing
Is there some simple way to fix this?
Interesting note: I have played around with this error, and it is very unclear to me when it does or doesn't appear. Here are some examples of when the error *does* appear (as far as I've checked, the traceback is always the same):
point([real_part(zeta(I))+1,0])
point([real_part(zeta(I))*2,0])
point([real_part(zeta(I))+real_part(zeta(I)),0])
point([real_part(zeta(I))/2,0])
point([real_part(zeta(I))-real_part(zeta(2*I)),0])
Here are some examples where it *doesn't* appear:
point([real_part(zeta(I))+0,0])
point([real_part(zeta(I))*1,0])
point([real_part(zeta(I))*real_part(zeta(I)),0])
point([real_part(zeta(I))+real_part(zeta(2*I)),0])
point([real_part(zeta(I))+imag_part(zeta(I)),0])
(edit: the error doesn't seem to ever occur if we give the zeta function a real argument)
I'd be interested if someone figured out under what conditions the error appears or not, because I fail to see any pattern. Thank you in advance.WojowuSun, 25 Sep 2016 20:21:03 +0200https://ask.sagemath.org/question/34937/Errors when plotting zeta function parametricallyhttps://ask.sagemath.org/question/34882/errors-when-plotting-zeta-function-parametrically/ I have the following piece of code:
def f(x):
return(real_part(zeta(1+x*I)).n())
def g(x):
return(imag_part(zeta(1+x*I)).n())
parametric_plot([f(x),g(x)], (x,2,10))
It should be moderately clear what I'm trying to do - I want to produce a plot of Riemann zeta function on the line Re(z)=1 using parametric plotting. However, when I try to plot this, I get an error `TypeError: cannot evaluate symbolic expression numerically`. I also tried the same thing without the `.n()`, but then I get an error `TypeError: unable to coerce to a real number`. I couldn't find any help online.
It's worth noting that trying to plot function f(x) I get the same error with `.n()`, but it works just fine without it (as opposed to parametric plot). Does anyone have an idea how to fix the issue?
Thanks in advance.WojowuWed, 21 Sep 2016 16:46:11 +0200https://ask.sagemath.org/question/34882/Solving zeta function equation numericallyhttps://ask.sagemath.org/question/33605/solving-zeta-function-equation-numerically/ I'm trying to solve the equation
$$ \zeta'(x)/\zeta(x) = - 3/4 $$
numerically. I'm expecting/hoping for an answer between 1 and 10.
I tried
$\texttt{ find_root(diff(zeta(x))/zeta(x) + 0.75, 2, 40)}$,
but this returns 0.0. I don't know what that ratio of zeta functions looks like, so it's possible there isn't a root, but I don't see why I'm getting an answer outside the specified interval.
Can anyone help find the true root? Thanks.
ec92Wed, 01 Jun 2016 01:07:50 +0200https://ask.sagemath.org/question/33605/Zeta function gone wild?https://ask.sagemath.org/question/8418/zeta-function-gone-wild/Playing with number fields we reached some weird numerical results. Investigating the problem boiled down to weird output of zeta functions at odd positive integers from 7 onward.
For example,
sage: K.<a> = NumberField(x^2-2)
sage: K.zeta_function()(7)
82.7603619399160
sage: K.zeta_function(prec=100)(7)
45333.379954778857657650185188
sage: K.zeta_function(prec=200)(7)
5.6555192254423051174292272646037247772094677139829119697339e8
These answers seem to be all erroneous. Close values behave fine:
sage: K.zeta_function()(7.0000001)
1.00787667933529
sage: K.zeta_function()(7.00000001)
1.00787667982152
sage: K.zeta_function()(7.000000001)
1.00787669344227
sage: K.zeta_function()(7.0000000001)
1.00787388932573
(the problem begins afterwards).
Another way to obtain this value is
sage: quadratic_L_function__exact(7,2)*zeta(7)
TypeError: n must be a critical value!
which doesn't work. It turns out that this does work:
sage: quadratic_L_function__numerical(7,2)*zeta(7).n()
1.00787667988590
but this does not help us for general number fields (only quadratic).
The same happens with Riemann zeta function, which is the Dedekind zeta function of $\mathbb{Q}$:
sage: K.<a> = NumberField(x)
sage: K.zeta_function()(7)
verbose -1 (371: dokchitser.py, __call__) Warning: Loss of 2 decimal digits due to cancellation
52.5237126027390 # Wrong!
sage: zeta(7).n() # Checking Riemann directly
1.00834927738192 # okie dokie
sage: K.zeta_function()(7.00001)
verbose -1 (371: dokchitser.py, __call__) Warning: Loss of 2 decimal digits due to cancellation
1.00834921704698 # correct
so we get a warning here, and the value at 7 is wrong, but at 7.00001 things are fine.
We are guessing that this relates to zeros/poles of Gamma in the functional equation for zeta. However, since `zeta(7)` and `quadratic_L_function__numerical` do work fine, perhaps there is a way to calculate other zeta functions there as well?
parzanThu, 27 Oct 2011 12:01:44 +0200https://ask.sagemath.org/question/8418/Here is a calculation of Wolfram Alpha. How can i caculate it with Sage?https://ask.sagemath.org/question/10843/here-is-a-calculation-of-wolfram-alpha-how-can-i-caculate-it-with-sage/Here is a calculation of Wolfram Alpha. How can i caculate it with Sage?
http://www.wolframalpha.com/input/?i=laplacian+%7Czeta%28x%2Biy%29%7C
KeyvanThu, 19 Dec 2013 01:36:56 +0100https://ask.sagemath.org/question/10843/Hadamard product for the Riemann zeta functionhttps://ask.sagemath.org/question/10390/hadamard-product-for-the-riemann-zeta-function/What is the best way to compute numerically with Sage the product
over the first n nontrivial zeros of the Riemann zeta function?
<pre><code>p(s,n) = product((1-s/rho(k))*exp(s/rho(k)) for k in (1..n))</code></pre>
where zeta(rho(k)) == 0 and Im(rho(k)) != 0.
Wikipedia advises: "To ensure convergence the product should be
taken over 'matching pairs' of zeroes, i.e. the factors for a
pair of zeroes of the form rho(k) and 1-rho(k) should be combined."
[Hadamard product on MathWorld](http://mathworld.wolfram.com/HadamardProduct.html)
petropolisFri, 26 Jul 2013 13:42:03 +0200https://ask.sagemath.org/question/10390/Unable to evaluate integral of x*x/(exp(x)+1)https://ask.sagemath.org/question/9726/unable-to-evaluate-integral-of-xxexpx1/I was trying to evaluate the following integral using sage
integrate(x*x/(exp(x)+1),x,0,oo)
and I get the following answer
3/2*zeta(3) + limit(1/3*x^3 - x^2*log(e^x + 1) - 2*x*polylog(2, -e^x) +
2*polylog(3, -e^x), x, +Infinity, minus)
However, mathematica gives just the first term `3/2*zeta(3)`. Is there a way to get just the zeta function for integrals of the form `x^n/(exp(x)+1)`? The limit makes it difficult to calculate the numerical values in the end
ShashankMon, 21 Jan 2013 15:32:45 +0100https://ask.sagemath.org/question/9726/