Technique to solve $\int{(\frac{d(\frac{u}{v})}{dx})dx}$ I recently stumbled upon this:
$$\int{\frac{x\cos(\theta)+1}{(x^2+2x\cos(\theta)+1)^{3/2}}dx}$$
I immediately knew from the options that this was the derivative of some $\frac{u}{v}$ form. But I couldn't see myself settling to a substitution for these types.
Is there a standard substitution that I can apply? How can I cleverly trace it back to $\int{d(\frac{u}{v})}$?
 A: The solution goes like this
Let $k=\cos\theta$
$$\int\frac{\left(kx+1\right)dx}{\left(x^{2}+2kx+1\right)^{\frac{3}{2}}}$$
$$=\int_{ }^{ }\frac{\left(x^{2}+2kx+1\right)dx}{\left(x^{2}+2kx+1\right)^{\frac{3}{2}}}-\frac{\left(x\right)\left(x+k\right)dx}{\left(x^{2}+2kx+1\right)^{\frac{3}{2}}}$$
$$=\int_{ }^{ }\frac{d\left(x\right)}{\left(x^{2}+2kx+1\right)^{\frac{1}{2}}}-\left(\frac{1}{2}\right)\frac{x\cdot d\left(x^{2}+2kx+1\right)}{\left(x^{2}+2kx+1\right)^{\frac{3}{2}}}$$
$$\int_{ }^{ }\frac{1}{\left(x^{2}+2kx+1\right)^{\frac{1}{2}}}\cdot dx\ +\ x\cdot d\left(\frac{1}{\left(x^{2}+2kx+1\right)^{\frac{1}{2}}}\right)$$
$$=\frac{x}{\left(x^{2}+2kx+1\right)^{\frac{1}{2}}}+C$$
If you can figure out that the integral is of the form $\frac uv$ , then try manipulating it as a product rule. Every function $\frac uv$ can be written as $u\cdot\frac1v$.
A: If you suppose the result is of the form
$$
\int\frac{kx+1}{(x^2+2kx+1)^{3/2}}dx=\frac{f(x)}{(x^2+2kx+1)^{1/2}}
$$
then
$$
\frac{d}{dx}\frac{f(x)}{(x^2+2kx+1)^{1/2}}=\frac{kx+1}{(x^2+2kx+1)^{3/2}}
$$
expanding the LHS
$$
\frac{f'(x)(x^2+2kx+1)-(x+k)f(x)}{(x^2+2kx+1)^{3/2}}
$$
Supposing $f(x)=\alpha x+\beta$ we have
$$
\frac{(kx+1)\alpha-(x+k)\beta}{(x^2+2kx+1)^{3/2}}
$$
so we have to choose $\alpha=1$ and $\beta=0,$ eventually
$$
\int\frac{kx+1}{(x^2+2kx+1)^{3/2}}dx=\frac{x}{(x^2+2kx+1)^{1/2}}+C
$$
