trouble in solving $\int\frac{1}{t(t+2)} dt$ by using a specific variable substitution Before anything else, I would like to apologize for my english as it is not my mother tongue and I may use it unperfectly. 
I would like to solve $\int_a^b\frac{1}{t(t+2)}dt$. Of course, it is doable by $\frac{1}{t(t+2)} = \frac{1}{2t} + \frac{1}{2t+2}$ and then integrating. But I was hoping to solve it by using substitution.
I know the formula to be $$ \int_a^b f'(g(x))g'(x)dx = \int_{g(a)}^{g(b)}f(x)dx$$
it seems to me that I can apply the formula here. Let : 
$$f(x) = ln(x) \qquad f'(x) = \frac1x$$
$$g(x) = \frac{2}{x}+1 \qquad g'(x) = -\frac{2}{x^2}$$
Therefore $$\int_a^b\frac{1}{x(x+2)}dx = \int_a^b\frac{1}{x^2(1+\frac{2}{x})}dx$$
$$  \int_a^b\frac{1}{x(x+2)}dx = -\frac{1}{2}\int f'(g(x))g'(x)dx$$
I then apply the formula :
$$ -\frac{1}{2}\int_a^b f'(g(x))g'(x)dx = -\frac{1}{2}\int_{g(a)}^{g(b)}f(x)dx $$
$$\int_a^b\frac{1}{x(x+2)}dx = -\frac{1}{2}\int_{\frac{2}{a}+1}^{\frac{2}{b}+1}ln(x)dx$$
But those two ($\int_a^b\frac{1}{x(x+2)}dx$ and $-\frac{1}{2}\int_{\frac{2}{a}+1}^{\frac{2}{b}+1}ln(x)dx$) gives widly different result for a and b chosen randomly (for instance for (a,b) = (1,2), I get 0.202 = 0.454). Please, could someone be so kind to help me figure out what I did wrong ? 
Thank you for your time.
 A: It's because the formula should be $$\sf{\int_a^b f'(g(x))g'(x)\,dx = \color{red}{\int_{g(a)}^{g(b)}f'(x)\,dx}=[f(x)]_{g(a)}^{g(b)}=f(g(b))-f(g(a))}$$ not $\sf{\int_{g(a)}^{g(b)} f(x)\,dx}$ on the RHS, as the substitution $\sf{u=g(x)}$ confirms this. Thus you have that $$\sf{\int_a^b\frac1{x(x+2)}\,dx=-\frac12\left[\ln\left(\frac2b+1\right)-\ln\left(\frac2a+1\right)\right]=\frac12\left[\ln\frac b{b+2}-\ln\frac a{a+2}\right].}$$
A: $\int \frac{1}{t(t+2)} \mathrm{d} t$
This integral could be solved using partial fraction decomposition, but there is a simpler way.
Expand fraction by $\frac{1}{t^{2}}$
$=\int \frac{1}{\left(\frac{2}{t}+1\right) t^{2}} d t$
Substitute $u=\frac{2}{t}+1 \longrightarrow \mathrm{d} t=-\frac{t^{2}}{2} \mathrm{d} u$
$=-\frac{1}{2} \int \frac{1}{u} \mathrm{d} u$
$\begin{aligned} \text { Now solving: } \\ & \int \frac{1}{u} \mathrm{d} u \\ \text { This is a standard integral: } \\ &=\ln (u) \end{aligned}$
$\begin{aligned} \text { Plug in solved integrals: } \\ &-\frac{1}{2} \int \frac{1}{u} \mathrm{d} u \\ &=-\frac{\ln (u)}{2} \end{aligned}$
Undo substitution $u=\frac{2}{t}+1 :$
$=-\frac{\ln \left(\frac{2}{t}+1\right)}{2}$
The problem is solved. Apply the absolute value function to arguments of logarithm functions in order to extend
the antiderivative's domain:
$\begin{aligned} & \int \frac{1}{t(t+2)} \mathrm{d} t \\=-& \frac{\ln \left(\left|\frac{2}{t}+1\right|\right)}{2}+C \end{aligned}$
