We present a Mathematica implementation of an algorithm for computing new closed-form evaluations for classes of trig-logarithmic and hyperbolic-logarithmic definite integrals based on the substitution of logarithmic functions into the Maclaurin series expansions of trigonometric and hyperbolic functions. Using this algorithm, we offer new closed-form evaluations for a variety of trig-logarithmic integrals that state-of-the-art computer algebra systems cannot evaluate directly. We also show how this algorithm may be used to evaluate interesting infinite series and products.

### 1. Introduction

Although there are many well-known techniques for the symbolic evaluation of definite integrals, such as Slater’s convolution method, there are many open issues concerning symbolic definite integration using computer algebra systems [1–4]. Computing a closed-form expression for a definite integral often easily reduces to the evaluation of the corresponding indefinite integral, but there are many natural definite integrals of elementary functions that cannot be directly evaluated following that procedure [5]. This article considers the general problem of the symbolic computation of trig-logarithmic and hyperbolic-logarithmic definite integrals. Integrals of this form are interesting in part because they often have surprising, simple and elegant closed-form evaluations involving special functions such as the gamma function and the generalized Riemann zeta function. They may also be used to evaluate infinite series:

In this article, we are primarily concerned with the evaluation of integrals involving an expression of the form or , where is a complex number and is a variable. Integrals of this form emerge in a natural context within physics and engineering, since the Cauchy–Euler differential equation yields the basic solutions and . For example, there are applications based on integrals involving these basic solutions related to the Einstein–Barber field equations [6, 7].

Integrals with an integrand involving a trigonometric function composed with a logarithmic function as a factor are also interesting because there are many integrals of this form that cannot be directly evaluated by state-of-the-art computer algebra systems. For example, consider the definite integral . Mathematica 11.2 is not able to directly evaluate this definite integral nor the underlying indefinite integral.

Here is a numerical approximation.

A natural way to evaluate the symbolic definite integral would be to expand the integrand by substituting into the Maclaurin series for the sine function and then use Mathematica to evaluate the corresponding infinite series.

Evaluate the expression using Mathematica. This integral would occur in the term-by-term expansion.

The Maclaurin series substitution technique applied to this integral gives the series . Here is a numerical approximation.

Mathematica is able to evaluate the series involving the Riemann zeta function, leading to the elegant closed-form evaluation for the definite integral that we have previously noted [8].

In this article, we generalize the strategy illustrated using a Mathematica program for a function that extends the built-in Wolfram Language function with respect to definite integrals so as to be able to find new evaluations for a large variety of trig-logarithmic and hyperbolic-logarithmic integrals that Mathematica 11.2 is not able to directly evaluate otherwise. The underlying algorithm of the function is based on the substitution of logarithmic functions into the Maclaurin series expansions of certain trigonometric/hyperbolic expressions within numerators of integrands, as illustrated in the preceding example. Since Mathematica is able to evaluate a large variety of integrals involving powers of logarithmic functions, the function is able to evaluate a large variety of interesting and natural definite integrals. Also, the function may be used to prove new evaluations for interesting infinite series:

We begin by offering a variety of illustrations of applications of this algorithm. The integration results given in this article are new in the sense that Mathematica 11.2 is not able to evaluate the definite integrals. The function is documented in the Mathematica package corresponding to this article.

In Section 4, we discuss some nuances concerning . In Section 5, we summarize the main capabilities of this function. In Section 6, we discuss some avenues for future research related to the function.

In this article, Mathematica 11.2 was used to generate results; earlier versions may be too slow.

### 2. Integrands Involving the Sine Function Composed with Logarithmic Functions

Given an integral involving an expression of the form , where is a complex number, the function generalizes the strategy outlined in Section 1 to attempt to evaluate the corresponding integral. The function uses the Maclaurin series for the sine function, substitutes a logarithmic function into this power series and integrates it term by term. The resulting infinite series often involves the generalized Riemann zeta function. For example, consider the definite integral .

The function is also able to compute new evaluations of integrals involving expressions such as .

is also able to compute new evaluations of integrals involving a factor such as .

#### 2.1. Related Series Results

