Evaluate $\frac{1}{4}\int \frac{dx}{(kx^{2}+ax+b)^{2}}$ I would like this integral: 
$$\frac{1}{4}\int \frac{dx}{(kx^{2}+ax+b)^{2}}$$
I used substitution $x+ \frac{a}{2k} = \frac{\sqrt{4kb-a^{2}}}{2k} \tan \theta$.
This will reduce the denominator to
$$
\left(\left(\frac{\sqrt{4kb-a^{2}}}{2k}\tan\theta \right)^{2} + \frac{4kb-a^{2}}{4k^{2}}\right)^{2} = \left(\frac{4kb-a^{2}}{4k^{2}}\right)^{2} \sec^{4}\theta ,$$
and integral is reduced to
$$\frac{1}{4k^{2}}\frac{16k^{4}}{(4kb-a^{2})^{\frac{3}{2}}2k} \int \cos^{2} \theta d\theta = \frac{2k}{(4kb-a^{2})^{\frac{3}{2}}}\left(\frac{\theta}{2}+\frac{1}{4}\sin(2\theta)+c\right)$$ 
$$= \frac{2k}{(4kb-a^{2})^{\frac{3}{2}}} \left(\frac{\arctan\left(\frac{2k(x+\frac{a}{2k})}{\sqrt{4kb-a^{2}}}\right)}{2}+\frac{\sin(2 \arctan\left(\frac{2k(x+\frac{a}{2k})}{\sqrt{4kb-a^{2}}}\right)}{4}\right).$$
Is there a simpler solution?
 A: Hint: Evaluate first $I(b)=\displaystyle\int\frac{dx}{kx^2+ax+b}$ , and then differentiate with regard to b.
A: Based on your work, I'm making the assumption that determinant $\Delta = a^2 - 4kb < 0$
To make this simple, I'm going to write 
$$ kx^2 + ax + b = k \left(x + \frac{a}{2k} \right)^2 + \frac{4kb - a^2}{4k} = k(u^2 + m^2) $$
where $u = x + \frac{a}{2k}$ and $m = \frac{\sqrt{4kb - a^2}}{2k}$. We have
$$ \int \frac{dx}{(kx^2 + ax + b)^2} = \frac{1}{k^2} \int \frac{du}{(u^2 + m^2)^2} $$
The trick is performing integration by parts on this integral 
$$ \int \frac{du}{u^2 + m^2} \tag{1}$$
We should get
$$ \begin{align} \int \frac{du}{u^2 + m^2} 
&= \frac{u}{u^2 + m^2} + \int \frac{2u^2}{(u^2 + m^2)^2} \\
&= \frac{u}{u^2 + m^2} + \int \frac{2(u^2 + m^2) - 2m^2}{(u^2 + m^2)^2} \\
&= \frac{u}{u^2 + m^2} + 2 \int \frac{du}{u^2 + m^2} - 2m^2\int\frac{du}{(u^2+m^2)^2}
\end{align} $$
Rearranging the terms
$$\int \frac{du}{(u^2 + m^2)^2} = \frac{u}{2m^2(u^2 + m^2)} + \frac{1}{2m^2} \int \frac{du}{u^2 + m^2}$$
As you might know, $(1)$ is just the arctangent function: 
$$ \int\frac{du}{u^2 + m^2} = \frac{1}{m}\,\arctan \left(\frac{u}{m} \right) + C $$
And so
$$\int \frac{du}{(u^2 + m^2)^2} = \frac{u}{2m^2(u^2 + m^2)} + \frac{1}{2m^3} \,\arctan \left(\frac{u}{m} \right) + C$$
After some algebra:
$$ \int\!\frac{dx}{(kx^2 + ax + b)^2} = \frac{2kx + a}{(4kb-a^2)(kx^2 + ax + b)} + \frac{4k}{(4kb - a^2)^{3/2}}\, \arctan \left(\frac{2kx + a}{\sqrt{4kb - a^2}} \right) + C $$
A: The method is correct. You just made some computational mistakes. 
You got the substitution and denominator correctly. 
The integral is reduced to $\frac{1}{2\sqrt{4bk-a^2}}\int \cos^2{\theta} d\theta$. You also did the integral correctly.
A: I don't know the demonstration but I have this formula : 
$$
\int \frac{dx}{(ax^2+bx+c)^2}=\frac{2ax+b}{(4ac-b^2)(ax^2+bx+c)}+\frac{2a}{4ac-b^2}\int \frac{dx}{ax^2+bx+c}
$$
And after you can use one of this for the second term (it depends on your discriminant)
$$
\int \frac{dx}{ax^2+bx+c}=\frac{1}{\sqrt{b^2-4ac}}ln\left(\frac{2ax+b-\sqrt{b^2-4ac}}{2ax+b+\sqrt{b^2-4ac}}\right)
$$
Or
$$
\int \frac{dx}{ax^2+bx+c}=\frac{2}{\sqrt{4ac-b^2}}*tan^{-1}\left(\frac{2ax+b}{\sqrt{4ac-b^2}}\right)
$$
Shadock 
