Calculus I· Note 05

Indefinite Integrals

Year 1 · Semester IILast updated

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)f(x), can we find a function F(x)F(x) such that F′(x)=f(x)F^\prime(x)=f(x)? F(x)F(x) is called the antiderivative of ff.

Example of antiderivative

f(x)=x2  ⟹  F(x)=x33f(x)=x^2\implies F(x)=\frac{x^3}{3} or x33−17\frac{x^3}{3}-17 or x33+15\frac{x^3}{3}+15…
In general, F(x)=x33+C(C∈R)F(x)=\frac{x^3}{3}+C\quad (C\in\R)

Notation:
We use the symbolic notation:

∫f(x)  dx=F(x)+C\int{f(x)}\;dx=F(x)+C

f(x)f(x) is called the integrand.

Basic Integrals — Very Important
  • ∫cos⁡x  dx=sin⁡x+C\int{\cos x}\;dx=\sin x+C
  • ∫sin⁡x  dx=−cos⁡x+C\int{\sin x}\;dx=-\cos x+C
  • ∫tan⁡x  dx=−ln⁡∣cos⁡(x)∣+C\int{\tan x}\;dx=-\ln|\cos(x)|+C
  • ∫ex  dx=ex+C\int{e^x}\;dx=e^x+C
  • ∫ax  dx=axln(a)+C\int{a^x}\;dx=\frac{a^x}{ln(a)}+C
  • ∫xn  dx=xn+1n+1+C\int{x^n}\;dx=\frac{x^{n+1}}{n+1}+C
    • For n≠−1n\not=-1
  • ∫x−1  dx=∫1x  dx=ln⁡∣x∣+C\int{x^{-1}}\;dx=\int{\frac1x}\;dx=\ln{|x|}+C
  • ∫11+x2  dx=arctan⁡x+C\int{\frac1{1+x^2}}\;dx=\arctan x+C
  • ∫1cos⁡2x  dx=tan⁡x+C\int{\frac1{\cos^2x}}\;dx=\tan x+C
  • ∫1sin⁡2x  dx=−cot⁡x+C\int{\frac{1}{\sin^2x}}\;dx=-\cot x+C
  • ∫k  dx=kx+C\int{k}\;dx=kx+C
  • ∫ln⁡x  dx=xln⁡(x)−x\int{\ln x}\;dx=x\ln(x)-x

Basic Properties

  1. Suppose ∫f=F,∫g=G\int f = F, \int g = G.
    ∫[f(x)+g(x)]  dx=F(x)+G(x)+C\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.
  2. Suppose ∫f=F,k∈R\int f = F, k\in\R.
    ∫(kf)(x)  dx=k⋅∫f(x)  dx=kF(x)+C\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, ∫5x3  dx=5⋅∫x3  dx=5⋅x44+C=5x44+C\int{5x^3}\;dx=5\cdot\int{x^3}\;dx=5\cdot\frac{x^4}{4}+C=\frac{5x^4}{4}+C
  3. Combining properties 1 & 2, we get “linearity of the integral”:
    • ∫[af(x)+bg(x)]  dx=aF(x)+bG(x)\int\big[af(x)+bg(x)\big]\;dx=aF(x)+bG(x)
Example: Exercise 6, Q1/1
∫(2x3+3x)  dx=∫2x3  dx  +  ∫3x  dx=2∫x3  dx  +  3∫1x  dx=2⋅x44+C+ 3⋅ln⁡∣x∣+C=x42+3ln⁡∣x∣+C\begin{array}{l}\int{\left(2x^3+\frac3x\right)}\;dx &=\int{2x^3}\;dx\;&+\;\int{\frac3x}\;dx\\ &=2\int{x^3}\;dx\;&+\;3\int{\frac1x}\;dx\\ &=2\cdot\frac{x^4}{4}+C&+\ 3\cdot\ln|x|+C\\ =\frac{x^4}{2}+3\ln|x|+C \end{array}

Integration by Substitution

Reversing the Chain Rule.
Rule:
Suppose F′=fF^\prime=f. Then by the chain rule, [F(u(x))]′=f(u(x))⋅u′(x){[F(u(x))]}^\prime=f(u(x))\cdot u^\prime(x). When we reverse the process, ∫f(u(x))⋅u′(x)  dx=F(u(x))+C\int{f(u(x))\cdot u^\prime(x)}\;dx=F(u(x))+C
Therefore, we deduce the following rule:

∫[f(u(x))⋅u′(x)]  dx=F(u(x))+C\int{\Big[f\big(u(x)\big)\cdot u^\prime(x)\Big]}\;dx=F\big(u(x)\big)+C

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′(x)u^\prime(x).
Another way to say that is to find a composed function (f∘g)(x)(f\of g)(x) within the integrand such that g′(x)g^\prime(x) is being multiplied by the composed function

