© Springer Nature Switzerland AG 2018
Michael Oberguggenberger and Alexander OstermannAnalysis for Computer ScientistsUndergraduate Topics in Computer Sciencehttps://doi.org/10.1007/978-3-319-91155-7_10

10. Antiderivatives

Michael Oberguggenberger1   and Alexander Ostermann1  
(1)
University of Innsbruck, Innsbruck, Austria
 
 
Michael Oberguggenberger (Corresponding author)
 
Alexander Ostermann
The derivative of a function $$y = F(x)$$ describes its local rate of change, i.e. the change $$\varDelta y$$ of the y-value with respect to the change $$\varDelta x$$ of the x-value in the limit $$\varDelta x \rightarrow 0$$; more precisely
$$ f(x) = F'(x) = \lim _{\varDelta x \rightarrow 0}\frac{\varDelta y}{\varDelta x} = \lim _{\varDelta x \rightarrow 0}\frac{F(x + \varDelta x) - F(x)}{\varDelta x}. $$
Conversely, the question about the reconstruction of a function F from its local rate of change f leads to the notion of indefinite integrals which comprises the totality of all functions that have f as their derivative, the antiderivatives of f. Chapter 10 addresses this notion, its properties, some basic examples and applications.
By multiplying the rate of change f(x) with the change $$\varDelta x$$ one obtains an approximation to the change of the values of the function of the antiderivative F in the segment of length $$\varDelta x$$:
$$ \varDelta y = F(x + \varDelta x) - F(x)\approx f(x)\varDelta x. $$
Adding up these local changes in an interval, for instance between $$x=a$$ and $$x=b$$ in steps of length $$\varDelta x$$, gives an approximation to the total change $$F(b) - F(a)$$. The limit $$\varDelta x \rightarrow 0$$ (with an appropriate increase of the number of summands) leads to the notion of the definite integral of f in the interval [ab], which is the subject of Chap. 11.

10.1 Indefinite Integrals

In Sect. 7.​2 it was shown that the derivative of a constant is zero. The following proposition shows that the converse is also true.

Proposition 10.1

If the function F is differentiable on (ab) and $$F'(x) = 0$$ for all $$x \in (a, b)$$ then F is constant. This means that $$F(x) = c$$ for a certain $$c \in \mathbb R$$ and all $$x \in (a, b)$$.

Proof

We choose an arbitrary $$x_0 \in (a, b)$$ and set $$c = F(x_0)$$. If now $$x \in (a, b)$$ then, according to the mean value theorem (Proposition 8.​4),
$$ F(x) - F(x_0) = F'(\xi ) (x - x_0) $$
for a point $$\xi $$ between x and $$x_0$$. Since $$F'(\xi ) = 0$$ it follows that $$F(x) = F(x_0) = c$$. This holds for all $$x \in (a, b)$$, consequently F has to be equal to the constant function with value c.    $$\square $$

Definition 10.2

(Antiderivatives)   Let f be a real-valued function on an interval (ab). An antiderivative of f is a differentiable function F: $$(a, b) \rightarrow \mathbb R$$ whose derivative $$F'$$ equals f.

Example 10.3

The function $$F(x) = \frac{x^3}{3}$$ is an antiderivative of $$f(x) = x^2$$, as is $$G(x) = \frac{x^3}{3} +5$$.

Proposition 10.1 implies that antiderivatives are unique up to an additive constant.

Proposition 10.4

Let F and G be antiderivatives of f in (ab). Then $$F(x) = G(x) + c$$ for a certain $$c \in \mathbb R$$ and all $$x \in (a, b)$$.

Proof

Since $$F'(x) - G'(x) = f(x) - f(x) = 0$$ for all $$x \in (a, b)$$, an application of Proposition 10.1 gives the desired result.    $$\square $$

Definition 10.5

(Indefinite integrals)   The indefinite integral
$$ \int \! f(x) \,{\mathrm{d}}x $$
denotes the totality of all antiderivatives of f.
Once a particular antiderivative F has been found, one writes accordingly
$$ \int \! f(x) \,{\mathrm{d}}x = F(x) + c. $$

Example 10.6

The indefinite integral of the quadratic function (Example 10.3) is $$\int x^2 \,{\mathrm{d}}x = \frac{x^3}{3} + c$$.

