Welcome to our community

Be a part of something great, join today!

Derivatives and Integrals of the Hurwitz Zeta function


Well-known member
Sep 16, 2013
Initially, the purpose of this tutorial will be to explore and evaluate various lower order derivatives of the Hurwitz Zeta function. In each case, the Hurwitz Zeta function will be differentiated with respect to its first parameter. A little later on - although this will take some time! - these derivatives will be integrated with respect to the second parameter. In yet further, later cases, the integrand will contain an additional function, such as a power of the variable. For example, on the understanding that

\(\displaystyle \zeta' (s,x) = \frac{d}{ds} \zeta(s,x)\)

\(\displaystyle \zeta'' (s,x) = \frac{d^2}{ds^2} \zeta(s,x)\)


We will evaluate definite, parametric integrals of the form

\(\displaystyle \int_0^z x^n\, \zeta' (s,x)\, dx\)

\(\displaystyle \int_0^z x^n\, \zeta'' (s,x)\, dx\)

and so on.

Definitions and notation:

The Hurwitz Zeta function:

\(\displaystyle \zeta(s,x) = \sum_{k=0}^{\infty} \frac{1}{(k+x)^s}\)

CAUTION: some authors transpose the order of the two parameters in the Hurwitz Zeta function. And, even worse, some do so without explicitly defining it by an unambiguous series like that given above, so it's worth bearing in mind if searching on-line for additional reading material.

For \(\displaystyle \mathscr{Re}(s) < 0\,\) and \(\displaystyle 0 \le x \le 1\, \) the Hurwitz Zeta function has the following Fourier Series representation:

\(\displaystyle \zeta(s,x) = \frac{2\, \Gamma(1-s)}{(2\pi)^{1-s}} \left[ \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} + \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}}\right] \)

The vast majority of what follows will - directly or indirectly - be consequences of this Fourier Series.

The Polygamma functions:

\(\displaystyle \psi_0(x) = \frac{d}{dx}\log \Gamma(x) = -\gamma +\, \sum_{k=1}^{\infty} \left(\frac{1}{k} - \frac{1}{k+x-1} \right)\)

\(\displaystyle \psi_{m\ge 1}(x) = \frac{d^{m+1}}{dx^{m+1}} \log \Gamma (x) = (-1)^{m+1}m!\, \sum_{k=0}^{\infty} \frac{1}{(k+x)^{m+1}}\)

Where \(\displaystyle \gamma\, \)is the Euler-Mascheroni constant. Note that, comparing that
last expression for higher order Polygamma functions with the series definition for the Hurwitz Zeta function, we also have

\(\displaystyle \psi_{m\ge 1}(x) = (-1)^{m+1}m!\, \zeta(m+1,x)\)

The main property of the Polygamma functions used below will be the incrementation formula for the Digamma function

\(\displaystyle \psi_0(1+x) = \psi_0(x) + \frac{1}{x}\)

and the higher order analogues obtained from direct differentiation of this result, eg.

\(\displaystyle \psi_1(1+x) = \psi_1(x) - \frac{1}{x^2}\)

\(\displaystyle \psi_2(1+x) = \psi_2(x) + \frac{2}{x^3}\)

\(\displaystyle \psi_3(1+x) = \psi_3(x) - \frac{6}{x^4}\)


These results are easily extended. Let \(\displaystyle m \in \mathbb{Z} \ge 0\,\) and \(\displaystyle n \in \mathbb{Z} \ge 1\,\) then

