# Computing $L$-values

Once an $L$-series $L(s)$ has been constructed using either a standard $L$-function (Section [Built-in $L$-series](builtin.md#builtin)), a user defined $L$-function (Section [Constructing a General $L$-Series](general.md#gensig)) or constructed from other $L$-functions (Section [Arithmetic with $L$-series](arithmetic.md#lseries-arithmetic)), Magma can compute values $L(s_0)$ for complex $s_0$, values for the derivatives $L^{(k)}(s_0)$ and Taylor expansions.

## `Evaluate(L, s0): LSer, FldComElt -> FldComElt`

```magma
Derivative: RngIntElt                    Default: 0
Leading   : BoolElt                      Default: false
```

Given the $L$-series $L$ and a complex number $s_0$, the intrinsic computes either $L(s_0)$, or if $D>0$, the value of the derivative $L^{(D)}(s_0)$. If $D>0$ and it is known that all the lower derivatives vanish,

$$
L(s_0)=L'(s_0)=...=L^{(D-1)}(s_0)=0\,,
$$

the computation time can be substantially reduced by setting `Leading:=true`. This is useful if it is desired to determine experimentally the order of vanishing of $L(s)$ at $s_0$ by successively computing the first few derivatives.

## `CentralValue(L): LSer -> FldComElt`

Given an $L$-function of motivic weight $2k-1$, the value of $L$ is computed at $s=k$.

## `LStar(L, s0): LSer, FldComElt -> FldComElt`

```magma
Derivative: RngIntElt                    Default: 0
```

Given the $L$-series $L$ and a complex number $s_0$, the intrinsic computes either the value $L^*(s_0)$ or, if $D>0$, the value of the derivative $L^{*(D)}(s_0)$. Here $L^*(s)=\gamma(s)L(s)$ is the modified $L$-function that satisfies the functional equation (cf. Section [Terminology](general.md#terminology))

$$
L^*(s) = {\rm sign} \cdot \bar L^*({\rm weight}-s)
$$

(cf. Section [Terminology](general.md#terminology)).

## `LTaylor(L, s0, n): LSer, FldComElt, RngIntElt -> FldComElt`

```magma
ZeroBelow: RngIntElt                    Default: 0
```

Compute the first $n+1$ terms of the Taylor expansion of the $L$-function about the point $s=s_0$, where $s_0$ is a complex number:

$$
L(s_0)+L'(s_0)x+L''(s_0)x^2/2!+\ldots+L^{(n)}(s_0)x^n/n!+O(x^{n+1}) \,\,.
$$

If the first few terms $L(s_0),...,L^{(k)}(s_0)$ of this expansion are known to be zero, the computation time can be reduced by setting `ZeroBelow:=k+1`.

## `Example: Lseries Evaluate (ex-7d80f5)`

We define an elliptic curve $E$ of conductor 5077 and compute derivatives at $s=1$ until a non-zero value is reached:

```magma
> E := EllipticCurve([0, 0, 1, -7, 6]);
> L := LSeries(E : Precision:=15);
> Evaluate(L, 1);
0.000000000000000
> Evaluate(L, 1 : Derivative:=1, Leading:=true);
1.87710082755801E-24
> Evaluate(L, 1 : Derivative:=2, Leading:=true);
-6.94957228421048E-24
> Evaluate(L, 1 : Derivative:=3, Leading:=true);
10.3910994007158

```

This suggests that $L(E,s)$ has a zero of order 3 at $s=1$. In fact, $E$ is the elliptic curve (over **Q**) of smallest conductor with Mordell–Weil rank 3:

```magma
> Rank(E);
3

```

Consequently, a zero of order 3 is predicted by the Birch–Swinnerton-Dyer conjecture. We can also compute a few terms of the Taylor expansion about $s=1$, with or without specifying that the first three terms vanish.

```magma
> time LTaylor(L, 1, 5 : ZeroBelow:=3);
1.73184990011930*$.1^3 - 3.20590558844390*$.1^4 + 2.80009237167013*$.1^5 +
   O($.1^6)
Time: 0.800
> time LTaylor(L, 1, 5);
1.87710082755801E-24*$.1 - 3.47478614210524E-24*$.1^2 + 1.73184990011930*$.1^3
   - 3.20590558844390*$.1^4 + 2.80009237167013*$.1^5 + O($.1^6)
Time: 1.530

```

And this is the leading derivative, with the same value as `Evaluate(L,1:D:=3)`.

```magma
> c := Coefficient($1,3)*Factorial(3);c;
10.3910994007158

```

Finally, we compute the 3rd derivative of the modified $L$-function $L^*(s)=\gamma(s)L(s)$ at $s=1$. For an elliptic curve over the rationals, $\gamma(s)=(N/\pi^2)^{s/2}\Gamma(s/2)\Gamma((s+1)/2)$, where $N$ is the conductor. So, by the chain rule, ${L^*}'''(1)=\gamma(1)L'''(1)=\sqrt{N/\pi}L'''(1)$.

```magma
> LStar(L, 1 : Derivative:=3);
417.724689268266
> c*Sqrt(Conductor(E)/Pi(RealField(15)));
417.724689268267

```

## `DedekindZetaExact(K, z): Fld, RngIntElt -> FldRatElt`

```magma
Relative: BoolElt                    Default: false
```

The special value of the Dedekind zeta function of $K$ at the negative integer $z$. Returns $\zeta_K(z)$ or ${\zeta_K(z) \over \zeta_F(z)} = L(\chi_{K/F}, z)$ if $K$ is a quadratic extension of $F$ and `Relative` is `true`. In the latter case, can also compute the value at $z = 0$.
