Certain Integrals Arising from Ramanujan's Notebooks

In his third notebook, Ramanujan claims the specific. In a following cryptic line, which only became visible in a recent reproduction of Ramanujan's notebooks, Ramanujan indicates that a similar relation exists if logx were replaced by log²x in the first integral and logx were inserted in the...

Повний опис

Збережено в:
Бібліографічні деталі
Дата:2015
Автори: Berndt, B.C., Straub, A.
Формат: Стаття
Мова:English
Опубліковано: Інститут математики НАН України 2015
Назва видання:Symmetry, Integrability and Geometry: Methods and Applications
Онлайн доступ:http://dspace.nbuv.gov.ua/handle/123456789/147147
Теги: Додати тег
Немає тегів, Будьте першим, хто поставить тег для цього запису!
Назва журналу:Digital Library of Periodicals of National Academy of Sciences of Ukraine
Цитувати:Certain Integrals Arising from Ramanujan's Notebooks / B.C. Berndt, A. Straub // Symmetry, Integrability and Geometry: Methods and Applications. — 2015. — Т. 11. — Бібліогр.: 5 назв. — англ.

Репозитарії

Digital Library of Periodicals of National Academy of Sciences of Ukraine
id irk-123456789-147147
record_format dspace
spelling irk-123456789-1471472019-02-14T01:26:29Z Certain Integrals Arising from Ramanujan's Notebooks Berndt, B.C. Straub, A. In his third notebook, Ramanujan claims the specific. In a following cryptic line, which only became visible in a recent reproduction of Ramanujan's notebooks, Ramanujan indicates that a similar relation exists if logx were replaced by log²x in the first integral and logx were inserted in the integrand of the second integral. One of the goals of the present paper is to prove this claim by contour integration. We further establish general theorems similarly relating large classes of infinite integrals and illustrate these by several examples. 2015 Article Certain Integrals Arising from Ramanujan's Notebooks / B.C. Berndt, A. Straub // Symmetry, Integrability and Geometry: Methods and Applications. — 2015. — Т. 11. — Бібліогр.: 5 назв. — англ. 1815-0659 2010 Mathematics Subject Classification: 33E20 DOI:10.3842/SIGMA.2015.083 http://dspace.nbuv.gov.ua/handle/123456789/147147 en Symmetry, Integrability and Geometry: Methods and Applications Інститут математики НАН України
institution Digital Library of Periodicals of National Academy of Sciences of Ukraine
collection DSpace DC
language English
description In his third notebook, Ramanujan claims the specific. In a following cryptic line, which only became visible in a recent reproduction of Ramanujan's notebooks, Ramanujan indicates that a similar relation exists if logx were replaced by log²x in the first integral and logx were inserted in the integrand of the second integral. One of the goals of the present paper is to prove this claim by contour integration. We further establish general theorems similarly relating large classes of infinite integrals and illustrate these by several examples.
format Article
author Berndt, B.C.
Straub, A.
spellingShingle Berndt, B.C.
Straub, A.
Certain Integrals Arising from Ramanujan's Notebooks
Symmetry, Integrability and Geometry: Methods and Applications
author_facet Berndt, B.C.
Straub, A.
author_sort Berndt, B.C.
title Certain Integrals Arising from Ramanujan's Notebooks
title_short Certain Integrals Arising from Ramanujan's Notebooks
title_full Certain Integrals Arising from Ramanujan's Notebooks
title_fullStr Certain Integrals Arising from Ramanujan's Notebooks
title_full_unstemmed Certain Integrals Arising from Ramanujan's Notebooks
title_sort certain integrals arising from ramanujan's notebooks
publisher Інститут математики НАН України
publishDate 2015
url http://dspace.nbuv.gov.ua/handle/123456789/147147
citation_txt Certain Integrals Arising from Ramanujan's Notebooks / B.C. Berndt, A. Straub // Symmetry, Integrability and Geometry: Methods and Applications. — 2015. — Т. 11. — Бібліогр.: 5 назв. — англ.
series Symmetry, Integrability and Geometry: Methods and Applications
work_keys_str_mv AT berndtbc certainintegralsarisingfromramanujansnotebooks
AT strauba certainintegralsarisingfromramanujansnotebooks
first_indexed 2025-07-11T01:27:40Z
last_indexed 2025-07-11T01:27:40Z
_version_ 1837312003812622336
fulltext Symmetry, Integrability and Geometry: Methods and Applications SIGMA 11 (2015), 083, 11 pages Certain Integrals Arising from Ramanujan’s Notebooks? Bruce C. BERNDT † and Armin STRAUB ‡ † University of Illinois at Urbana–Champaign, 1409 W Green St, Urbana, IL 61801, USA E-mail: berndt@illinois.edu ‡ University of South Alabama, 411 University Blvd N, Mobile, AL 36688, USA E-mail: straub@southalabama.edu Received September 05, 2015, in final form October 11, 2015; Published online October 14, 2015 http://dx.doi.org/10.3842/SIGMA.2015.083 Abstract. In his third notebook, Ramanujan claims that∫ ∞ 0 cos(nx) x2 + 1 log xdx+ π 2 ∫ ∞ 0 sin(nx) x2 + 1 dx = 0. In a following cryptic line, which only became visible in a recent reproduction of Ramanujan’s notebooks, Ramanujan indicates that a similar relation exists if log x were replaced by log2 x in the first integral and log x were inserted in the integrand of the second integral. One of the goals of the present paper is to prove this claim by contour integration. We further establish general theorems similarly relating large classes of infinite integrals and illustrate these by several examples. Key words: Ramanujan’s notebooks; contour integration; trigonometric integrals 2010 Mathematics Subject Classification: 33E20 1 Introduction If you attempt to find the values of the integrals∫ ∞ 0 cos(nx) x2 + 1 log x dx and ∫ ∞ 0 sin(nx) x2 + 1 dx, n > 0, (1.1) by consulting tables such as those of Gradshteyn and Ryzhik [3] or by invoking a computer algebra system such as Mathematica, you will be disappointed, if you hoped to evaluate these integrals in closed form, that is, in terms of elementary functions. On the other hand, the latter integral above can be expressed in terms of the exponential integral Ei(x) [3, formula (3.723), no. 1]. Similarly, if 1/(x2 + 1) is replaced by any even rational function with the degree of the denominator at least one greater than the degree of the numerator, it does not seem possible to evaluate any such integral in closed form. However, in his third notebook, on p. 391 in the pagination of the second volume of [5], Ramanujan claims that the two integrals in (1.1) are simple multiples of each other. More precisely,∫ ∞ 0 cos(nx) x2 + 1 log x dx+ π 2 ∫ ∞ 0 sin(nx) x2 + 1 dx = 0. (1.2) ?This paper is a contribution to the Special Issue on Orthogonal Polynomials, Special Functions and Applica- tions. The full collection is available at http://www.emis.de/journals/SIGMA/OPSFA2015.html mailto:berndt@illinois.edu mailto:straub@southalabama.edu http://dx.doi.org/10.3842/SIGMA.2015.083 http://www.emis.de/journals/SIGMA/OPSFA2015.html 2 B.C. Berndt and A. Straub Moreover, to the left of this entry, Ramanujan writes, “contour integration”. We now might recall a couple of sentences of G.H. Hardy from the introduction to Ramanujan’s Collected papers [4, p. xxx], “. . . he had [before arriving in England] never heard of . . . Cauchy’s theorem, and had indeed but the vaguest idea of what a function of a complex variable was”. On the following page, Hardy further wrote, “In a few years’ time he had a very tolerable knowledge of the theory of functions . . . ”. Generally, the entries in Ramanujan’s notebooks were recorded by him in approximately the years 1904–1914, prior to his departure for England. However, there is evidence that some of the entries in his third notebook were recorded while he was in England. Indeed, in view of Hardy’s remarks above, almost certainly, (1.2) is such an entry. A proof of (1.2) by contour integration was given by the first author in his book [2, pp. 329–330]. The identity (1.2) is interesting because it relates in a simple way two integrals that we are unable to individually evaluate in closed form. On the other hand, the simpler integrals∫ ∞ 0 cos(nx) x2 + 1 dx = πe−n 2 and ∫ ∞ −∞ sin(nx) x2 + 1 dx = 0 have well-known and trivial evaluations, respectively. With the use of the most up-to-date photographic techniques, a new edition of Ramanujan’s Notebooks [5] was published in 2012 to help celebrate the 125th anniversary of Ramanujan’s birth. The new reproduction is vastly clearer and easier to read than the original edition. When the first author reexamined (1.2) in the new edition, he was surprised to see that Ramanujan made a further claim concerning (1.2) that was not visible in the original edition of [5]. In a cryptic one line, he indicated that a relation similar to (1.2) existed if log x were replaced by log2 x in the first integral and log x were inserted in the integrand of the second integral of (1.2). One of the goals of the present paper is to prove (by contour integration) this unintelligible entry in the first edition of the notebooks [5]. Secondly, we establish general theorems relating large classes of infinite integrals for which individual evaluations in closed form are not possible by presently known methods. Several further examples are given. 2 Ramanujan’s extension of (1.2) We prove the entry on p. 391 of [5] that resurfaced with the new printing of [5]. Theorem 2.1. We have∫ ∞ 0 sin(nx) x2 + 1 dx+ 2 π ∫ ∞ 0 cos(nx) x2 + 1 log x dx = 0 (2.1) and ∫ ∞ 0 sin(nx) log x x2 + 1 dx+ 1 π ∫ ∞ 0 cos(nx) log2 x x2 + 1 dx = π2e−n 8 . (2.2) Proof. Define a branch of log z by −1 2π < θ = arg z ≤ 3 2π. We integrate f(z) := einz log2 z z2 + 1 over the positively oriented closed contour CR,ε consisting of the semi-circle CR given by z = Reiθ, 0 ≤ θ ≤ π, the interval [−R,−ε], the semi-circle Cε given by z = εeiθ, π ≥ θ ≥ 0, and the interval [ε,R], where 0 < ε < 1 and R > 1. On the interior of CR,ε there is a simple pole at z = i, and so by the residue theorem,∫ CR,ε f(z)dz = 2πi e−n · ( −1 4π 2 ) 2i = −e −nπ3 4 . (2.3) Certain Integrals Arising from Ramanujan’s Notebooks 3 Parameterizing the respective semi-circles, we can readily show that∫ Cε f(z)dz = o(1), (2.4) as ε→ 0, and∫ CR f(z)dz = o(1), (2.5) as R→∞. Hence, letting ε→ 0 and R→∞ and combining (2.3)–(2.5), we conclude that −e −nπ3 4 = ∫ 0 −∞ einx(log |x|+ iπ)2 x2 + 1 dx+ ∫ ∞ 0 einx log2 x x2 + 1 dx (2.6) = ∫ ∞ 0 (cos(nx)− i sin(nx))(log x+ iπ)2 x2 + 1 dx+ ∫ ∞ 0 (cos(nx) + i sin(nx)) log2 x x2 + 1 dx. If we equate real parts in (2.6), we find that −e −nπ3 4 = ∫ ∞ 0 cos(nx) ( 2 log2 x− π2 ) + 2π sin(nx) log x x2 + 1 dx. (2.7) It is easy to show, e.g., by contour integration, that∫ ∞ 0 cos(nx) x2 + 1 dx = πe−n 2 . (2.8) (In his quarterly reports, Ramanujan derived (2.8) by a different method [1, p. 322].) Putting this evaluation in (2.7), we readily deduce (2.2). If we equate imaginary parts in (2.6), we deduce that 0 = ∫ ∞ 0 π2 sin(nx) + 2π cos(nx) log x x2 + 1 dx, from which the identity (2.1) follows. � 3 A second approach to the entry at the top of p. 391 Theorem 3.1. For s ∈ (−1, 2) and n ≥ 0, π 2 e−n = ∫ ∞ 0 cos(nx− πs/2) x2 + 1 xsdx. (3.1) Before indicating a proof of Theorem 3.1, let us see how the integral (3.1) implies Ramanujan’s integral relations (2.1) and (2.2). Essentially, all we have to do is to take derivatives of (3.1) with respect to s (and interchange the order of differentiation and integration); then, upon setting s = 0, we deduce (2.1) and (2.2). First, note that upon setting s = 0 in (3.1), we obtain (2.8). On the other hand, taking a derivative of (3.1) with respect to s, and then setting s = 0, we find that 0 = ∫ ∞ 0 cos(nx) x2 + 1 log x dx+ π 2 ∫ ∞ 0 sin(nx) x2 + 1 dx, (3.2) 4 B.C. Berndt and A. Straub which is the formula (2.1) that Ramanujan recorded on p. 391. Similarly, taking two derivatives of (3.1) and then putting s = 0, we arrive at 0 = ∫ ∞ 0 cos(nx) x2 + 1 log2 x dx+ π ∫ ∞ 0 sin(nx) x2 + 1 log x dx− π2 4 ∫ ∞ 0 cos(nx) x2 + 1 dx, which, using (2.8), simplifies to π3 8 e−n = ∫ ∞ 0 cos(nx) x2 + 1 log2 x dx+ π ∫ ∞ 0 sin(nx) x2 + 1 log x dx. (3.3) Note that this is Ramanujan’s previously unintelligible formula (2.2). If we likewise take m derivatives before setting s = 0, we obtain the following general set of relations connecting the integrals Im := ∫ ∞ 0 cos(nx) x2 + 1 logm x dx, Jm := ∫ ∞ 0 sin(nx) x2 + 1 logm x dx. Corollary 3.2. For m ≥ 1, 0 = m∑ k=0 ( m k )(π 2 )k (−1)[k/2] { Im−k, if k is even Jm−k, if k is odd } . We now provide a proof of Theorem 3.1. Proof. In analogy with our previous proof, we integrate fs(z) := einzzs z2 + 1 over the contour CR,ε and let ε→ 0 and R→∞. Here, zs = es log z with −1 2π < arg z ≤ 3 2π, as above. By the residue theorem,∫ CR,ε fs(z)dz = 2πi e−neπis/2 2i = πe−neπis/2. (3.4) Letting ε → 0 and R → ∞, and using bounds for the integrand on the semi-circles as we did above, we deduce that lim R→∞ ε→0 ∫ CR,ε fs(z)dz = ∫ ∞ −∞ einxxs x2 + 1 dx = ∫ ∞ 0 e−inxxseπis x2 + 1 dx+ ∫ ∞ 0 einxxs x2 + 1 dx. (3.5) Combining (3.4) and (3.5), we find that πe−neπis/2 = ∫ ∞ 0 ( einx + e−inxeπis ) xs x2 + 1 dx. (3.6) We then divide both sides of (3.6) by 2eπis/2 to obtain (3.1). Note that the integrals are absolutely convergent for s ∈ (−1, 1). By Dirichlet’s test, (3.6) holds for s ∈ (−1, 2). � Replacing s with s+ 1 in (3.1), we obtain the following companion integral. Corollary 3.3. For s ∈ (−2, 1) and n ≥ 0, π 2 e−n = ∫ ∞ 0 x sin(nx− πs/2) x2 + 1 xsdx. (3.7) Certain Integrals Arising from Ramanujan’s Notebooks 5 Example 3.4. Setting s = 0 in (3.7), we find that π 2 e−n = ∫ ∞ 0 x sin(nx) x2 + 1 dx, (3.8) which is well known. After taking one derivative with respect to s in (3.7) and setting s = 0, we similarly find that 0 = ∫ ∞ 0 x sin(nx) x2 + 1 log x dx− π 2 ∫ ∞ 0 x cos(nx) x2 + 1 dx, (3.9) which may be compared with Ramanujan’s formula (2.1). As a second example, after taking two derivatives of (3.7) with respect to s, setting s = 0, and using (3.8), we arrive at the identity π3 8 e−n = ∫ ∞ 0 x sin(nx) x2 + 1 log2 x dx− π ∫ ∞ 0 x cos(nx) x2 + 1 log x dx. (3.10) We offer a few additional remarks before generalizing our ideas in the next section. Equating real parts in the identity (3.6) from the proof of Theorem 3.1, we find that πe−n cos(πs/2) = ∫ ∞ 0 ( cos(nx)(1 + cos(πs)) + sin(nx) sin(πs) ) xs x2 + 1 dx. (3.11) Setting s = 0 in (3.11), we again obtain (2.8). On the other hand, note that[ d ds ( cos(nx)(1 + cos(πs)) + sin(nx) sin(πs) )] s=0 = π sin(nx). Hence, taking a derivative of (3.11) with respect to s, and then setting s = 0, we find that 0 = π ∫ ∞ 0 sin(nx) x2 + 1 dx+ 2 ∫ ∞ 0 cos(nx) x2 + 1 log x dx, which is the formula (2.1) that Ramanujan recorded on p. 391. Similarly, taking two derivatives of (3.11) and letting s = 0, we deduce that −π 3 4 e−n = −π2 ∫ ∞ 0 cos(nx) x2 + 1 dx+ 2π ∫ ∞ 0 sin(nx) x2 + 1 log x dx+ 2 ∫ ∞ 0 cos(nx) x2 + 1 log2 x dx, which, using (2.8), simplifies to π3 8 e−n = π ∫ ∞ 0 sin(nx) x2 + 1 log x dx+ ∫ ∞ 0 cos(nx) x2 + 1 log2 x dx which is the formula (2.2) arising from Ramanujan’s unintelligible remark in the initial edition of [5]. The integral (3.11) has the companion πe−n sin(πs/2) = ∫ ∞ 0 ( cos(nx) sin(πs) + sin(nx)(1− cos(πs)) ) xs x2 + 1 dx, (3.12) which is obtained by equating imaginary parts in (3.6). However, taking derivatives of (3.12) with respect to s, and then setting s = 0, does not generate new identities. Instead, we recover precisely the previous results. For instance, taking a derivative of (3.12) with respect to s, and then setting s = 0, we again deduce (2.8). Taking two derivatives of (3.12) with respect to s, and then setting s = 0, we obtain 0 = π2 ∫ ∞ 0 sin(nx) x2 + 1 dx+ 2π ∫ ∞ 0 cos(nx) x2 + 1 log x dx, which is again Ramanujan’s formula (2.1). 6 B.C. Berndt and A. Straub 4 General theorems The phenomenon observed by Ramanujan in (1.2) can be generalized by replacing the rational function 1/(z2 + 1) by a general rational function f(z) in which the denominator has degree at least one greater than the degree of the numerator. We shall also assume that f(z) does not have any poles on the real axis. We could prove a theorem allowing for poles on the real axis, but in such instances we would need to consider the principal values of the resulting integrals on the real axis. In our arguments above, we used the fact that 1/(z2 + 1) is an even function. For our general theorem, we require that f(z) be either even or odd. For brevity, we let Res(F (z); z0) denote the residue of a function F (z) at a pole z0. As above, we define a branch of log z by −1 2π < θ = arg z ≤ 3 2π. For a rational function f(z) as prescribed above and each nonnegative integer m, define Im := ∫ ∞ 0 f(x) cosx logm x dx and Jm := ∫ ∞ 0 f(x) sinx logm x dx. (4.1) Theorem 4.1. Let f(z) denote a rational function in z, as described above, and let Im and Jm be defined by (4.1). Let S := 2πi ∑ U Res(eizf(z) logm z, zj), (4.2) where the sum is over all poles zj of eizf(z) logm z lying in the upper half-plane U . Suppose that f(z) is even. Then S = m∑ k=0 ( m k ) (iπ)m−k(Ik − iJk) + (Im + iJm). (4.3) Suppose that f(z) is odd. Then S = − m∑ k=0 ( m k ) (iπ)m−k(Ik − iJk) + (Im + iJm). (4.4) Observe that (4.3) and (4.4) are recurrence relations that enable us to successively calcu- late Im and Jm. With each succeeding value of m, we see that two previously non-appearing integrals arise. If f(z) is even, then these integrals are Im and Jm−1, while if f(z) is odd, these integrals are Jm and Im−1. The previously non-appearing integrals appear in either the real part or the imaginary part of the right-hand sides of (4.3) and (4.4), but not both real and imaginary parts. This fact therefore does not enable us to explicitly determine either of the two integrals. We must be satisfied with obtaining recurrence relations with increasingly more terms. Proof. We commence as in the proof of Theorem 2.1. Let CR,ε denote the positively oriented contour consisting of the semi-circle CR given by z = Reiθ, 0 ≤ θ ≤ π, [−R,−ε], the semi- circle Cε given by z = εeiθ, π ≥ θ ≥ 0, and [ε,R], where 0 < ε < d, where d is the smallest modulus of the poles of f(z) in U . We also choose R larger than the moduli of all the poles of f(z) in U . By the residue theorem,∫ CR,ε eizf(z) logm z dz = S, (4.5) where S is defined in (4.2). Certain Integrals Arising from Ramanujan’s Notebooks 7 We next directly evaluate the integral on the left-hand side of (4.5). As in the proof of Theorem 2.1, we can easily show that∫ Cε eizf(z) logm z dz = o(1), (4.6) as ε tends to 0. Secondly, we estimate the integral over CR. By hypothesis, there exist a positive constant A and a positive number R0, such that for R ≥ R0, |f(Reiθ)| ≤ A/R. Hence, for R ≥ R0,∣∣∣∣∫ CR eizf(z) logm z dz ∣∣∣∣ = ∣∣∣∣∫ π 0 eiRe iθ f(Reiθ) logm(Reiθ)iReiθdθ ∣∣∣∣ ≤ ∫ π 0 e−R sin θ|f(Reiθ)|(logR+ π)mR dθ ≤ A(logR+ π)m (∫ π/2 0 + ∫ π π/2 ) e−R sin θdθ. (4.7) Since sin θ ≥ 2θ/π, 0 ≤ θ ≤ π/2, upon replacing θ by π − θ, we find that∫ π π/2 e−R sin θdθ = ∫ π/2 0 e−R sin θdθ ≤ ∫ π/2 0 e−2Rθ/πdθ = π 2R ( 1− e−R ) . (4.8) The bound (4.8) also holds for the first integral on the far right-hand side of (4.7). Hence, from (4.7),∣∣∣∣∫ CR eizf(z) logm z dz ∣∣∣∣ ≤ A(logR+ π)m π R ( 1− e−R ) = o(1), (4.9) as R tends to infinity. Hence, so far, by (4.5), (4.6), and (4.9), we have shown that S = ∫ 0 −∞ eixf(x)(log |x|+ iπ)mdx+ ∫ ∞ 0 eixf(x) logm x dx = ∫ ∞ 0 { e−ixf(−x)(log x+ iπ)m + eixf(x) logm x } dx. (4.10) Suppose first that f(x) is even. Then (4.10) takes the form S = ∫ ∞ 0 f(x) { e−ix(log x+ iπ)m + eix logm x } dx = ∫ ∞ 0 f(x) { e−ix m∑ k=0 ( m k ) logk x(iπ)m−k + eix logm x } dx = m∑ k=0 ( m k ) (iπ)m−k(Ik − iJk) + (Im + iJm), which establishes (4.3). Secondly, suppose that f(z) is odd. Then, (4.10) takes the form S = ∫ ∞ 0 f(x) { −e−ix(log x+ iπ)m + eix logm x } dx = ∫ ∞ 0 f(x) { −e−ix m∑ k=0 ( m k ) logk x(iπ)m−k + eix logm x } dx = − m∑ k=0 ( m k ) (iπ)m−k(Ik − iJk) + (Im + iJm), (4.11) from which (4.4) follows. � 8 B.C. Berndt and A. Straub Example 4.2. Let f(z) = z/(z2 + 1). Then 2πiRes ( eizz logm z z2 + 1 , i ) = πi e ( iπ 2 )m , and so we are led by (4.4) to the recurrence relation πi e ( iπ 2 )m = − m∑ k=0 ( m k ) (iπ)m−k(Ik − iJk) + (Im + iJm), (4.12) where Im := ∫ ∞ 0 x cosx logm x x2 + 1 dx and Jm := ∫ ∞ 0 x sinx logm x x2 + 1 dx. (In the sequel, it is understood that we are assuming that n = 1 in Theorem 2.1 and in all our deliberations of the two preceding sections.) If m = 0, (4.12) reduces to J0 = π 2e , (4.13) which is (2.8). After simplification, if m = 1, (4.12) yields −π 2 2e = −iπI0 − πJ0 + 2iJ1. (4.14) If we equate real parts in (4.14), we once again deduce (4.13). If we equate imaginary parts in (4.14), we find that J1 − π 2 I0 = 0, (4.15) which is identical with (3.9). Setting m = 2 in (4.12), we find that − iπ 3 4e = π2(I0 − iJ0)− 2iπ(I1 − iJ1) + 2iJ2. (4.16) Equating real parts on both sides of (4.16), we once again deduce (4.15). If we equate imaginary parts in (4.16) and employ (4.13), we arrive at J2 − πI1 = π3 8e , (4.17) which is the same as (3.10). Lastly, we set m = 3 in (4.12) to find that π4 8e = iπ3(I0 − iJ0) + 3π2(I1 − iJ1)− 3iπ(I2 − iJ2) + 2iJ3. (4.18) If we equate real parts on both sides of (4.18) and simplify, we deduce (4.17) once again. On the other hand, when we equate imaginary parts on both sides of (4.18), we deduce that 2J3 − 3πI2 − 3π2J1 + π3I0 = 0. (4.19) A slight simplification of (4.19) can be rendered with the use of (4.15). We can replace the rational function 1/(x2 + 1) in Theorem 3.1 by other even rational func- tions f(x) to obtain the following generalization of Theorem 3.1. Its proof is in the same spirit as that of Theorem 4.1. Certain Integrals Arising from Ramanujan’s Notebooks 9 Theorem 4.3. Suppose that f(z) is an even rational function with no real poles and with the degree of the denominator exceeding the degree of the numerator by at least 2. Then, πi eπis/2 ∑ U Res(einzf(z)zs, zj) = ∫ ∞ 0 cos(nx− πs/2)f(x)xsdx, where the sum is over all poles zj of f(z) lying in the upper half-plane U . Note that, as we did for (3.7), we can replace s with s+ 1 in Theorem 4.3 to obtain a corre- sponding result for odd rational functions xf(x). This is illustrated in Example 4.7 below. As an application, we derive from Theorem 4.3 the following explicit integral evaluation, which reduces to Theorem 3.1 when r = 0. Theorem 4.4. Let r ≥ 0 be an integer. For s ∈ (−1, 2(r + 1)) and n ≥ 0, ∫ ∞ 0 cos(nx− πs/2) (x2 + 1)r+1 xsdx = π 2 e−n r∑ k=0 1 2r+k ( r + k k ) r−k∑ j=0 (−1)j ( s j ) nr−k−j (r − k − j)! . Proof. Setting f(z) = 1/(z2 + 1)r in Theorem 4.3, we see that we need to calculate the residue Res ( einzzs (z2 + 1)r+1 , i ) = Res ( α(z) (z − i)r+1 , i ) , where α(z) = einzzs (z + i)r+1 is analytic in a neighborhood of z = i. Equivalently, we calculate the coefficient of xr in the Taylor expansion of α(x+ i) around x = 0. Using the binomial series 1 (x+ a)r+1 = ∑ k≥0 (−1)k ( r + k k ) xka−r−k−1 with a = 2i, we find that α(x+ i) = e−n einx(x+ i)s (x+ 2i)r+1 = e−n ∑ k≥0 (−1)k ( r + k k ) xk(2i)−r−k−1 ∑ j≥0 ( s j ) xjis−j ∑ l≥0 (inx)l l! . Extracting the coefficient of xr, we conclude that Res ( einzzs (z2 + 1)r+1 , i ) = e−n (2i)r+1 r∑ k=0 (−1)k (2i)k ( r + k k ) r−k∑ j=0 ( s j ) is−j (in)r−k−j (r − k − j)! = e−neπis/2 2i r∑ k=0 1 2r+k ( r + k k ) r−k∑ j=0 (−1)j ( s j ) nr−k−j (r − k − j)! . Theorem 4.4 now follows from Theorem 4.3. � 10 B.C. Berndt and A. Straub Example 4.5. In particular, in the case s = 0, ∫ ∞ 0 cos(nx) (x2 + 1)r+1 dx = π 2 e−n r∑ k=0 1 2r+k ( r + k k ) nr−k (r − k)! . (4.20) We note that, more generally, this integral can be expressed in terms of the modified Bessel function Kr+1/2(z) of order r + 1/2. Namely, we have [3, formula (3.773), no. 6] ∫ ∞ 0 cos(nx) (x2 + 1)r+1 dx = (n 2 )r+1/2 √ π Γ(r + 1) Kr+1/2(n). (4.21) When r ≥ 0 is an integer, the Bessel function Kr+1/2(z) is elementary and the right-hand side of (4.21) evaluates to the right-hand side of (4.20). On the other hand, taking a derivative with respect to s before setting s = 0, and observing that, for j ≥ 1,[ d ds ( s j )] s=0 = (−1)j−1 j , we arrive at the following generalization of Ramanujan’s formula (2.1). Corollary 4.6. We have∫ ∞ 0 sin(nx) (x2 + 1)r+1 dx+ 2 π ∫ ∞ 0 cos(nx) (x2 + 1)r+1 log x dx = −e−n r∑ k=0 1 2r+k ( r + k k ) r−k∑ j=1 1 j nr−k−j (r − k − j)! . We leave it to the interested reader to make explicit the corresponding generalization of (3.3). Example 4.7. As a direct extension of (3.7), replacing s with s+ 1 in Theorem 4.4, we obtain the following companion integral. For integers r ≥ 0, and any s ∈ (−2, 2r + 1) and n ≥ 0, ∫ ∞ 0 x sin(nx− πs/2) (x2 + 1)r+1 xsdx = π 2 e−n r∑ k=0 1 2r+k ( r + k k ) r−k∑ j=0 (−1)j ( s+ 1 j ) nr−k−j (r − k − j)! . In particular, setting s = 0, we find that ∫ ∞ 0 x sin(nx) (x2 + 1)r+1 dx = π 2 e−n r∑ k=0 1 2r+k ( r + k k ){ nr−k (r − k)! − nr−k−1 (r − k − 1)! } , (4.22) while taking a derivative with respect to s before setting s = 0 and observing that, for j ≥ 2,[ d ds ( s+ 1 j )] s=0 = (−1)j j(j − 1) , Certain Integrals Arising from Ramanujan’s Notebooks 11 we find that∫ ∞ 0 x cos(nx) (x2 + 1)r+1 dx− 2 π ∫ ∞ 0 x sin(nx) (x2 + 1)r+1 log x dx = e−n r∑ k=0 1 2r+k ( r + k k ) nr−k−1 (r − k − 1)! − r−k∑ j=2 1 j(j − 1) nr−k−j (r − k − j)!  = 2 π ∫ ∞ 0 cos(nx) (x2 + 1)r+1 dx− 2 π ∫ ∞ 0 x sin(nx) (x2 + 1)r+1 dx − e−n r∑ k=0 1 2r+k ( r + k k ) r−k∑ j=2 1 j(j − 1) nr−k−j (r − k − j)! , upon the employment of (4.20) and (4.22). Acknowledgements We wish to thank Khristo Boyadzhiev, Larry Glasser and the referees for their careful and helpful suggestions. References [1] Berndt B.C., Ramanujan’s notebooks. Part I, Springer-Verlag, New York, 1985. [2] Berndt B.C., Ramanujan’s notebooks. Part IV, Springer-Verlag, New York, 1994. [3] Gradshteyn I.S., Ryzhik I.M., Table of integrals, series, and products, 8th ed., Academic Press Inc., San Diego, CA, 2014. [4] Ramanujan S., Collected papers, Cambridge University Press, Cambridge, 1927, reprinted by Chelsea, New York, 1962, reprinted by Amer. Math. Soc., Providence, RI, 2000. [5] Ramanujan S., Notebooks. Vols. 1, 2, Tata Institute of Fundamental Research, Bombay, 1957. http://dx.doi.org/10.1007/978-1-4612-1088-7 http://dx.doi.org/10.1007/978-1-4612-0879-2 1 Introduction 2 Ramanujan's extension of (1.2) 3 A second approach to the entry at the top of p. 391 4 General theorems References