<s>[INST] How to Integerate $\frac{x}{x^2-4x+8}$? I want to know how to integrate this ?
$$\frac{x}{x^2-4x+8}$$
Thanks all
 [/INST] Well, you can rewrite this as $$\frac{x}{x^2-4x+4+4}=\frac{x}{(x-2)^2+4}=\frac{x}{(x-2)^2+2^2}.$$ Try the substitution $$x-2=2\tan\theta.$$ This means that $x=2+2\tan\theta$ and $\frac{dx}{d\theta}=2\sec^2\theta,$ and we also have $$(x-2)^2+2^2=2^2(\tan^2\theta+1)=2^2\sec^2\theta.$$ Can you take it from there?
</s>