\(\displaystyle \psi_{m}(x+n) = \psi_m(x) + (-1)^mm! \, \sum_{j=0}^{n-1} \frac{1}{(x+j)^{m+1}}

These results can be simplified further, by using the Harmonic Numbers. The Harmonic numbers are simply finite, truncated versions of the (regular) Riemann Zeta function:

\(\displaystyle \zeta (s) = \zeta(s,1) = \sum_{k=1}^{\infty}\frac{1}{k^s}\)

Notation for the Harmonic numbers varies somewhat, from one author to the next, so I'll use what seems to be the most prevalent form, namely

\(\displaystyle H_n^{(m)} = \sum_{j=0}^{n-1}\frac{1}{(j+1)^m} =

\(\displaystyle 1+ \frac{1}{2^m} + \frac{1}{3^m} + \frac{1}{4^m} +\, \cdots \, + \frac{1}{n^m}\)

In addition, for reasons that will become clear shortly, the term

\(\displaystyle \log 2\pi + \gamma - H_{n}^{(1)} \)

will appear in our results with (almost) alarming frequency. That being the case, once the appearance of such a term is apparent - in any given calculation - I won't hesitate to save space by using the short-hand notation

\(\displaystyle \mathscr{H}_n = \log 2\pi + \gamma - H_{n}^{(1)}

If we set \(\displaystyle x=1\,\) in that last Polygamma formula, then - in terms of the Harmonic numbers - we get:

\(\displaystyle \psi_{m}(n+1) = \psi_m(1) + (-1)^mm! \, \sum_{j=0}^{n-1} \frac{1}{(j+1)^{m+1}} = \)

\(\displaystyle \psi_m(1) + (-1)^mm! \, H_n^{(m+1)}

The Generalized Clausen Functions:

Apologies, but notation is one of those things that tends to be - or in my case often is - quite fluid until you settle on a preferred form. Consequently, I have used slight variations of the following notations - on here - before. I hope this won't cause any confusion.


\(\displaystyle \mathcal{C}_m(n, \theta) = \lim_{s \to m^{+}} (-1)^n \frac{d^n}{ds^n}\, \sum_{k=1}^{\infty} \frac{\cos k\theta}{k^s}\)

\(\displaystyle \mathcal{S}_m(n, \theta) = \lim_{s \to m^{+}} (-1)^n \frac{d^n}{ds^n}\, \sum_{k=1}^{\infty} \frac{\sin k\theta}{k^s}\)

Explicitly, when \(\displaystyle m \in \mathbb{Z} \ge 1\,\) and \(\displaystyle n \in \mathbb{Z} \ge 0\,\)

\(\displaystyle \mathcal{C}_m(n, \theta) = \sum_{k=1}^{\infty} \frac{(\log k)^n}{k^m} \cos k\theta\)

\(\displaystyle \mathcal{S}_m(n, \theta) = \sum_{k=1}^{\infty} \frac{(\log k)^n}{k^m} \sin k\theta\)

Much like the Modified Harmonic Numbers \(\displaystyle \mathscr{H}_n\, \)above, certain variations of these Generalized Clausen functions will occur with such frequency as to deserve their own short-hand. With the understanding that \(\displaystyle 0 \le z \le 1 \in \mathbb{R}\, \)in the general sense, but the cases we will deal with are 'small' vulgar fractions of the form \(\displaystyle z=p/q \in \mathbb{Q}\,\), then I will use the following short-hands:

\(\displaystyle \mathcal{C}_j(z)= \mathcal{C}_j(1, 2\pi z) = \sum_{k=1}^{\infty} \frac{\log k}{k^j} \cos 2\pi kz\)

\(\displaystyle \mathcal{S}_j(z)= \mathcal{S}_j(1, 2\pi z) = \sum_{k=1}^{\infty} \frac{\log k}{k^j} \sin 2\pi kz\)

NOTE: I will, occasionally, also write

\(\displaystyle \mathcal{C}_{1-s}(z)= \mathcal{C}_{1-s}(1, 2\pi z) = \sum_{k=1}^{\infty} \frac{\log k}{k^{1-s}} \cos 2\pi kz\)

\(\displaystyle \mathcal{S}_{1-s}(z)= \mathcal{S}_{1-s}(1, 2\pi z) = \sum_{k=1}^{\infty} \frac{\log k}{k^{1-s}} \sin 2\pi kz\)

Where \(\displaystyle s\, \) is not necessarily an integer, and the understanding is that \(\displaystyle \mathscr{Re}(s) <0\, \).

Proposition 1.0:

The first derivative of the Hurwitz Zeta function - with respect to its first parameter - is given by:

\(\displaystyle \zeta'(s,x) = \)

\(\displaystyle \frac{\pi\, \Gamma(1-s)}{(2\pi)^{1-s}} \left[ \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} - \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}}\right] + \)

\(\displaystyle \frac{2\, \Gamma(1-s)}{(2\pi)^{1-s}} \left[ \sin \frac{\pi s}{2}\, \mathcal{C}_{1-s}(x) + \cos \frac{\pi s}{2}\, \mathcal{S}_{1-s}(x) \right] + \)

\(\displaystyle \Bigg[\log 2\pi - \psi_0(1-s) \Bigg]\, \zeta(s,x)\)


This follows directly by differentiating the Fourier Series expansion of the Hurwitz Zeta function. Personally, I'd break it down into the product of two functions, and then differentiate their product. The two functions are given in large brackets here:

\(\displaystyle \zeta'(s,x) = \frac{d}{ds}\, \Bigg[ \mathscr{F}(s) \Bigg]\, \Bigg[ \mathscr{G}(s) \Bigg]=\)

\(\displaystyle \frac{d}{ds}\, \left[ \frac{2\, \Gamma(1-s)}{(2\pi)^{1-s}} \right]\, \left[ \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} + \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}}\right]\)