Example 10.7

(a) An application of indefinite integration to the differential equation of the vertical throw: Let w(t) denote the height (in metres [m]) at time t (in seconds [s]) of an object above ground level $$(w = 0)$$. Then
$$ w'(t) = v(t) $$
is the velocity of the object (positive in upward direction) and
$$ v'(t) = a(t) $$
the acceleration (positive in upward direction). In this coordinate system the gravitational acceleration
$$ \mathrm{g}= 9.81\, [\mathrm{m}/\mathrm{s}^2] $$
acts downwards, consequently
$$ a(t) = -\mathrm{g}. $$
Velocity and distance are obtained by inverting the differentiation process
$$\begin{aligned} v(t) = \int \! a(t) \,{\mathrm{d}}t + c_1= & {} -\mathrm{g}t + c_1,\\ w(t) = \int \! v(t) \,{\mathrm{d}}t + c_2= & {} \int (-\mathrm{g}t + c_1) \,{\mathrm{d}}t + c_2 = - \frac{\mathrm{g}}{2} t^2 + c_1 t + c_2, \end{aligned}$$
where the constants $$c_1, c_2$$ are determined by the initial conditions:
$$\begin{aligned} c_1= & {} v(0) \quad \dots \quad \text {initial velocity,}\\ c_2= & {} w(0) \ \ \, \dots \quad \text {initial height}. \end{aligned}$$
(b) A concrete example—the free fall from a height of 100 m. Here
$$ w(0) = 100, \quad v(0) = 0 $$
and thus
$$ w(t) = -\frac{1}{2} \, 9.81 t^2 + 100. $$
The travelled distance as a function of time (Fig. 10.1) is given by a parabola.
images/215236_2_En_10_Chapter/215236_2_En_10_Fig1_HTML.gif
Fig. 10.1

Free fall: travelled distance as function of time

The time of impact $$t_0$$ is obtained from the condition $$w(t_0)=0$$, i.e.
$$ 0 = -\frac{1}{2}\, 9.81 t_0^2 + 100, \quad t_0 = \sqrt{200/9.81} \ \approx \ 4.5\, [\mathrm{s}], $$
the velocity at impact is
$$ v(t_0) = - \mathrm{g}t_0 \ \approx \ 44.3\, [\mathrm{m/s}] \ \approx \ 160 \,[\mathrm{km/h}]. $$

10.2 Integration Formulas

It follows immediately from Definition 10.5 that indefinite integration can be seen as the inversion of differentiation. It is, however, only unique up to a constant:
$$\begin{aligned} \left( \int \! f(x) \,{\mathrm{d}}x\right) '= & {} f(x),\\ \int \! g'(x)\,{\mathrm{d}}x= & {} g(x) + c. \end{aligned}$$
With this consideration and the formulas from Sect. 7.​4 one easily obtains the basic integration formulas stated in the following table. The formulas are valid in the according domains.
Table 10.1

Integrals of some elementary functions

$$\ f(x)\ $$

$$ x^{\alpha }, \ \alpha \ne -1\ \,$$

$$\displaystyle \frac{1^{}}{x_{}} $$

$$\mathrm{e}^x$$

$$a^x$$

$$\displaystyle \int \!f(x)\,{\mathrm{d}}x\ $$

$$\displaystyle \frac{{x^{\alpha +1}}^{}}{{\alpha +1}_{}} + c$$

$$\log |x| + c $$

$$\mathrm{e}^x + c $$

$$\displaystyle \frac{1}{\log a}\, a^x + c $$

f(x)

$$\sin x$$

$$\cos x$$

$$\displaystyle \frac{1^{}}{{\sqrt{1 - x^2}}_{}}$$

$$\displaystyle \frac{1}{1 + x^2}$$

$$\displaystyle \int \!f(x)\,{\mathrm{d}}x\ $$

$$-\cos x+c{}$$

$$\sin x+c$$

$$\arcsin x + c$$

$$\arctan x + c$$

f(x)

$$\sinh x $$

$$\cosh x$$

$$\displaystyle \frac{1^{}}{{\sqrt{1 + x^2}}_{}}$$

