# Primitive function/Substitution/Section
## Theorem

Suppose that $I$ denotes a real interval, and let
    $f\colon I\longrightarrow \mathbb {R}$
denote a continuous function. Let
    $g\colon [a,b]\longrightarrow I$
be a continuously differentiable function. Then
    $\int _{a}^{b}f(g(t))g'(t)\,dt=\int _{g(a)}^{g(b)}f(s)\,ds\,$

### Proof

Since $f$ is continuous and $g$ is continuously differentiable, both integrals exist. Let $F$ denote a primitive function for $f$, which exists, due to fact. Because of the chain rule, the composite function
    $t\mapsto F(g(t))=(F\circ g)(t)\,$
has the derivative $F'(g(t))g'(t)=f(g(t))g'(t)$. Therefore,
    $\int _{a}^{b}f(g(t))g'(t)\,dt=(F\circ g)|_{a}^{b}=F(g(b))-F(g(a))=F|_{g(a)}^{g(b)}=\int _{g(a)}^{g(b)}f(s)\,ds\,.$
$\Box$

## Example

Typical examples, where one sees immediately that one can apply substitution, are
    $\int g^{n}g',$
with the primitive function
    ${\frac {1}{n+1}}g^{n+1}$
or
    $\int {\frac {g'}{g}},$
with the primitive function
    $\ln g.$
Often, the indefinite integral is not in a form where one can apply the preceding rule directly. Then the following variant is more appropriate.

## Corollary

Suppose that
    $f\colon [a,b]\longrightarrow \mathbb {R}$
is a continuous function, and let
    $\varphi \colon [c,d]\longrightarrow [a,b],s\longmapsto \varphi (s),$
denote a bijective continuously differentiable function. Then
    $\int _{a}^{b}f(t)\,dt=\int _{\varphi ^{-1}(a)}^{\varphi ^{-1}(b)}f(\varphi (s))\cdot \varphi '(s)\,ds\,$

### Proof

Because of fact, we have
    $\int _{\varphi ^{-1}(a)}^{\varphi ^{-1}(b)}f(\varphi (s))\varphi '(s)\,ds=\int _{\varphi {\left(\varphi ^{-1}(a)\right)}}^{\varphi {\left(\varphi ^{-1}(b)\right)}}f(t)\,dt=\int _{a}^{b}f(t)\,dt\,.$
$\Box$

## Remark

The substitution is applied in the following way: suppose that the integral
    $\int _{a}^{b}f(t)\,dt$
has to be computed. Then one needs an idea that the integral gets simpler by the substitution
    $t=\varphi (s)\,$
(taking into account the derivative $\varphi '(s)$ and that the inverse function $\varphi ^{-1}$ has to be determined). Setting $c=\varphi ^{-1}(a)$ and $d=\varphi ^{-1}(b)$, we have the situation
    $[c,d]{\stackrel {\varphi }{\longrightarrow }}[a,b]{\stackrel {f}{\longrightarrow }}\mathbb {R} .$
In certain cases, some standard substitutions help.
In order to make a substitution, three operations have to be done.
* Replace $f(t)$ by $f(\varphi (s))$.
* Replace $dt$ by $\varphi '(s)ds$.
* Replace the integration bounds $a$ and $b$ by $\varphi ^{-1}(a)$ and $\varphi ^{-1}(b)$.
To remember the second step, think of
    $dt=d\varphi (s)=\varphi '(s)ds\,,$
which in the framework "differential forms“, has a meaning.

## Example

The upper curve of the unit circle is the set
    ${\left\{(x,y)\mid x^{2}+y^{2}=1,\,-1\leq x\leq 1,\,y\geq 0\right\}}.$
For a given $x$, $-1\leq x\leq 1$, there exists exactly one $y$ fulfilling this condition, namely $y={\sqrt {1-x^{2}}}$. Hence, the area of the upper half of the unit circle is the area beneath the graph of the function $x\mapsto {\sqrt {1-x^{2}}}$, above the interval $[-1,1]$, that is
    $\int _{-1}^{1}{\sqrt {1-x^{2}}}\,dx.$
Applying substitution with
    $x=\cos t{\text{ and }}t=\arccos x$
(where $\cos :[0,\pi ]\rightarrow [-1,1]$ is bijective, due to fact), we obtain, using example, the identities
    ${\begin{aligned}\int _{a}^{b}{\sqrt {1-x^{2}}}\,dx&=\int _{\arccos a}^{\arccos b}{\sqrt {1-\cos ^{2}t}}(-\sin t)\,dt\\&=-\int _{\arccos a}^{\arccos b}\sin ^{2}t\,dt\\&={\frac {1}{2}}(\sin t\cos t-t)|_{\arccos a}^{\arccos b}.\end{aligned}}$
In particular, we get that
    ${\frac {1}{2}}{\left(x\cdot \sin {\left(\arccos x\right)}-\arccos x\right)}={\frac {1}{2}}{\left(x\cdot {\sqrt {1-x^{2}}}-\arccos x\right)}\,$
is a primitive function for ${\sqrt {1-x^{2}}}$. Therefore,
    ${\begin{aligned}\int _{-1}^{1}{\sqrt {1-x^{2}}}\,dx&={\frac {1}{2}}{\left(x\cdot {\sqrt {1-x^{2}}}-\arccos x\right)}|_{-1}^{1}\\&={\frac {1}{2}}(-\arccos 1+\arccos(-1))\\&=\pi /2.\end{aligned}}$