<s>[INST] How do I evaluate $\int \frac {x+4}{ 2x+6 } dx $? $$\int  \frac {x+4}{ 2x+6 } dx$$
This is a problem from Khan Academy that I was reading about how to solve when I accidentally clicked next and lost the explanation. I was reading something about how there is a clever way to divide the function to make it easier to integrate. Can someone please explain this to me?
No actual solution, please. I want to get it by myself. 
 [/INST] By chain rule and fundamental theorem of calculus we have
$$
\int_{x} \frac{x+4}{2x+6} = \frac{1}{2} \int_{x} \frac{2x+8}{2x+6} = \frac{1}{2} \int_{x} \left( 1 + \frac{1}{x+3} \right) = \frac{x}{2} + \frac{1}{4}\int_{x}\frac{D(x+3)}{x+3} + \text{some constant} \\= \frac{x}{2} + \frac{1}{2}\ln |x+3| + \text{some constant}.
$$
</s>