Finding $\int_0^{\infty} \frac{f(\alpha x)-f(\beta x)}{x}dx$ given $\lim_{x\to 0}f(x)$ and $\lim_{x\to \infty}f(x)$. Problem:

Solution:

$\bf 45. \; (a)\,$ The substitution $u=\alpha x$, $\mathrm{d}u=\alpha\,\mathrm{d}x$ gives $$\int_{\varepsilon}^N\frac{f(\alpha x)}{x}\mathrm{d}x=\int_{\alpha\varepsilon}^{\alpha N}\frac{f(u)}{u}\mathrm{d}u.$$ Similarly, the substitution $u=\beta x$, $\mathrm{d}u=\beta\,\mathrm{d}x$ gives $$\int_{\varepsilon}^N\frac{f(\beta x)}{x}\mathrm{d}x=\int_{\beta\varepsilon}^{\beta N}\frac{f(u)}{u}\mathrm{d}u.$$ So $$\begin{align}\int_{\varepsilon}^N\frac{f(\alpha x)-f(\beta x)}{x}\mathrm{d}x&=\int_{\alpha\varepsilon}^{\alpha N}\frac{f(u)}{u}\mathrm{d}u-\int_{\beta\varepsilon}^{\beta N}\frac{f(u)}{u}\mathrm{d}u\\&=\int_{\alpha\varepsilon}^{\beta\varepsilon}\frac{f(u)}{u}\mathrm{d}u-\int_{\alpha N}^{\beta N}\frac{f(u)}{u}\mathrm{d}u.\end{align}$$ As $\varepsilon\to0$ and $N\to\infty$, this approaches $$\int_{\alpha\varepsilon}^{\beta\varepsilon}\frac{A}{u}\mathrm{d}u-\int_{\alpha N}^{\beta N}\frac{B}{u}\mathrm{d}u=(A-B)\log\frac{\beta}{\alpha}.$$ $\bf (b)\,$ In this case the same substitutions give $$\int_{\varepsilon}^\infty\frac{f(\alpha x)}{x}\mathrm{d}x=\int_{\alpha\varepsilon}^\infty\frac{f(u)}{u}\mathrm{d}u,\qquad\int_{\varepsilon}^\infty\frac{f(\beta x)}{x}\mathrm{d}x=\int_{\beta\varepsilon}^\infty\frac{f(u)}{u}\mathrm{d}u,$$ so $$\int_{\varepsilon}^\infty\frac{f(\alpha x)-f(\beta x)}{x}\mathrm{d}x=\int_{\alpha e}^{\beta\varepsilon}\frac{f(u)}{u}\mathrm{d}u\to A\log\frac{\beta}{\alpha}.$$

I have two questions regarding this solution.
First, how is the substitution $u=\alpha x, du=\alpha dx$ guaranteed to be valid? From my knowledge, the change of variables theorem for integrals work when the function $f(u)/u$ is continuous. This is the version I'm referring to, and all other change of variables theorems share this assumption. So I'm curious how the substitution is valid without the fact that the integrand is continuous.

THEOREM 6.4.6. (Change of Variables Theorem) Suppose that there exists a differentiable function $g:[c,d]\to[a,b]$ such that $g'\in R[c,d]$. Also, suppose that a function $f:[a,b]\to\mathfrak{R}$ is continuous with $a=g(c)$ and $b=g(d)$. Then $$\int_c^d(f\circ g)(x)g'(x)\,\mathrm{d}x=\int_a^bf(x)\,\mathrm{d}x.$$

Finally, I don't follow the final lines in the solution of (a) and (b). 
How do $\int_{\alpha \epsilon}^{\beta \epsilon} \frac{f(u)}{u}du$ and $\int_{\alpha N}^{\beta N} \frac{f(u)}{u}du$ turn into $\int_{\alpha \epsilon}^{\beta \epsilon} \frac{A}{u}du$ and $\int_{\alpha N}^{\beta N} \frac{B}{u}du$ as $\epsilon \to 0$ and $N \to \infty$? I can't give a rigorous argument that this must be the case.
I would immensely appreciate it if anyone could provide me with a rigorous argument to these questions.
 A: The functions with which you are composing are $g(x)=\alpha x$ and $g(x)=\beta x$, and these are both differentiable. Check the proof of the theorem you cite to see where it uses the fact that $f$ needs to be continuous.
For the latter part of the question, since $\alpha,\beta\gt0$, as $\epsilon\to0$, $f(x)\to A$ for $x\in\left[\alpha\epsilon,\beta\epsilon\right]$. Likewise, as $N\to\infty$, $f(x)\to B$ for $x\in\left[\alpha N,\beta N\right]$.

$$
\begin{align}
\int_0^\infty\frac{f(\alpha x)-f(\beta x)}{x}\mathrm{d}x
&=\lim_{\substack{N\to\infty\\\varepsilon\to0}}\int_\varepsilon^N\frac{f(\alpha x)-f(\beta x)}{x}\mathrm{d}x\tag{1}\\
&=\lim_{\substack{N\to\infty\\\varepsilon\to0}}\left[\int_\varepsilon^N\frac{f(\alpha x)}{x}\mathrm{d}x-\int_\varepsilon^N\frac{f(\beta x)}{x}\mathrm{d}x\right]\tag{2}\\
&=\lim_{\substack{N\to\infty\\\varepsilon\to0}}\left[\int_{\alpha\varepsilon}^{\alpha N}\frac{f(x)}{x}\mathrm{d}x-\int_{\beta\varepsilon}^{\beta N}\frac{f(x)}{x}\mathrm{d}x\right]\tag{3}\\
&=\lim_{\substack{N\to\infty\\\varepsilon\to0}}\left[\int_{\alpha\varepsilon}^{\beta\epsilon}\frac{f(x)}{x}\mathrm{d}x-\int_{\alpha N}^{\beta N}\frac{f(x)}{x}\mathrm{d}x\right]\tag{4}\\
&=\lim_{\varepsilon\to0}\int_{\alpha\varepsilon}^{\beta\epsilon}\frac{f(x)}{x}\mathrm{d}x-\lim_{N\to\infty}\int_{\alpha N}^{\beta N}\frac{f(x)}{x}\mathrm{d}x\tag{5}\\[6pt]
&=\log\left(\frac\beta\alpha\right)\lim_{x\to0}f(x)-\log\left(\frac\beta\alpha\right)\lim_{x\to\infty}f(x)\tag{6}\\[6pt]
&=\log\left(\frac\beta\alpha\right)\left[\lim_{x\to0}f(x)-\lim_{x\to\infty}f(x)\right]\tag{7}
\end{align}
$$
Explanation:
$(1)$: definition of improper integral
$(2)$: linearity of integration
$(3)$: substitute $x\mapsto x/\alpha$ in the left integral and $x\mapsto x/\beta$ in the right
$(4)$: cancel the integrals over $[\beta\epsilon,\alpha N]$
$(5)$: left integral does not depend on $N$; right integral does not depend on $\varepsilon$
$(6)$: as $\varepsilon\to0$, $f(x)\to\lim\limits_{x\to0}f(x)$ on $[\alpha\varepsilon,\beta\varepsilon]$
$\phantom{(6)\text{:}}$ as $N\to\infty$, $f(x)\to\lim\limits_{x\to\infty}f(x)$ on $[\alpha N,\beta N]$
$(7)$: distribute