The derivative of the 'first' function is

\(\displaystyle \frac{d}{ds}\, \mathscr{F}(s) = \frac{d}{ds}\, \left[ \frac{2\, \Gamma(1-s)}{(2\pi)^{1-s}} \right] = \mathscr{F}'(s) = \)

\(\displaystyle 2\, \frac{ (2\pi)^{1-s} [-\Gamma'(1-s)] - \Gamma(1-s)\, [-(2\pi)^{1-s}\log 2\pi] }{ [(2\pi)^{1-s}]^2 } = \)

\(\displaystyle \frac{2 \Gamma(1-s)}{(2\pi)^{1-s}}\, \left[ \log 2\pi - \frac{ \Gamma'(1-s) }{ \Gamma(1-s)} \right] = \)

\(\displaystyle \frac{2 \Gamma(1-s)}{(2\pi)^{1-s}}\, \left[ \log 2\pi - \frac{ \Gamma'(x) }{ \Gamma(x)} \Bigg|_{x=1-s} \right] = \)

\(\displaystyle \frac{2 \Gamma(1-s)}{(2\pi)^{1-s}}\, \left[ \log 2\pi - \frac{d}{dx} \log \Gamma(x) \Bigg|_{x=1-s} \right] = \)

\(\displaystyle \frac{2 \Gamma(1-s)}{(2\pi)^{1-s}}\, \left[ \log 2\pi - \psi_0(x) \Bigg|_{x=1-s} \right] = \)

\(\displaystyle \frac{2 \Gamma(1-s)}{(2\pi)^{1-s}}\, \Bigg[ \log 2\pi - \psi_0(1-s) \Bigg] \)

The derivative of the 'second' function is given by:

\(\displaystyle \frac{d}{ds}\, \mathscr{G}(s) = \frac{d}{ds}\, \left[ \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} + \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}}\right] = \mathscr{G}'(s) =\)

\(\displaystyle \frac{\pi}{2} \left[ \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} - \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}} \right] +\)

\(\displaystyle \left[ \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\log k}{k^{1-s}} \cos 2\pi kx + \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\log k}{k^{1-s}} \sin 2\pi kx \right] = \)

\(\displaystyle \frac{\pi}{2} \left[ \cos \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{1-s}} - \sin \frac{\pi s}{2}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{1-s}} \right] +\)

\(\displaystyle \left[ \sin \frac{\pi s}{2}\, \mathcal{C}_{1-s}(x) + \cos \frac{\pi s}{2}\, \mathcal{S}_{1-s}(x) \right]\)

Hence, by the rule for differentiation of a product of functions,

\(\displaystyle \zeta'(s,x) = \frac{d}{ds}\, \mathscr{F}(s)\, \mathscr{G}(s) = \mathscr{F}'(s)\, \mathscr{G}(s) + \mathscr{F}(s)\, \mathscr{G}'(s)\)

Evaluation of the above by brute force yields Proposition 1. \(\displaystyle \, \Box \)

Last edited:


Well-known member
Sep 16, 2013
Connection to the Bernoulli Polynomials:

The derivative given above, in Proposition 1, appears quite unwieldy at first. However, with a few minor adjustments, it can be expressed both in fewer terms and in terms involving more familiar functions, such as the Clausen functions and Bernoulli Polynomials. Before we get to that stage we will need to prove a few functional relationships.

Proposition 2.0:

For \(\displaystyle m\in \mathbb{Z} \ge 1\, \) and \(\displaystyle 0 \le x \le 1 \in\mathbb{R}\, \), the Hurwitz Zeta function can be expressed in terms of the Bernoulli Polynomials \(\displaystyle B_n(x)\, \)as follows:

\(\displaystyle \zeta(-m,x) = -\frac{B_{m+1}(x)}{(m+1)}\)


Proving Fourier Series expansions is beyond the scope of this tutorial, so I will merely state the following without proof (these expansions can be found in most decent table of series, integrals, and special functions). The Bernoulli Polynomials have the Fourier Series expansions:

\(\displaystyle B_{2m+1}(x)= \frac{2(-1)^{m+1}(2m+1)!}{(2\pi)^{2m+1}}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{2m+1}}\)

\(\displaystyle B_{2m+2}(x)= \frac{2(-1)^m(2m+2)!}{(2\pi)^{2m+2}}\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{2m+2}}\)

