TITLE: Question about substitution in solving integrals
QUESTION [5 upvotes]: In high school I learned that if I want to solve
$$
\int_0^R f(x) dx 
$$
we can do $x = \psi (\theta)$ and $dx = \psi'(\theta) d \theta$ and the integral becomes
$$
\int_0^R f(x) dx = \int_{a_1}^{a_2} f(\psi(\theta)) \psi'(\theta) d \theta, 
$$
say. Depending on $f$ and a suitable choice of $\psi$, this second integral can be easier to solve. Here $\psi(a_1)= 0$ and $\psi(a_2) = R$.
My question. Does the end point matter as long as it the values of $\psi$ are $0$ and $R$?
In other words, can I pick any other two points $b_1$ $b_2$ such that $\psi(b_1) = 0$ and $\psi(b_2) = R$ and we have
$$
\int_0^R f(x) dx = \int_{b_1}^{b_2} f(\psi(\theta)) \psi'(\theta) d \theta? 
$$

REPLY [4 votes]: The change-of-variables theorem for Riemann integration specifies that
$$\tag{*}\int_{\psi(b_1)}^{\psi(b_2)}f(x) \, dx =  \int_{b_1}^{b_2} f(\psi(\theta)) \,\psi'(\theta) \,d \theta,$$
under suitable conditions on $f$ and $\psi$. Strong conditions for which this holds are that $f$ is continuous and $\psi$ is continuously differentiable on $[b_1,b_2]$ with $\psi([b_1,b_2])$ contained in the domain of $f$.   Furthermore, the conditions can be weakened somewhat. For example, we can drop the requirement of continuity for $f$ and replace it with Riemann integrability as long as $\psi$ is restricted appropriately, as discussed here.
As far as your question is concerned, the limits of integration on the left side of (*)  will be $0$ and $R$ for the pair of functions $f$ and $\psi$, when $\psi(b_1) = 0$ and $\psi(b_2) = R$. However, the behavior of $\psi$ over the entire interval $b_1$ and $b_2$ must meet the requirements (strong or weak) for which the theorem holds.  Basically this means that the product of  the composition and the derivative $(f \circ \psi)\psi'$ must be integrable over $[b_1,b_2]$. If for another interval $[a_1,a_2]$ we have $\psi(a_1) = 0 $ and $\psi(a_2) = R$, then as long as the inegrability requirement is met, we will have
$$\tag{*}\int_{0}^{R}f(x) \, dx =  \int_{a_1}^{a_2} f(\psi(\theta)) \,\psi'(\theta) \,d \theta,$$