<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] As said by Doug, the substitution works. Before applying it, consider decomposing $$\frac{x+1+5}{(x+1)^2+5}=\frac12\frac{((x+1)^2+5)'}{(x+1)^2+5}+\frac{5}{(x+1)^2+5},$$ that makes life simpler.
</s>