Upon setting \(\displaystyle s=-n\,\) in the Fourier expansion for the Hurwitz Zeta function, one gets

\(\displaystyle \zeta(-n,x) = \)

\(\displaystyle \frac{2\Gamma(n+1)}{(2\pi)^{n+1}}\, \left[
\sin\frac{\pi n}{2} \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{n+1}} +
\cos\frac{\pi n}{2} \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{n+1}}
\right] = \)

\(\displaystyle \frac{2\, n!}{(2\pi)^{n+1}}\, \left[
\sin\frac{\pi n}{2} \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{n+1}} +
\cos\frac{\pi n}{2} \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{n+1}}

Since the Gamma function satisfies

\(\displaystyle \Gamma(x+1) = x\, \Gamma(x)\)

and therefore, in the case of \(\displaystyle n \in \mathbb{N}\)

\(\displaystyle \Gamma(n+1) = n!\)

When \(\displaystyle n\in 2\mathbb{N}\,\) is even, \(\displaystyle \sin(\pi n/2) = 0\, \), and the leftmost of the two series vanishes. Similarly, when \(\displaystyle n\in 2\mathbb{N}+1\,\) is odd, \(\displaystyle \cos(\pi n/2) = 0\,\), and the rightmost series vanishes.

More precisely, \(\displaystyle n=2m \Rightarrow\)

\(\displaystyle \zeta(-2m,x) = \frac{2(2m)!}{(2\pi)^{2m+1}}\, \cos \pi m\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{2m+1}} = \)

\(\displaystyle \frac{2(-1)^m(2m)!}{(2\pi)^{2m+1}}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{2m+1}}\)

Since \(\displaystyle \cos \pi m = (-1)^m\).

\(\displaystyle \frac{2(-1)^m(2m)!}{(2\pi)^{2m+1}}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{2m+1}} = \)

\(\displaystyle -\frac{1}{(2m+1)}\, \left[ \frac{2(-1)^m(2m+1)!}{(2\pi)^{2m+1}}\, \sum_{k=1}^{\infty} \frac{\sin 2\pi kx}{k^{2m+1}} \right] = -\frac{B_{2m+1}(x)}{(2m+1)}\)

