How are the limits of this integral transformed? 
Using $$\ln(x) = \int_1^x \frac{1}{t} dt$$
Show that for $x > 0$, $\ln\left(\frac{1}{x}\right) = -\ln(x)$

I am following a provided answer and didn't quite understand the following transformation and why/how it is done:
$$\ln\left(\frac{1}{x}\right) = \int_1^{\frac{1}{x}} \frac{1}{t}dt$$
$$~u = \frac{1}{t}, du = \frac{-1}{t^2}dt$$
$$= -\int_1^{\frac{1}{x}} t\frac{dt}{t^2}$$
$$=-\int_1^x \frac{1}{u}du$$
$$= -\ln(x)$$
I don't understand how the limits of integration were changed in the $2nd$ and $3rd$ term (from $\frac{1}{x}$ to $x$). Is there a property that makes this correct or is there some other reasoning behind the change? 

I like to add that this change of integral limts is due specifically to the terminals as follows:
 If $g$ is a function continuously differentiable on $[a,b]$ and $f$ continuous on $J=g ([a, b​​])$, let $F$ is a primitive of $f$ on $J$ then:
$$\forall t \in [a,b]  \quad (F \circ g)'(t)=F'(g(t)) g'(t) = f(g(t)) g'(t)$$
 Then : $$\begin{align*}\int_a^b f(g(t)) g'(t) dt &= \int_a^b (F \circ g)'(t) dt \\ &=\left[(F \circ g) (t)\right]_a^b \\ &= F(g(b))-F(g(a)) \\ &= [F(t)]_{g(a)}^{g(b)} \\ &= \int_{g(a)}^{g(b)} f(t) dt \end{align*}$$
Now try to compare this with the special case above.
