05. Indefinite Integrals
June 5 Lecture. Links to the board and recording.
Introduction¶
Definition:
An indefinite integral is the antiderivative of a function.
I.e., given a function \(f(x)\), can we find a function \(F(x)\) such that \(F^\prime(x)=f(x)\)? \(F(x)\) is called the antiderivative of \(f\).
Example of antiderivative
\(f(x)=x^2\implies F(x)=\frac{x^3}{3}\) or \(\frac{x^3}{3}-17\) or \(\frac{x^3}{3}+15\)…
In general, \(F(x)=\frac{x^3}{3}+C\quad (C\in\R)\)
Notation:
We use the symbolic notation:
\(f(x)\) is called the integrand.
Basic Integrals — Very Important
- \(\int{\cos x}\;dx=\sin x+C\)
- \(\int{\sin x}\;dx=-\cos x+C\)
- \(\int{\tan x}\;dx=-\ln|\cos(x)|+C\)
- \(\int{e^x}\;dx=e^x+C\)
- \(\int{a^x}\;dx=\frac{a^x}{ln(a)}+C\)
- \(\int{x^n}\;dx=\frac{x^{n+1}}{n+1}+C\)
- For \(n\not=-1\)
- \(\int{x^{-1}}\;dx=\int{\frac1x}\;dx=\ln{|x|}+C\)
- \(\int{\frac1{1+x^2}}\;dx=\arctan x+C\)
- \(\int{\frac1{\cos^2x}}\;dx=\tan x+C\)
- \(\int{\frac{1}{\sin^2x}}\;dx=-\cot x+C\)
- \(\int{k}\;dx=kx+C\)
- \(\int{\ln x}\;dx=x\ln(x)-x\)
Basic Properties¶
- Suppose \(\int f = F, \int g = G\).
\(\int{\left[f(x)+g(x)\right]}\;dx=F(x)+G(x)+C\)
The derivative of a sum is the sum of the derivatives. Therefore, the integral of a sum is equal to the sum of the integrals. Basically, this means you can split up the integral where there are terms being added or subtracted. - Suppose \(\int f = F, k\in\R\).
\(\int{(kf)(x)}\;dx=k\cdot\int{f(x)}\;dx=kF(x)+C\)
The integral of a product of a constant and a function is the product of a constant and the integral of the function. Basically, this means you can pull constant coefficients outside of the integrand.
E.g, \(\int{5x^3}\;dx=5\cdot\int{x^3}\;dx=5\cdot\frac{x^4}{4}+C=\frac{5x^4}{4}+C\) - Combining properties 1 & 2, we get “linearity of the integral”:
- \(\int\big[af(x)+bg(x)\big]\;dx=aF(x)+bG(x)\)
Example: Exercise 6, Q1/1
Integration by Substitution¶
Reversing the Chain Rule.
Rule:
Suppose \(F^\prime=f\). Then by the chain rule, \({[F(u(x))]}^\prime=f(u(x))\cdot u^\prime(x)\). When we reverse the process, \(\int{f(u(x))\cdot u^\prime(x)}\;dx=F(u(x))+C\)
Therefore, we deduce the following rule:
The key is to identify one factor of the integrand as the derivative of another part of the integrand; this other part will be your \(u^\prime(x)\).
Another way to say that is to find a composed function \((f\of g)(x)\) within the integrand such that \(g^\prime(x)\) is being multiplied by the composed function
Example of Reversing the Chain Rule
Where,
- The composed function is \(\textcolor{blue}{3}\textcolor{orange}\sin\textcolor{blue}{^2}\textcolor{orange}x\)
- \(\textcolor{red}{F(x)}=x^3\)
- \(\textcolor{blue}{f(x)}=F^\prime(x)=3x^2\)
- \(\textcolor{orange}{u(x)}=\sin x\)
We use substitution to make this method technically easier:
Substitution¶
Denote \(u^\prime(x)dx\) as \(du\), and write \(f\big(u(x)\big)\) as \(f(u)\).
I.e., remove \(x\) from the integral entirely, rewrite it as an integral in the variable \(u\).
Example of Using Substitution \(\int{3\sin^2x\cos x}\;dx\)
Where,
-
We substitute \(u(x)=\sin x\),
which gives us \(u^\prime(x)\;dx=\cos x\;dx\) -
Solve the simplified integral:
- Replace the substitution:
June 5 Tirgul. Links to the board and the recording.
The key is to find the appropriate \(u(x)\), see above rule.
General Rule
Useful Trigonometric Identities
Integration by Parts¶
Reversing the Product Rule
Recall the Product Rule:
\({(f\cdot g)}^\prime=f\cdot g^\prime+f^\prime\cdot g\)
Moving things around, we get this:
\(f\cdot g^\prime={(f\cdot g)}^\prime-f^\prime\cdot g\)
Integrating both sides gives us this rule:
This is helpful when the integrand can be expressed as \(u\cdot v^\prime\), where \(u^\prime\cdot v\) is easier to integrate.
Picking an appropriate \(u\) and \(v^\prime\):
\(u\) should become simpler - or at least, not more complicated when differentiating.
\(v^\prime\) should become simpler - or at least, not more complicated when integrating.
Generally, but not always, you usually want to avoid having an exponential function as \(v^\prime\).
Specifically: \(x^n\) should be \(u\), not \(v^\prime\).
Example of Integration by Parts: \(\int{xe^x}\;dx\)
Given \(\int{xe^x}\;dx\).
We want to express \(xe^x\) as \(u\cdot v^\prime\), so we choose \(u=x\), and \(v^\prime=e^x\).
\(u=x\) | \(v=e^x\) |
---|---|
\(u^\prime=1\) | \(v^\prime=e^x\) |
Applying the above formula, we get:
June 7 Lecture. Links to the board and the recording.
Algebraic Methods for Integrating a Rational Function¶
First, let’s look at simple rationals that don’t need any special methods:
Simple example: \(\int{\frac{x+4}{x^2+7}}\;dx\)
Break up \(\frac{x+4}{x^2+7}\):
Therefore,
Simple example: \(\int{\frac{x+x^3}{x^4+2x^2}}\;dx\)
Notice that the derivative of the denominator is \(4x^3+4x=4(x+x^3)\), which is \(4\) times the numerator.
Substitute \(u=x^4+2x^2,\; du=4(x+x^3)dx\)
Un-substitute
Simple: When it works, just do it.
The last two examples are “easy” methods when they work:
- Split the integrand into the sum of two ‘easier’ ones
- Notice that the numerator is a derivative (or multiple thereof) of the denominator
However, it won’t always be so easy.
Cases where it’s not so simple:
- The degree of the numerator is equal to or larger than the degree of the denominator
- The denominator is a quadratic equation
deg P ≥ deg Q
When the numerator has a higher or equal degree than the denominator, first actually do the division:
Not-So-Simple Example \(\int\frac{x^4}{x^2+4}\)
First divide: \(\frac{x^4}{x^2+4}=x^2-4+\frac{16}{x^2+4}\)
Then integrate:
These are now simple integrals that we know how to solve.
Not-So-Simple Example \(\int{\frac{3x-4}{x^2+2x+5}}\;dx\)
We “complete the square” in the denominator, so we get the form \(\int\frac{3x+4}{(x+a)^2+b}\)
\(x^2+2x+5=(x^2+2x+1)+4=(x+1)^2+4\)
Substitute \(u=x+1\;du=1dx\)
\(x=u-1\implies3x-4=3(u-1)-4=3u-7\)
Summary of method:
Complete the square in the denominator to change it from \(x^2+ax+b\) to \(u^2+c\)
This only works if the denominator \(Q(x)>0\) for all \(x\) — i.e., it doesn’t break down into factors. When this condition is not met, we use Decomposition (see below).
Decomposition into Partial Fractions¶
A rational function of the form \(\frac{Ax+B}{(Cx+D)(Mx+N)}\) can be broken down as \(\frac P{Cx+D}+\frac Q{Mx+N}\), where the degrees of the numerators are less than that of the denominators.
If the numerator has a degree of 0 or 1, the denominator has a degree of 2.
Example
Therefore, \((P+2Q)x+(-2P+Q)=20\)
Comparing coefficients across numerators, we get:
Solving for \(P\) and \(Q\), we get \(Q=4,\;P=-8\). Plugging them into our desired form:
The integrals of the summands are much easier to calculate.
If the denominator has more than two factors:
\(\frac{Ax+B}{(Cx+D)(Mx+N)(Sx+T)}=\frac P{Cx+D}+\frac Q{Mx+N}+\frac R{Sx+T}\)
In each summand, the numerator can be of degree up to one less than that of the denominator. \({(\text{deg}(numerator)≤\text{deg}(denominator)-1)}\). If the denominator is an irreducible polynomial of degree 2, set the numerator as degree 1. (\(Ax+B\))