$$\displaystyle \frac{1}{\sqrt{x^2-1}}$$

$$\displaystyle \int \!f(x)\,{\mathrm{d}}x\ $$

$$\cosh x+c{}$$

$$\sinh x+c$$

$${{\text {arsinh}}}\,{x+c}$$

$${{\text {arcosh}}}\,{x+c}$$

The formulas in Table 10.1 are a direct consequence of those in Table 7.​1.

Experiment 10.8

Antiderivatives can be calculated in maple  using the command int. Explanations and further integration commands can be found in the maple   worksheet mp10_1.mws. Experiment with these maple  commands by applying them to the examples of Table 10.1 and other functions of your choice.

Experiment 10.9

Integrate the following expressions
$$ x \mathrm{e}^{-x^2},\quad \mathrm{e}^{-x^2},\quad \sin (x^2) $$
with maple.

Functions that are obtained by combining power functions, exponential functions and trigonometric functions, as well as their inverses, are called elementary functions. The derivative of an elementary function is again an elementary function and can be obtained using the rules from Chap. 7. In contrast to differentiation there is no general procedure for computing indefinite integrals. Not only does the calculation of an integral often turn out to be a difficult task, but there are also many elementary functions whose antiderivatives are not elementary. An algorithm to decide whether a functions has an elementary indefinite integral was first deduced by Liouville1 around 1835. This was the starting point for the field of symbolic integration . For details, we refer to [7].

Example 10.10

(Higher transcendental functions)   Antiderivatives of functions that do not possess elementary integrals are frequently called higher transcendental functions. We give the following examples:
$$\begin{aligned} \,\,\frac{2}{\sqrt{\pi }} \int \mathrm{e}^{-x^2} \,{\mathrm{d}}x= & {} \text {Erf}(x) + c \quad \, \dots \quad \text {Gaussian error function;}\\ \int \frac{\mathrm{e}^x}{x} \,{\mathrm{d}}x= & {} \mathcal {E}i (x) + c \quad \ \ \dots \quad \text {exponential integral;} \\ \int \frac{1}{\log x} \,{\mathrm{d}}x= & {} \ell i (x) + c \quad \ \ \, \dots \quad \text {logarithmic integral;}\\ \int \frac{\sin x}{x} \,{\mathrm{d}}x= & {} \mathcal {S}i (x) + c \quad \ \ \dots \quad \text {sine integral;}\\ \int \sin \left( \frac{\pi }{2} x^2\right) \,{\mathrm{d}}x= & {} \mathcal {S}(x) + c \quad \ \ \, \dots \quad \text {Fresnel integral}. \end{aligned}$$
2

Proposition 10.11

(Rules for indefinite integration)   For indefinite integration the following rules hold:
  1. (a)

    Sum: $$\int \big (f(x) + g(x)\big ) \,{\mathrm{d}}x = \int f(x) \,{\mathrm{d}}x + \int g(x) \,{\mathrm{d}}x$$

     
  2. (b)

    Constant factor: $$\int \lambda f(x) \,{\mathrm{d}}x = \lambda \int f(x) \,{\mathrm{d}}x$$    $$(\lambda \in \mathbb R)$$

     
  3. (c)
    Integration by parts:
    $$ \int \! f(x) g'(x)\,{\mathrm{d}}x = f(x) g(x) - \int \! f'(x) g(x) \,{\mathrm{d}}x $$
     
  4. (d)
    Substitution:
    $$ \int \! f(g(x)) g'(x) \,{\mathrm{d}}x = \int \! f(y) \,{\mathrm{d}}y \Big | _{y = g(x)}. $$
     

Proof

(a) and (b) are clear; (c) follows from the product rule for the derivative (Sect. 7.​4)
$$\begin{aligned} \int \! f(x)g'(x) \,{\mathrm{d}}x + \int \! f'(x)g(x) \,{\mathrm{d}}x&= \int \bigl (f(x)g'(x) + f'(x)g(x)\bigr ) \,{\mathrm{d}}x\\&= \int \bigl (f(x)g(x)\bigr )' \,{\mathrm{d}}x = f(x)g(x) + c, \end{aligned}$$
which can be rewritten as
$$ \int \! f(x)g'(x) \,{\mathrm{d}}x = f(x)g(x) - \int \! f'(x)g(x) \,{\mathrm{d}}x. $$
In this formula we can drop the integration constant c since it is already contained in the notion of indefinite integrals, which appear on both sides. Point (d) is an immediate consequence of the chain rule according to which an antiderivative of $$f(g(x)) g'(x)$$ is given by the antiderivative of f(y) evaluated at $$y = g(x)$$.    $$\square $$

