3.3. Integration in 1D#
3.3.1. Learning goals:#
After working through these notes, you will be able to:
Describe the difference between definite and indefinite integration
Determine the indefinite integrals of common functions of one variable
Determine definite integrals of common functions of one variable
3.3.2. Coding concepts:#
No coding concepts are used in this notebook.
3.3.3. Integration#
Integration is the inverse operation of differentiation. When asked “what is \(\int f(x) dx\)?” you can think of it like asking “what function has the derivative \(f(x)\)?”. Much like in differentiation, we need to learn the integral, or antiderivative, of various functions for ease of use later in Thermodynamics and Kinetics. We will start by differentiating between indefinite and definite integration.
3.3.4. Indefinite integration#
Indefinite integration is equivalent to the question above. What is the antiderivative of a function? For example, we might write
where this can be read as “the integral of \(x^2\) is \(\frac{x^3}{3}\) plus an arbitrary constant, \(C\).” This is an example of indefinite integration for which we determine the function(s) that represent the antiderivative of the integrand (\(x^2\)). Note that you can substitute any real number for \(C\) and have a correct answer.
If we look at the indefinite integration above in reverse, we see that the derivative of \(\frac{x^3}{3}\) with respect to \(x\) is \(x^2\). The derivative of any constant is \(0\) so we actually have an infinite number of functions that satisfy the indefinite integration above and we represent these by including \(C\), the arbitrary constant.
3.3.4.1. Some Common Indefinite Integrals#
Here are the indefinite integrals of some common 1D functions:
Polynomials (with constant \(A\) and integer \(n\neq-1\))
Polynomial \(n=-1\) (with constant \(A\))
Exponentials (with constants \(A\) and \(m\)):
Trig functions (constant \(A\)):
For a more exhaustive list of indefinite integrals, see http://integral-table.com/, https://en.wikipedia.org/wiki/Lists_of_integrals, or use Wolgram alpha.
3.3.4.2. \(u\) substitution#
Composite functions are more difficult to differentiate. There are a few tricks to help with this. One example is \(u\) substitution. This is basically the integral version of the chain rule and does come in handy in Thermodynamics and Kinetics.
Rather than spell out the theory of \(u\) substitution, here is an example of using it. Determine a closed for expression for \(f(x)\) where
Note that we clearly have composite functions here. We have \(2x\), \(\cos(x)\), and \(x^2\). This integral is also clearly not one of the ones listed above. We are going to use \(u\) substitution to solve it.
A clue that \(u\) substitution will work is when you have to parts of the function that are related by a derivative
We see that the \(x^2\) and \(2x\) are related by a derivative. Namely \(\frac{d}{dx}x^2 = 2x\). This means \(u\) substitution will likely work in this case.
We start by picking one of the functions and substitute it with a new variable \(u\). We will choose
because the derivative of \(x^2\) is \(dx\). When we substitue \(u\) into the integral above we are going to want to do the integration over \(u\), not \(x\). Thus, we need to also substitute the differential of \(u\). To determine that, we take the differential of both sides of the equation for \(u\) above to yield
We now substitute both of these into the integral above to get
where I first rearrange the integral to make clear that there is a \(du=2xdx\) in the integral. I then substitute in \(u\) and \(du\) to get \(\int \cos(u)du\). This integral is given above as \(\sin(u) + C\). Finally, we substitute back in for \(u\) to make the dependence on \(x\) explicit once again.
If we take the derivative of \(\sin(x^2) + C\) we need to use the chain rule but should see that we will get \(2x\cos(x^2)\).
3.3.4.3. Integration by Parts#
The integral version of the product rule is integration by parts (sort of). It is annoying and we won’t encounter it that much in this class so I will not go over it.
3.3.5. Definite Integration#
Definite integration is comparable to indefinite integration except that there are limits placed on the integral in definite integration. The result is typically a number and represents the area under the curve between the lower and upper limits.
Definite integrals are often evaluated by determining the indefinite integral and then determining the difference of the values of this function at the limits. The arbitrary constant, \(C\), no longer matters because it is the same at both limits and so get substracted out.
Here is an example
To dermine this definite integral, we start be determining the indefinite integral. We determined this above to be
We can now solve the definite integral
The notation \(\left[ \frac{x^3}{3} \right]_{-2}^2\) means to take the difference of the function \(\frac{x^3}{3}\) evaluated at the upper (\(2\)) and lower (\(-2\)) limits.
3.3.5.1. Tables of Definite Integrals#
There are some functions that do not have a nice indefinite integral but for which the definite integral over certain domains can be determined. A common example is a Guassian integral over either \(0<x<\infty\) or \(-\infty<x<\infty\). It can be shown that
We may encounter integrals like this. It is not expected that you be able to determine these but rather you will be given a general result like those tabulated at the bottom of the wikipedia page of integrals (https://en.wikipedia.org/wiki/Lists_of_integrals).
3.3.5.2. Numeric integration#
Definite integrals can also be approximated by numeric integration. We will not dicuss this technique but the basics are give in a different noteboook.