<s>[INST] Why doesnt this trignometric substituition work? $$\frac 1 5\int\frac{x+1+5}{(x+1)^2+5}\,\mathrm dx$$
where i substitute $x+1 = \sqrt{5}\tan(\theta)$
After Substituition :
$$\frac15\int\frac{\sqrt5\tan(\theta)+5}{\tan^2(\theta)+1}\sqrt5\sec^2(\theta)\,\mathrm d\theta$$
but if i do $u = x +1$
and then further substitute and integrate i get :
$\int \frac u {(u^2 +5)} + \int \frac 5 {(u^2 +5)} $
which then gives :
$\frac {ln(x^2 + 2x +6)} 2 + \sqrt5 arctan(\frac {x+1}{\sqrt5}))$
not :
$ln(\frac{(x^2 + 2x + 6)} {\sqrt5}) + \sqrt5arctan(\frac {x + 1} {\sqrt5})$
 [/INST] Where is your trig substitution failing?
$\int \frac{(x+1)+5}{(x+1)^2 + 5} \ dx$
$x+1 = \sqrt 5 \tan \theta\\
dx = \sqrt 5 \sec^2 \theta$
$\int \frac{(\sqrt 5 \tan \theta +5)(\sqrt 5 \sec^2 \theta)}{5\sec^2 \theta} \ d\theta\\
\int \frac{\tan \theta}{\sqrt 5} + \sqrt 5 \ d\theta$
That looks relatively simple from here.
$\frac {\ln |\sec\theta|}{\sqrt 5} + \sqrt 5 \theta + C$
$\theta = \arctan \frac {x+1}{\sqrt 5}\\
\sec\theta = \sqrt {\frac {(x+1)^2}{5} + 1} = \sec\theta = \sqrt {\frac {x^2 + 2x + 6}{5}}\\
\ln\sqrt {\frac {x^2 + 2x + 6}{5}} = \frac 12 \ln (x^2 + 2x + 6) - \frac 12 \ln 5 $
The $\frac 12 \ln 5$ is a constant and can be added to $C.$ 
$\frac {\ln {x^2 + 2x + 6}}{2\sqrt 5} + \sqrt 5 \arctan \frac {x+1}{\sqrt 5} + C$
</s>