# Primitive function and Riemann-Integral/1 over x sin 1 over x^2/Example

We consider the function

${\displaystyle f\colon \mathbb {R} \longrightarrow \mathbb {R} ,t\longmapsto f(t),}$

given by

$cases}"): {\displaystyle {{}} f(t) := \begin{cases} 0 \text{ for } t [[Category:Wikiversity soft redirects|Primitive function and Riemann-Integral/1 over x sin 1 over x^2/Example]] __NOINDEX__ 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 ${\displaystyle {}f}$. However, ${\displaystyle {}f}$ still has a primitive function. To see this, we consider the function

$cases}"): {\displaystyle {{}} H(t) := \begin{cases} 0 \text{ for } t [[Category:Wikiversity soft redirects|Primitive function and Riemann-Integral/1 over x sin 1 over x^2/Example]] __NOINDEX__ 0, \\ \frac{ t^2}{2} \cos \frac{1}{t^2} \text{ for } t \neq 0 \, .\end{cases} \,$

This function is differentiable. For ${\displaystyle {}t\neq 0}$, the derivative is

${\displaystyle {}H'(t)=t\cos {\frac {1}{t^{2}}}+{\frac {1}{t}}\sin {\frac {1}{t^{2}}}\,.}$

For ${\displaystyle {}t=0}$, the difference quotient is

${\displaystyle {}{\frac {{\frac {h^{2}}{2}}\cos {\frac {1}{h^{2}}}}{h}}={\frac {h}{2}}\cos {\frac {1}{h^{2}}}\,.}$

For ${\displaystyle {}h\mapsto 0}$, the limit exists and equals ${\displaystyle {}0}$, so that ${\displaystyle {}H}$ is differentiable everywhere (but not continuously differentiable). The first summand in ${\displaystyle {}H'}$ is continuous, and therefore, due to

it has a primitive function ${\displaystyle {}G}$. Hence ${\displaystyle {}H-G}$ is a primitive function for ${\displaystyle {}f}$. This follows for ${\displaystyle {}t\neq 0}$ from the explicit derivative and for ${\displaystyle {}t=0}$ from

${\displaystyle {}H'(0)-G'(0)=0-0=0\,.}$