Example 10.12

The following five examples show how the rules of Table 10.1 and Proposition 10.11 can be applied.

  1. (a)

    $$ \displaystyle \int \frac{\,{\mathrm{d}}x}{\root 3 \of {x}} = \int x^{-1/3} \,{\mathrm{d}}x = \frac{x^{-\frac{1}{3} +1}}{-\frac{1}{3} + 1} + c = \frac{3}{2}\, x^{2/3} + c. $$

     
  2. (b)

    $$ \displaystyle \int x \cos x \,{\mathrm{d}}x = x \sin x - \int \sin x \,{\mathrm{d}}x = x \sin x + \cos x + c,$$

    which follows via integration by parts:
    $$ \begin{array}{rclcrcl} f(x) &{} = &{} x, &{} \ &{} g'(x)&{} = &{}\cos x,\\ f'(x)&{} = &{} 1, &{}\ &{} g(x) &{}= &{}\sin x. \end{array} $$
     
  3. (c)

    $$ \displaystyle \int \log x \,{\mathrm{d}}x = \int 1\cdot \log x \,{\mathrm{d}}x = x \log x - \int \frac{x}{x} \,{\mathrm{d}}x = x \log x - x + c, $$

    via integration by parts:
    $$ \begin{array}{rclcrcl} f(x) &{} = &{} \log x,&{} \ &{}g'(x)&{} =&{} 1,\\ f'(x) &{} = &{} \frac{1}{x},&{} \ &{} g(x)&{} = &{}x. \end{array} $$
     
  4. (d)

    $$\displaystyle \int \! x \sin (x^2) \,{\mathrm{d}}x = \int \frac{1}{2} \sin y \,{\mathrm{d}}y \Big | _{y = x^2} = - \frac{1}{2} \cos y \Big |_{y = x^2} + c = -\frac{1}{2} \cos (x^2) + c,$$

    which follows from the substitution rule with $$y = g(x) = x^2$$, $$g'(x) = 2x$$, $$f(y) = \frac{1}{2} \sin y$$.

     
  5. (e)

    $$\displaystyle \int \tan x \,{\mathrm{d}}x = \int \frac{\sin x}{\cos x} \,{\mathrm{d}}x = - \log |y| \, \Big |_{y = \cos x} + c = - \log \left| \cos x\right| + c,$$

    again after substitution with $$y = g(x) = \cos x$$, $$g'(x) = - \sin x$$ and $$f(y) = - 1/y$$.

     

Example 10.13

(A simple expansion into partial fractions)   In order to find the indefinite integral of $$f(x) = 1/(x^2-1)$$, we decompose the quadratic denominator in its linear factors $$x^2 - 1 = (x-1)(x+1)$$ and expand f(x) into partial fractions of the form
$$ \frac{1}{x^2 - 1} = \frac{A}{x - 1} + \frac{B}{x + 1}. $$
Resolving the fractions leads to the equation $$1 = A(x+1) + B(x-1)$$. Equating coefficients results in
$$ (A + B)x = 0,\quad A-B = 1 $$
with the obvious solution $$A = 1/2$$, $$B = -1/2$$. Thus
$$\begin{aligned} \int \frac{1}{x^2-1}\,\,{\mathrm{d}}x= & {} \frac{1}{2}\left( \int \frac{\,{\mathrm{d}}x}{x-1} - \int \frac{\,{\mathrm{d}}x}{x+1}\right) \\= & {} \frac{1}{2}\Big (\log |x-1| - \log |x+1|\Big ) + C \ =\ \frac{1}{2}\log \left| \frac{x-1}{x+1}\right| + C. \end{aligned}$$
In view of Example 7.​30, another antiderivative of $$f(x) = 1/(x^2-1)$$ is $$F(x) = -{\text {artanh}}x$$. Thus, by Proposition 10.4,
$$ {\text {artanh}}\,x = -\frac{1}{2}\log \left| \frac{x-1}{x+1}\right| + C = \frac{1}{2}\log \left| \frac{x+1}{x-1}\right| + C. $$
Inserting $$x=0$$ on both sides shows that $$C = 0$$ and yields an expression of the inverse hyperbolic tangent in terms of the logarithm.

