# Primitive function/Definite integral/Examples and remarks/Section
## Notation

Let $I$ denote a real interval, and
    $F\colon I\longrightarrow \mathbb {R}$
a primitive function for a function $f\colon I\rightarrow \mathbb {R}$. Suppose that $a,b\in I$. Then one sets
    $F|_{a}^{b}:=F(b)-F(a)=\int _{a}^{b}f(t)\,dt\,.$
This notation is basically used for computations, in particular, when we want to determine definite integrals.
Using known results about the derivatives of differentiable functions, we obtain a list of primitive functions for some important functions. In general however, it is difficult to find a primitive function.
The primitive function of $x^{a}$, where $x\in \mathbb {R} _{+}$ and $a\in \mathbb {R}$, $a\neq -1$, is ${\frac {1}{a+1}}x^{a+1}$.

## Example

Suppose that the distance between two masses (thought of as mass points) $M$ and $m$ is $R_{0}$. Because of gravitation, this system contains a certain potential energy. How is this potential energy changing, when we move these masses to a distance
$R_{1}\geq R_{0}$?
The needed energy is force times path, where the force itself depends on the distance between the masses. Due to the gravitation law, the force, given the distance $r$ between the masses, equals
    $F(r)=\gamma {\frac {Mm}{r^{2}}}\,,$
where $\gamma$ denotes the constant of gravitation. Therefore, the energy needed to increase the distance from $R_{0}$ to $R_{1}$, equals
    $E=\int _{R_{0}}^{R_{1}}\gamma {\frac {Mm}{r^{2}}}\,dr=\gamma Mm\int _{R_{0}}^{R_{1}}{\frac {1}{r^{2}}}\,dr=\gamma Mm{\left(-{\frac {1}{r}}|_{R_{0}}^{R_{1}}\right)}=\gamma Mm{\left({\frac {1}{R_{0}}}-{\frac {1}{R_{1}}}\right)}\,.$
Hence it is possible to assign a value to the difference between the potential energies for the two distances $R_{0}$ and $R_{1}$, though it is not possible to assign an absolute value to the potential energy for a given distance.
The primitive function of the function ${\frac {1}{x}}$ is the natural logarithm.
The primitive function of the exponential function is the exponential function itself.
The primitive function of $\sin x$ is $-\cos x$, the primitive function of $\cos x$ is $\sin x$.
The primitive function of ${\frac {1}{1+x^{2}}}$ is $\arctan x$, due to fact.
The primitive function of ${\frac {1}{1-x^{2}}}$ (for $x\in{-1},1$) is ${\frac {1}{2}}\ln {\frac {1+x}{1-x}}$, because we have
    ${\begin{aligned}{\left({\frac {1}{2}}\cdot \ln {\frac {1+x}{1-x}}\right)}^{\prime }&={\frac {1}{2}}\cdot {\frac {1-x}{1+x}}\cdot {\frac {(1-x)+(1+x)}{(1-x)^{2}}}\\&={\frac {1}{2}}\cdot {\frac {2}{(1+x)(1-x)}}\\&={\frac {1}{(1-x^{2})}}.\end{aligned}}$
Caution! Integration rules are only applicable for functions, which are defined on the whole interval. In particular, the following is not true
    $\int _{-a}^{a}{\frac {dt}{t^{2}}}\,dt=-{\frac {1}{x}}|_{-a}^{a}=-{\frac {1}{a}}-{\frac {1}{a}}=-{\frac {2}{a}}\,,$
since we integrate over a point where the function is not defined.

## Example

We consider the function
    $f\colon \mathbb {R} \longrightarrow \mathbb {R} ,t\longmapsto f(t),$
given by
    $f(t):={\begin{cases}0{\text{ for }}t=0,\\{\frac {1}{t}}\sin {\frac {1}{t^{2}}}{\text{ for }}t\neq 0\,.\end{cases}}\,$
This function is not Riemann-integrable, because it it neither bounded from above nor from below. Hence, there exist no upper step functions for $f$. However, $f$ still has a primitive function. To see this, we consider the function
    $H(t):={\begin{cases}0{\text{ for }}t=0,\\{\frac {t^{2}}{2}}\cos {\frac {1}{t^{2}}}{\text{ for }}t\neq 0\,.\end{cases}}\,$
This function is differentiable. For $t\neq 0$, the derivative is
    $H'(t)=t\cos {\frac {1}{t^{2}}}+{\frac {1}{t}}\sin {\frac {1}{t^{2}}}\,.$
For $t=0$, the difference quotient is
    ${\frac {{\frac {h^{2}}{2}}\cos {\frac {1}{h^{2}}}}{h}}={\frac {h}{2}}\cos {\frac {1}{h^{2}}}\,.$
For $h\mapsto 0$, the limit exists and equals $0$, so that $H$ is differentiable everywhere (but not continuously differentiable). The first summand in $H'$ is continuous, and therefore, due to fact, it has a primitive function $G$. Hence $H-G$ is a primitive function for $f$. This follows for $t\neq 0$ from the explicit derivative and for $t=0$ from
    $H'(0)-G'(0)=0-0=0\,.$