Proposition 02 then follows by setting \(\displaystyle n=2m+1\, \), and showing - in exactly the same way - that

\(\displaystyle \zeta(-2m-1,x) = -\frac{B_{2m+2}(x)}{(2m+2)}\)


\(\displaystyle \zeta(-m,x) = -\frac{B_{m+1}(x)}{(m+1)}\)

as was to be shown. \(\displaystyle \Box\)

NOTE: The Bernoulli Polynomials have an extensive list of general properties and special values, but the vast majority of these will be superfluous (later on in this tutorial). The main ones we will need are the Bernoulli Numbers themselves, and the following elementary expression of the Bernoulli Polynomials in terms of the Bernoulli numbers \(\displaystyle B_n=B_n(0)\):

\(\displaystyle B_n(x) = \sum_{j=0}^n \binom{n}{j}B_j x^{n-j}\)

The first few Bernoulli Numbers are

\(\displaystyle B_0 = 1\)

\(\displaystyle B_1 = -\frac{1}{2}\)

\(\displaystyle B_2 = \frac{1}{6}\)

\(\displaystyle B_3 = 0\)

\(\displaystyle B_4 = -\frac{1}{30}\)

\(\displaystyle B_5 = 0\)

\(\displaystyle B_6 = \frac{1}{42}\)

\(\displaystyle B_7 = 0\)

\(\displaystyle B_8 = -\frac{1}{30}\)

\(\displaystyle B_9 = 0\)

\(\displaystyle B_{10} = \frac{5}{66}\)

Note that, aside from \(\displaystyle B_1=-1/2\,\) , all odd-indexed Bernoulli numbers are equal to zero.
Last edited:


Well-known member
Sep 16, 2013
Connection to the Clausen Functions:

The Clausen functions are defined in the usual way:

\(\displaystyle \text{Cl}_{2n}(x) = \sum_{k=1}^{\infty}\frac{\sin kx}{k^{2n}}\)

\(\displaystyle \text{Cl}_{2n+1}(x) = \sum_{k=1}^{\infty}\frac{\cos kx}{k^{2n+1}}\)

And in particular

\(\displaystyle \text{Cl}_2(x) = -\int_0^x\log\Bigg| 2\sin\frac{t}{2} \Bigg|\, dt = \sum_{k=1}^{\infty}\frac{\sin kx}{k^2}\)

\(\displaystyle \text{Cl}_1(x) = -\log\Bigg| 2\sin\frac{x}{2} \Bigg| = \sum_{k=1}^{\infty}\frac{\cos kx}{k}\)

I won't go into any great detail about their general properties and special values here, as I've done so - ad nauseam - on other, related tutorials. Suffice to say that any particular cases that we'll need later will be worked out as and when.

Proposition 3.0:

