9. Indefinite integral

Part 1: Problems, solutions.
Part 2: Problems, solutions.
Part 3: Problems, solutions.


Given a function f, we try to find a function F such that F'(x)=f(x), called antiderivative of f. Such a function may not exist, but it certainly exists if f is continuous. If if exists, there exist infinitely many of them. Indeed, if F(x) is an antiderivative of f, then F(x)+C, where C is an arbitrary constant, also is an antiderivative, because (F(x)+C)'=F'(x)=f(x).

The set of all antiderivatives of f, will be called its indefinite integral and denoted by \int f(x)\,dx. We know how to calculate derivatives, so we can also easily guess integrals of some simple functions. E.g: \int 5x^2=\frac{5x^3}{3}, because \left(\frac{5x^3}{3}\right)'=5x^2.

It is worth noticing that:

    \[\int x^a\,dx=\frac{x^{a+1}}{a+1}+C,\]

if a\neq -1, and:

    \[\int \frac{dx}{x}=\ln |x|+C,\]

it is also clear that:

    \[\int e^x\,dx = e^x+C,\]

    \[\int \sin x\,dx = -\cos x+C,\]

    \[\int \cos x\,dx = \sin x+C,\]

    \[\int \frac{dx}{\sqrt{1-x^2}} = \arcsin x+C,\]

    \[\int \frac{dx}{1+x^2} = \text{arctg} x+C.\]

Therefore, e.g.:

    \[\int \frac{x^2+\sqrt{x}\cos x}{\sqrt{x}}\,dx=\int \left(x^{\frac{3}{2}}+\cos x\right)\, dx=\frac{2 x^{\frac{5}{2}}}{5}+\sin x+C.\]

If we additionally assume that we are looking for a function such that F(0)=1, then we know that C=1.

Integration by parts

But sometimes it is hard to guess a function such that the function we would like to integrate is its derivative. There are two methods which may make it easier, but even those methods require some guessing.

The first one is called the integration by parts. Recall that (fg)'=f'g+g'f, therefore fg=\int (fg)'\,dx=\int(f'g+g'f)\,dx=\int f'g\,dx +\int g'f\, dx. And so:

    \[\int f'(x)g(x)\, dx=f(x)g(x)-\int g'(x)f(x)\,dx.\]

— and this is the theorem of integration by parts.

How to use it? It may happen that we are not able to guess the left-hand side integral, but the right-hand side integral is easy. Usually the hard part is to guess what are the functions f'(x) i g(x).

