ABSTRACT

In this chapter, we present integration of a function of a single variable. We demonstrate how to perform integrals by hand and by using several Python commands using the SymPy and SciPy libraries, both analytically and numerically. Topics include integration by parts, parametric evaluation of definite and indefinite integrals and integrating functions defined by NumPy arrays. A section is devoted to evaluating Fourier series, which are encountered in several later chapters of the book. We conclude by studying the trapezoid and Simpson's rules.