Integration results such as those in Section 2 may be used to prove interesting infinite series formulas using this identity:

(1) |

This elegant infinite series formula is easily verified using equation (1) together with the function:

(2) |

To prove it, use (1) with the Maclaurin series expansion of the expression within the integrand of . It is known that [9], and several elegant proofs of this formula are given in [9]. Similar formulas, such as the following new infinite series formulas, may be proven similarly.

**Proposition 1**

**Proof**

Begin by evaluating .

Expand the factor in the integrand as a Maclaurin series, . The desired result follows by integrating both sides of this equality using the evaluation and simplifying the resultant summand. □

**Proposition 2**

**Proof**

First evaluate .

We have that . Integrating both sides of this equality using the evaluation may be used to finish the proof. □

**Proposition 3**

**Proof**

Evaluate .

To evaluate the preceding infinite series, expand the factor within the integrand, integrate the resultant summand and use the evaluation of the integral. □

**Proposition 4**

**Proof**

Evaluate .

Expand the factor and follow the technique used in the previous proofs.

### 3. Integrands Involving the Cosine Function Composed with Logarithmic Functions

The function is able to evaluate a variety of definite integrals involving expressions of the form , where is a complex number.

The evaluation of this trig-logarithmic integral involves Catalan’s constant.

This one involves the Glaisher–Kinkelin constant.

Here .

#### 3.1. Related Series Results

We prove the following well-known infinite product formula following the strategy used in Section 2.1: evaluate , substitute the Maclaurin series for into this integral and integrate term by term.

Similarly, we prove the following new infinite series formulas.

**Proposition 5**

**Proof**

First evaluate .

Expanding in the preceding integrand,

Integrating both sides of this equation using the integral evaluation and simplifying yields the desired result. □

**Proposition 6**

**Proof**

Evaluate .

To evaluate the series, expand in the integrand, integrate the resultant summand and simplify, and use the integral evaluation. □

**Proposition 7**

**Proof**

Evaluate .

The series may then be evaluated like the others. □

### 4. Discussion

As discussed in Section 1, the function is based on the substitution of logarithmic functions into Maclaurin series. Our implementation is in many ways based on the use of string manipulation through Wolfram Language string operations such as . Given an integrand as input, the function converts the numerator of to a string and determines whether the numerator of contains trigonometric, hyperbolic or logarithmic expressions. If contains a suitable combination of functional expressions, such as a sine function and a logarithmic function, uses string manipulation to determine whether Mathematica 11.2 is able to evaluate a definite integral involving logarithmic powers that is needed to evaluate an infinite series, following the technique described in Section 1. If Mathematica 11.2 is able to compute a closed-form evaluation for this log-power integral, then the function uses such an evaluation to evaluate the infinite series.

The function is an extension of the function in terms of definite integrals, in the sense that if the function is able to evaluate a definite integral, then returns the same evaluation. However, does not extend with respect to indefinite integrals. Also, there are certain classes of definite integrals that neither the function nor can evaluate (as an infinite series or otherwise).

### 5. Summary

The function is able to directly compute new evaluations for a variety of integrals of the following forms that cannot be directly computed by state-of-the-art computer algebra systems (here , , , etc. denote complex numbers).

where

We have shown how may be used to construct new evaluations of a variety of interesting infinite series, such as series involving the inverse tangent function. is also able to directly compute closed-form evaluations of definite integrals involving products of trig-logarithmic and hyperbolic-logarithmic expressions.

### 6. Conclusion

We currently leave it as an open problem to generalize . There are many natural ways to generalize it. Many definite integrals have an integrand with a factor consisting of the composition of two elementary transcendental functions that may be evaluated using Maclaurin series, but that cannot be directly evaluated using state-of-the-art computer algebra systems. For example, Mathematica 11.2 is not able to compute the following integral.

Using the Maclaurin series for the square of the inverse sine, it is easily seen that

Implementing a generalization of this strategy to evaluate using Mathematica may be difficult, since Mathematica 11.2 is not able to compute integrals such as .

We currently leave it as an open problem to construct an analog of the function that is able to directly evaluate infinite series such as the summation evaluated in Section 2.