Example of Reversing the Chain Rule
∫3sin⁡2x⏟f(u(x)) cos⁡x⏟u′(x)  dx=sin⁡3x⏟F(u(x))+C\int{\underbrace{3\sin^2x}_{\textcolor{blue}{f\big(\textcolor{orange}{u(x)}\big)}}}\ \underbrace{\cos x}_{\textcolor{green}{u^\prime(x)}}\;dx=\underbrace{\sin^3x}_{\textcolor{red}{F\big(\textcolor{orange}{u(x)}\big)}}+C

Where,

  • The composed function is 3sin⁡2x\textcolor{blue}{3}\textcolor{orange}\sin\textcolor{blue}{^2}\textcolor{orange}x
  • F(x)=x3\textcolor{red}{F(x)}=x^3
  • f(x)=F′(x)=3x2\textcolor{blue}{f(x)}=F^\prime(x)=3x^2
  • u(x)=sin⁡x\textcolor{orange}{u(x)}=\sin x

We use substitution to make this method technically easier:

Substitution

Denote u′(x)dxu^\prime(x)dx as dudu, and write f(u(x))f\big(u(x)\big) as f(u)f(u).
I.e., remove xx from the integral entirely, rewrite it as an integral in the variable uu.

∫f(u(x))⏟f(u) u′(x)  dx⏟du=∫f(u)  du=F(u)+C=F(u(x))+C\int \underbrace{f(u(x))}_{f(u)}\ \underbrace{u^\prime(x)\;dx}_{du}=\int f(u)\;du=F(u)+C=F\big(u(x)\big)+C
Example of Using Substitution ∫3sin⁡2xcos⁡x  dx\int{3\sin^2x\cos x}\;dx
∫3sin⁡2xcos⁡x  dx=∫3u2  du\int{3\sin^2x\cos x}\;dx=\int{3u^2}\;du

Where,

  • We substitute u(x)=sin⁡xu(x)=\sin x,
    which gives us u′(x)  dx=cos⁡x  dxu^\prime(x)\;dx=\cos x\;dx

  • Solve the simplified integral:

∫3u2  du=u3+C\int{3u^2}\;du=u^3+C
  • Replace the substitution:
u3+C=sin⁡3x+Cu^3+C=\sin^3x+C

June 5 Tirgul. Links to the board and the recording.
The key is to find the appropriate u(x)u(x), see above rule.

General Rule
∫1x2+adx=1aarctan⁡(xa)\int{\frac{1}{x^2+a}}dx=\frac{1}{\sqrt a}\arctan\left(\frac x{\sqrt a}\right)
Useful Trigonometric Identities
sin⁡(x)sin⁡(y)=cos⁡(y−x)−cos⁡(y+x)2cos⁡(x)cos⁡(y)=cos⁡(y−x)+cos⁡(y+x)2sin⁡(x)cos⁡(y)=sin⁡(y+x)−sin⁡(y−x)2cos⁡(x)sin⁡(x)=sin⁡(2x)2sin⁡2(x)=1−cos⁡(2x)2=1−cos⁡2xcos⁡2(x)=1+cos⁡(2x)2=1−sin⁡2x\begin{aligned} \sin(x)\sin(y)&=\frac{\cos(y-x)-\cos(y+x)}2\\ \cos(x)\cos(y)&=\frac{\cos(y-x)+\cos(y+x)}2\\ \sin(x)\cos(y)&=\frac{\sin(y+x)-\sin(y-x)}2\\ \cos(x)\sin(x)&=\frac{\sin(2x)}2 \\ \sin^2(x)&=\frac{1-\cos(2x)}2=1-\cos^2x\\ \cos^2(x)&=\frac{1+\cos(2x)}2=1-\sin^2x\\ \end{aligned}

Integration by Parts

Reversing the Product Rule
Recall the Product Rule:
(f⋅g)′=f⋅g′+f′⋅g{(f\cdot g)}^\prime=f\cdot g^\prime+f^\prime\cdot g
Moving things around, we get this:
f⋅g′=(f⋅g)′−f′⋅gf\cdot g^\prime={(f\cdot g)}^\prime-f^\prime\cdot g
Integrating both sides gives us this rule:

∫u⋅v′  dx=uv−∫u′⋅v  dx\int{u\cdot v^\prime}\;dx=uv-\int{u^\prime\cdot v}\;dx

This is helpful when the integrand can be expressed as u⋅v′u\cdot v^\prime, where u′⋅vu^\prime\cdot v is easier to integrate.
Picking an appropriate uu and v′v^\prime:
uu should become simpler - or at least, not more complicated when differentiating.
v′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′v^\prime.
Specifically: xnx^n should be uu, not v′v^\prime.

Example of Integration by Parts: ∫xex  dx\int{xe^x}\;dx

Given ∫xex  dx\int{xe^x}\;dx.
We want to express xexxe^x as u⋅v′u\cdot v^\prime, so we choose u=xu=x, and v′=exv^\prime=e^x.

u=xu=x v=exv=e^x
u′=1u^\prime=1 v′=exv^\prime=e^x

Applying the above formula, we get:

xex−∫ex  dx=xex=ex+Cxe^x-\int{e^x}\;dx=xe^x=e^x+C

June 7 Lecture. Links to the board and the recording.