10.3 Exercises

1.

An object is thrown vertically upwards from the ground with a velocity of $$10\,[\mathrm{m}/\mathrm{s}]$$. Find its height w(t) as a function of time t, the maximum height as well as the time of impact on the ground.

Hint. Integrate $$w''(t) = -\mathrm{g}\approx 9.81\,[\mathrm{m}/\mathrm{s}^2]$$ twice indefinitely and determine the integration constants from the initial conditions $$w(0) = 0, \, w'(0) = 10$$.

2.
Compute the following indefinite integrals by hand and with maple:
$$\begin{aligned}&\text {(a)}\ \displaystyle \int (x + 3x^2 + 5x^4 + 7x^6) \,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int \frac{\,{\mathrm{d}}x}{\sqrt{x}},\\&\text {(c)}\ \displaystyle \int x \mathrm{e}^{-x^2} \,{\mathrm{d}}x \quad \text {(substitution),} \qquad \qquad \text {(d)}\ \int x \mathrm{e}^x \,{\mathrm{d}}x \quad \text {(integration by parts).} \end{aligned}$$
3.
Compute the indefinite integrals
$$ \text {(a)}\ \int \cos ^2 x \,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int \sqrt{1-x^2} \,{\mathrm{d}}x $$
by hand and check the results using maple.
Hints. For (a) use the identity
$$ \cos ^2 x = \frac{1}{2} (1 + \cos 2x); $$
for (b) use the substitution $$y = g(x)= \arcsin x$$, $$f(y) = 1 - \sin ^2 y$$.
4.
Compute the indefinite integrals
$$ \text {(a)}\ \int \frac{\,{\mathrm{d}}x}{x^2+2x+5} \,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int \frac{\,{\mathrm{d}}x}{x^2+2x-3} $$
by hand and check the results using maple.

Hints. Write the denominator in (a) in the form $$(x+1)^2 + 4$$ and reduce it to $$y^2 +1$$ by means of a suitable substitution. Factorize the denominator in (b) and follow the procedure of Example 10.13.

5.
Compute the indefinite integrals
$$ \text {(a)}\ \int \frac{\,{\mathrm{d}}x}{x^2+2x} \,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int \frac{\,{\mathrm{d}}x}{x^2+2x+1} $$
by hand and check the results using maple.
6.
Compute the indefinite integrals
$$ \text {(a)}\ \int x^2\sin x\,\,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int x^2\mathrm{e}^{-3x}\,\,{\mathrm{d}}x. $$
Hint. Repeated integration by parts.
7.
Compute the indefinite integrals
$$ \text {(a)}\ \int \frac{\mathrm{e}^x}{\mathrm{e}^x + 1}\,\,{\mathrm{d}}x, \qquad \qquad \text {(b)}\ \int \sqrt{1+x^2}\,\,{\mathrm{d}}x. $$
Hint. Substitution $$y = \mathrm{e}^x$$ in case (a), substitution $$y = \sinh x$$ in case (b), invoking the formula $$\cosh ^2 y - \sinh ^2 y = 1$$ and repeated integration by parts or recourse to the definition of the hyperbolic functions.
8.
Show that the functions
$$ f(x) = \arctan x\quad \text {and}\quad g(x) = \arctan \frac{1+x}{1-x} $$
differ in the interval $$(-\infty , 1)$$ by a constant. Compute this constant. Answer the same question for the interval $$(1,\infty )$$.
9.

Prove the identity $${\text {arsinh}}x = \log \left( x+\sqrt{1+x^2}\right) $$.

Hint. Recall from Chap. 7 that the functions $$f(x) = {\text {arsinh}}x$$ and $$g(x) = \log \left( x+\sqrt{1+x^2}\right) $$ have the same derivative. (Compare with the algebraic derivation of the formula in Exercise 15 of Sect. 2.​3.)