<s>[INST] Integral question - $\int\frac{(4-x)\,dx}{x^2+4x+8}$ Integral question - $$\int\frac{(4-x)\,dx}{x^2+4x+8}$$
To solve it I need to bring the numerator to be the derivative of the dominator right?
I need to do the trick that not change the integral any ideas?
$$\frac{1}{2}\int\frac{(2x+4) \, dx}{x^2+4x+8}$$
Thanks
 [/INST] You will sooner or later have to complete the square in the denominator, getting $(x+2)^2+4$. Then the usual substitution is $x+2=2u$. 
Remark: Note that $4-x= 6-(x+2)$. So we can rewrite our integrand as $\frac{6-(x+2)}{x^2+4x+8}=\frac{6}{x^2+4x+8}-\frac{x+2}{x^2+4x+8}$. In the expression $\frac{x+2}{x^2+4x+8}$, the numerator is a constant times the derivative of the denominator, so the substitution $v=x^2+4x+8$ works well. But we still need to integrate $\frac{6}{x^2+4x+8}$. And for that we need  to work as in the answer above. I suggest instead the immediate substitution $x+2=2u$. 
Added: So $dx=2\,du$ and $4-x=6-2u$. We end up with 
$$\int \frac{3-u}{1+u^2}\,du=\int\frac{3}{1+u^2}du-\int\frac{u}{1+u^2}\,du.$$ 
The first integral is immediate. For the second, let $t=1+u^2$. 
</s>