Algebraic Methods for Integrating a Rational Function

∫P(x)Q(x)  dx\int\frac{P(x)}{Q(x)}\;dx

First, let’s look at simple rationals that don’t need any special methods:

Simple example: ∫x+4x2+7  dx\int{\frac{x+4}{x^2+7}}\;dx

Break up x+4x2+7\frac{x+4}{x^2+7}:

x+4x2+7=xx2+7+4x2+7\frac{x+4}{x^2+7}=\frac{x}{x^2+7}+\frac{4}{x^2+7}

Therefore,

∫x+4x2+7  dx=∫xx2+7  dx+∫4x2+7  dx\int{\frac{x+4}{x^2+7}}\;dx=\int{\frac{x}{x^2+7}}\;dx+\int{\frac{4}{x^2+7}}\;dx
Simple example: ∫x+x3x4+2x2  dx\int{\frac{x+x^3}{x^4+2x^2}}\;dx

Notice that the derivative of the denominator is 4x3+4x=4(x+x3)4x^3+4x=4(x+x^3), which is 44 times the numerator.

∫x+x3x4+2x2  dx=14∫4(x+x3)x4+2x2  dx\int{\frac{x+x^3}{x^4+2x^2}}\;dx=\frac14\int{\frac{4(x+x^3)}{x^4+2x^2}}\;dx

Substitute u=x4+2x2,  du=4(x+x3)dxu=x^4+2x^2,\; du=4(x+x^3)dx

14∫duu=14ln⁡∣u∣+C\frac14\int{\frac{du}{u}}=\frac14\ln|u|+C

Un-substitute

14ln⁡∣u∣+C=14ln⁡∣x4+2x2∣+C=14ln⁡(x4+2x2)+C\frac14\ln|u|+C=\frac14\ln|x^4+2x^2|+C=\frac14\ln(x^4+2x^2)+C
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 ∫x4x2+4\int\frac{x^4}{x^2+4}

First divide: x4x2+4=x2−4+16x2+4\frac{x^4}{x^2+4}=x^2-4+\frac{16}{x^2+4}
Then integrate:

∫x2−4+16x2+4  dx=∫x2  dx−∫4  dx+16∫1x2+4  dx\int{x^2-4+\frac{16}{x^2+4}}\;dx=\int{x^2}\;dx-\int4\;dx+16\int{\frac{1}{x^2+4}}\;dx

These are now simple integrals that we know how to solve.

Not-So-Simple Example ∫3x−4x2+2x+5  dx\int{\frac{3x-4}{x^2+2x+5}}\;dx

We “complete the square” in the denominator, so we get the form ∫3x+4(x+a)2+b\int\frac{3x+4}{(x+a)^2+b}
x2+2x+5=(x2+2x+1)+4=(x+1)2+4x^2+2x+5=(x^2+2x+1)+4=(x+1)^2+4
Substitute u=x+1  du=1dxu=x+1\;du=1dx
x=u−1  ⟹  3x−4=3(u−1)−4=3u−7x=u-1\implies3x-4=3(u-1)-4=3u-7

∫3x−4x2+2x+5  dx=∫3u−7u2+4  du\int{\frac{3x-4}{x^2+2x+5}}\;dx=\int{\frac{3u-7}{u^2+4}}\;du

Summary of method:
Complete the square in the denominator to change it from x2+ax+bx^2+ax+b to u2+cu^2+c
This only works if the denominator Q(x)>0Q(x)>0 for all xx — 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 Ax+B(Cx+D)(Mx+N)\frac{Ax+B}{(Cx+D)(Mx+N)} can be broken down as PCx+D+QMx+N\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
20(2x+1)(x−2)=P(x−2)2x+1+Q(2x−1)(x−2)=(P+2Q)x+(−2P+Q)(2x+1)(x−2)\frac{20}{(2x+1)(x-2)}=\frac{P(x-2)}{2x+1}+\frac{Q(2x-1)}{(x-2)}=\frac{(P+2Q)x+(-2P+Q)}{(2x+1)(x-2)}

Therefore, (P+2Q)x+(−2P+Q)=20(P+2Q)x+(-2P+Q)=20
Comparing coefficients across numerators, we get:

P+2Q=0−2P+Q=20\begin{aligned}P+2Q&=0\\-2P+Q&=20\end{aligned}

Solving for PP and QQ, we get Q=4,  P=−8Q=4,\;P=-8. Plugging them into our desired form:

20(2x+1)(x−2)=−82x+1+4x−2\frac{20}{(2x+1)(x-2)}=\frac{-8}{2x+1}+\frac{4}{x-2}

The integrals of the summands are much easier to calculate.

If the denominator has more than two factors:

Ax+B(Cx+D)(Mx+N)(Sx+T)=PCx+D+QMx+N+RSx+T\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. (deg(numerator)≤deg(denominator)−1){(\text{deg}(numerator)≤\text{deg}(denominator)-1)}. If the denominator is an irreducible polynomial of degree 2, set the numerator as degree 1. (Ax+BAx+B)