In terms of the Clausen functions, the Bernoulli Polynomials, as well as the Generalized Clausen functions and Generalized Harmonic Numbers (see post #1 for definitions), the Hurwitz Zeta function has the following first derivatives:

\(\displaystyle (3.1)\quad \zeta'(-2n,x) = \)

\(\displaystyle \frac{2(-1)^n(2n)!}{(2\pi)^{2n+1}} \left[ \frac{\pi}{2} \text{Cl}_{2n+1}(2\pi x) + \mathcal{S}_{2n+1}(x) \right]
-\frac{\mathcal{H}_{2n}\, B_{2n+1}(x)}{(2n+1)}\)

\(\displaystyle (3.2)\quad \zeta'(-2n-1,x) = \)

\(\displaystyle \frac{2(-1)^n(2n+1)!}{(2\pi)^{2n+2}} \left[ \frac{\pi}{2} \text{Cl}_{2n+2}(2\pi x) - \mathcal{C}_{2n+2}(x) \right]
-\frac{\mathcal{H}_{2n+1}\, B_{2n+2}(x)}{(2n+2)}\)

Before we get to the actual proof, it's worth briefly reflecting on these results for a moment. And here's why: at the start of this tutorial, I mentioned in passing that we might differentiate the Hurwitz Zeta with respect to its first parameter, and then, possibly multiplied by \(\displaystyle x^m\,\), integrate our results with respect to its second parameter, \(\displaystyle x\). Let's use the first of the two derivatives above, and write it out explicitly; we want to evaluate integrals like

\(\displaystyle \int_0^zx^m\zeta'(-2n,x)\, dx\)

As it stands, that is - to me at least - a pretty fearsome looking integral. But our derivatives above make it quite plain; the degree of complexity of the integral above is - at most - equivalent to that of

\(\displaystyle \int_0^zx^m\text{Cl}_{2n+1}(2\pi x)\, dx\)


\(\displaystyle \int_0^zx^m\mathcal{S}_{2n+1}(x)\, dx \)

Both of these integrals can be solved by (relatively) elementary methods. And although the answers so given are - much like my tutorials ( :rolleyes: ) - rather long-winded, they are more cumbersome than they are fiendishly complicated. In short, evaluating that Zeta Integral above won't be half as hard as it might first appear.


I'll prove the first one - (3.1) - and leave the second to the reader (the methodology in both is identical). Upon setting \(\displaystyle s=-2n\,\) in Proposition 1.0, we obtain

\(\displaystyle \zeta'(-2n,x) = \)

\(\displaystyle \frac{\pi \Gamma(2n+1)}{(2\pi)^{2n+1}} \cos(-\pi n)\, \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{2n+1}} +\)

\(\displaystyle \frac{2 \Gamma(2n+1)}{(2\pi)^{2n+1}} \cos(-\pi n)\, \mathcal{S}_{2n+1}(x) +\)

\(\displaystyle \Bigg[ \log 2\pi - \psi_0(2n+1) \Bigg] \, \zeta(-2n, x)\)

Since the terms with \(\displaystyle \sin(-\pi n) =0\, \) as a coefficient all vanish.


\(\displaystyle \Gamma(2n+1) = (2n)!\)

\(\displaystyle \cos \theta = \cos (-\theta) \)

\(\displaystyle \cos \pi n = (-1)^n\)

\(\displaystyle \text{Cl}_{2n+1} (2\pi x) = \sum_{k=1}^{\infty} \frac{\cos 2\pi kx}{k^{2n+1}}\)

\(\displaystyle \zeta(-2n,x) = -\frac{B_{2n+1}(x)}{(2n+1)}\)

\(\displaystyle \psi_0(2n+1) = \psi_0(1) + H_{2n}^{(1)} = -\gamma + H_{2n}^{(1)} \)

and - from my earlier notation - the Generalized Harmonic Numbers (of order 1) are given by

\(\displaystyle \mathcal{H}_{2n} = \log 2\pi + \gamma -H_{2n}^{(1)} \)

Putting all of this together, step by step, we get

\(\displaystyle \zeta'(-2n,x) = \)

\(\displaystyle \frac{2(-1)^n(2n)!}{(2\pi)^{2n+1}} \left[ \frac{\pi}{2} \text{Cl}_{2n+1}(2\pi x) + \mathcal{S}_{2n+1}(x) \right]
-\frac{\mathcal{H}_{2n}\, B_{2n+1}(x)}{(2n+1)}\)

As was to be shown. \(\displaystyle \Box\)

NOTE: to prove (3.2), note that the only real difference is that of dealing with \(\displaystyle \sin[-(2n+1)\pi/2]\,\) rather than \(\displaystyle \cos[-(2n)\pi/2]\).

From the addition formula for the Sine function

\(\displaystyle \sin(x\pm y) = \sin x\cos y \pm \cos x\sin y \Rightarrow \sin(-\theta) = -\sin \theta\)


\(\displaystyle \sin\left[ -\frac{(2n+1)\pi}{2} \right] = - \sin\left(\pi n +\frac{\pi}{2} \right) = -\cos \pi n = (-1)^{n+1}\)