E.g, let us calculate \int\ln x\,dx. We need to write \ln x as f'(x)g(x). Let therefore f(x)=x (so f'(x)=1) and g(x)=\ln x. Then: \ln x=1\cdot\ln x=f'(x)g(x). Now we use the theorem and get :

    \[\int \ln x\,dx=f(x)g(x)-\int g'(x)f(x)\,dx=\]

    \[=x\ln x-\int\frac{1}{x}\cdot x\, dx=x\ln x-\int 1\, dx=\]

    \[=x\ln x-x+C.\]

Integration by substitution

The second method is called integration by substitution. This time we make use of the formula for integrating composition of functions. Recall that (F(t(x))'=t'(x)F'(t(x))=t'(x)f(t(x)), where F is an antiderivative of f, so F(t)=\int f(t) dt. Therefore, \int f(t)\, dt= F(t)= \int F'(t)\, dx=\int f(t(x))t'(x)\, dx. So finally:

    \[\int f(t(x))t'(x)\, dx=\int f(t)\, dt.\]

It looks quite complicated but it is easy to use. E.g. let us calculate \int 3x^2\sin x^3\, dx — it is easy to see what substitution we should use. Simply let f(t)=\sin t and t(x)=x^3, then t'(x)=3x^2 and 3x^2\sin x^3= t'(x)f(t(x)). It may be even convenient to use the traditional notation of the derivative: \frac{dt}{dx}=3x^2. Therefore (remember to use substitute back x at the end):

    \[\int 3x^2\sin x^3\, dx=\int \sin t\, dt=-\cos t+C=-\cos x^3+C.\]

sin x^3\, dx=\int \sin t\, dt=-\cos t+C=-\cos x^3+C.\]

Integrating rational functions

Rational functions can be integrated by a following method. First we will have to put a given rational function into a form of a sum of simple fractions i.e. functions of form:




where the polynomial in the denominator has no roots (\Delta<0), and then we will only need to know how to integrate simple fractions.

How to calculated simple fractions from a given ration functions? Those fractions are given by multiplicative form of the polynomial in the denominator. E.g. if:

    \[f(x)=\frac{5x^2-11x}{x^4-2 x^3+3 x^2-4 x+2},\]

first we should notice that x^4-2 x^3+3 x^2-4 x+2=(x-1)^2(x^2+2), and then we know that:

    \[\frac{5x^2-11x}{x^4-2 x^3+3 x^2-4 x+2}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Cx+D}{x^2+2},\]

and we can calculate A, B, C, D summing the right side of the equation — in this case A=1, B=-2, C=-1, D=6.

So now we shall calculate integrals of those simple fractions


are easy, because we know that

    \[\int \frac{A}{(x-a)^n}\, dx=\begin{cases}A\ln|x-a|+C & n=1\\ \frac{-A}{(n-1)(x-a)^{n-1}} & n>1\end{cases}.\]

The second type of simple fractions:


are more complicated.
Notice, that:

    \[\int\frac{Bx+C}{(x^2+px+q)^n}\,dx=\frac{B}{2}\int \frac{2x+p}{(x^2+px+q)^n}\,dx+\left(C-\frac{Bp}{2}\right)\int\frac{dx}{(x^2+px+q)^n}.\]

and again the first integral is easy, because:

    \[\int \frac{2x+p}{(x^2+px+q)^n}\,dx=\begin{cases}\ln(x^2+px+q)+C & n=1\\ \frac{-1}{(n-1)(x^2+px+q)^{n-1}} & n>1\end{cases}.\]

As for the second one we will need a following tricky substitution t=\frac{x+\frac{p}{2}}{\sqrt{-\Delta/4}}, then \frac{dt}{dx}=\frac{1}{\sqrt{-\Delta/4}} and x^2+px+q=-\frac{\Delta}{4}(t^2+1), and so:

    \[\int\frac{dx}{(x^2+px+q)^n}=\int \frac{\sqrt{-\Delta/4}}{((t^2+1)\cdot (-\Delta/4))^n}\,dt= \left(\frac{-\Delta}{4}\right)^{-n+\frac{1}{2}}\int\frac{dt}{(1+t^2)^n},\]

Finally \int\frac{dt}{(1+t^2)^n} can be easily calculated for n=1, because:

    \[\int\frac{dt}{1+t^2}=\text{arctg} t+C,\]

and for larger n, we have the following formula which can be deduced from the integration by parts:


Examples of integration of some rational functions can be found in the second part of exercises.

Substitutions leading to a rational function

Many functions can be changed to a rational function by some simple substitutions. The following substitutions can be used:

  • if we deal with a fraction with x and expressions of form \sqrt[n]{\frac{ax+b}{cx+d}}, we can substitute t= \sqrt[n]{\frac{ax+b}{cx+d}},
  • if we deal with a fraction with e^x to any powers, we can use substitution t=e^x,
  • if we deal with a fraction with \sin x and \cos x, it makes sense to substitute t=\text{tg}\frac{x}{2}. Then \frac{dt}{dx}=\frac{1+\text{tg}^2 \frac{x}{2}}{2}=\frac{1+t^2}{2} and \sin x=\frac{2t}{1+t^2}, \cos x=\frac{1-t^2}{1+t^2} (by trigonometric transformations).



we substitute t=e^x and get:


    \[=\ln|t|-\frac{1}{2}\int\frac{2t\,dt}{t^2+1}=\ln|t|-\frac{\ln (t^2+1)}{2}+C=\ln e^x-\frac{\ln (e^{2x}+1)}{2}+C.\]