A natural way to generalize the function would be to construct a program for directly evaluating more general classes of logarithmic-power integrals. For example, these logarithmic-power integrals have simple closed-form evaluations, but Mathematica 11.2 is not able to directly evaluate general formulas for these integrals.

The function is designed to evaluate definite integrals with an integrand with a *factor* in the form of a trig-logarithmic or hyperbolic-logarithmic function. However, it is clear that the general strategy outlined in the Section 1 may be applied more generally. That is, this technique may be applied to certain types of definite integrals with factors different than or . We currently leave it as an open problem to generalize the function so as to be able to apply this Maclaurin series substitution technique to integrands without such factors.

### Acknowledgments

The author would like to thank a reviewer for many useful comments and suggestions.

### References

[1] | A. A. Adams, H. Gottliebsen, S. A. Linton and U. Martin, “VSDITLU: A Verifiable Symbolic Definite Integral Table Look-Up,” in CADE-16: Proceedings of the 16th International Conference on Automated Deduction: Automated Deduction, H. Ganzinger (ed.), Trento, Italy, July 7–10, 1999, London: Springer, 1999 pp. 112–126. doi:10.1007/3-540-48660-7_8. |

[2] | D. Lichtblau, “Symbolic Definite Integration: Methods and Open Issues,” talk given at 2005 Wolfram Technology Conference, Champaign IL, 2005. library.wolfram.com/infocenter/Conferences/5832. |

[3] | D. Stoutemyer, “Crimes and Misdemeanors in the Computer Algebra Trade,” Notices of the American Mathematical Society, 38(7), 1991 pp. 778–785. www.researchgate.net/publication/235941737_Crimes_and_Misdemeanors_in_the_Computer_Algebra_Trade. |

[4] | B. Terelius, “Symbolic Integration,” Master’s thesis, Royal Institute of Technology, School of Computer Science and Communication, Stockholm, Sweden, 2009. www.nada.kth.se/utbildning/grukth/exjobb/rapportlistor/2009/rapporter09/terelius_bjorn_09095.pdf. |

[5] | P. S.-H. Wang, Evaluation of Definite Integrals by Symbolic Manipulation, Technical report MIT/LCS/TR-92, Project MAC, Massachusetts Institute of Technology, Cambridge, MA, 1971. publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-092.pdf. |

[6] | K. S. Adhav, A. S. Nimkar, V. G. Mete and M. V. Dawande, “Axially Symmetric Bianchi Type-I Model with Massless Scalar Field and Cosmic Strings in Barber’s Self-Creation Cosmology,” International Journal of Theoretical Physics, 49(5), 2010 pp. 1127–1132. doi.org/10.1007/s10773-010-0293-6. |

[7] | D. D. Pawar, S. N. Bayaskar and A. G. Deshmukh, “String Cosmological Model in Presence of Massless Scalar Field in Modified Theory of General Relativity,” Romanian Journal of Physics, 56(5–6), 2011 pp. 842–848. www.nipne.ro/rjp/2011_56_5-6/0842_0848.pdf. |

[8] | N. J. A. Sloane, “The On-Line Encyclopedia of Integer Sequences,” sequence A265011. oeis.org. |

[9] | Namagiri, “A Closed Form for the Infinite Series .” Mathematics Stack Exchange. (Apr 30, 2014) math.stackexchange.com/questions/776182. |

J. M. Campbell, “An Algorithm for Trigonometric-Logarithmic Definite Integrals,” The Mathematica Journal, 2017. dx.doi.org/doi:10.3888/tmj.19-6. |

### List of Additional Material

Additional electronic files:

Available at: www.mathematica-journal.com/data/uploads/2017/10/TIntegratePackage.m

### About the Author

John M. Campbell received an M. Math. degree from the University of Waterloo and graduated first class with distinction with a Specialized Honours Bachelor of Science degree from York University. He has worked as a research assistant at the Fields Institute for Research in Mathematical Sciences and at York University.

**John M. Campbell**

*York University
4700 Keele Street
Toronto, ON M3J 1P3
*

*jmaxwellcampbell@gmail.com*