How to integrate $\int \frac{ev+f}{av^2 + bv +c} dv$? I want to integrate 
\begin{align}
\int \frac{ev+f}{av^2 + bv +c} dv
\end{align}
can you give me some hints or detail procedure for this integral?  
From mathematca, i have 
\begin{align}
\frac{-\frac{2 (b e-2 a f) \text{ArcTan}\left[\frac{b+2 a v}{\sqrt{-b^2+4 a c}}\right]}{\sqrt{-b^2+4 a c}}+e \text{Log}[c+v (b+a v)]}{2 a}
\end{align}
which seems uncomfortable for me.. 
 A: $$
\int \frac{ev+f}{av^2 + bv +c} dv = \frac{e}{2a}\int \frac{d(av^2 + bv + c)}{av^2 + bv +c} + \left(f-\frac{be}{2a}\right)\int \frac{1}{av^2 + bv +c} dv
$$
$$
= \frac{e}{2a} \ln(av^2+bv+c) + \left(f-\frac{be}{2a}\right)\int \frac{1}{(\sqrt{a}v+\frac{b}{2\sqrt{a}})^2 - \frac{b^2}{4a} +c} dv
$$
$$
\int \frac{1}{(\sqrt{a}v+\frac{b}{2\sqrt{a}})^2 - \frac{b^2}{4a} +c} dv = \frac{1}{\sqrt{a}}\int \frac{d(\sqrt{a}v+\frac{b}{2\sqrt{a}})}{(\sqrt{a}v+\frac{b}{2\sqrt{a}})^2 - \frac{b^2}{4a} +c}
$$
$$
c \geq \frac{b^2}{4a} \rightarrow k^2 = c - \frac{b^2}{4a}
$$
$$
\frac{1}{\sqrt{a}}\int \frac{d(\sqrt{a}v+\frac{b}{2\sqrt{a}})}{(\sqrt{a}v+\frac{b}{2\sqrt{a}})^2 - \frac{b^2}{4a} +c} = \frac{1}{\sqrt{a}} \int \frac{du}{u^2+k^2} = \frac{1}{k\sqrt{a}}\arctan\left(\frac{u}{k}\right) = \\ \frac{1}{k\sqrt{a}}\arctan\left(\frac{\sqrt{a}v+\frac{b}{2\sqrt{a}}}{k}\right) = \\
\frac{1}{\sqrt{c - \frac{b^2}{4a}}\sqrt{a}}\arctan\left(\frac{\sqrt{a}v+\frac{b}{2\sqrt{a}}}{\sqrt{c - \frac{b^2}{4a}}}\right)
$$
Then:
$$
\int \frac{ev+f}{av^2 + bv +c} dv = \frac{e}{2a} \ln(av^2+bv+c) + \left(f-\frac{be}{2a}\right)[\frac{1}{\sqrt{c - \frac{b^2}{4a}}\sqrt{a}}\arctan\left(\frac{\sqrt{a}v+\frac{b}{2\sqrt{a}}}{\sqrt{c - \frac{b^2}{4a}}}\right)] + C
$$
which is what you have.
$$
c \leq \frac{b^2}{4a} \rightarrow k^2 = \frac{b^2}{4a} - c
$$
$$
\frac{1}{\sqrt{a}}\int \frac{d(\sqrt{a}v+\frac{b}{2\sqrt{a}})}{(\sqrt{a}v+\frac{b}{2\sqrt{a}})^2 - \frac{b^2}{4a} +c} = \frac{1}{\sqrt{a}} \int \frac{du}{u^2-k^2} = \frac{1}{2k\sqrt{a}} \int {\frac{1}{u-k}-\frac{1}{u+k}} du = 
$$
$$
\frac{1}{2k\sqrt{a}}\ln (\frac{u-k}{u+k}) = \frac{1}{2\sqrt{\frac{b^2}{4a} - c}\sqrt{a}}\ln (\frac{\sqrt{a}v+\frac{b}{2\sqrt{a}}-\sqrt{\frac{b^2}{4a} - c}}{\sqrt{a}v+\frac{b}{2\sqrt{a}}+\sqrt{\frac{b^2}{4a} - c}})
$$
Then:
$$
\int \frac{ev+f}{av^2 + bv +c} dv = \frac{e}{2a} \ln(av^2+bv+c) + \left(f-\frac{be}{2a}\right)[\frac{1}{2\sqrt{\frac{b^2}{4a} - c}\sqrt{a}}\ln (\frac{\sqrt{a}v+\frac{b}{2\sqrt{a}}-\sqrt{\frac{b^2}{4a} - c}}{\sqrt{a}v+\frac{b}{2\sqrt{a}}+\sqrt{\frac{b^2}{4a} - c}})] + C
$$
A: HINT:
Using Partial Fraction Decomposition let $ev+f=A\cdot\dfrac{d(av^2+bv+c)}{dv}+B$
Now $av^2+bv+c=\dfrac{(2av+b)^2+4ca-b^2}{4a}$
Now use Trigonometric substitution based on the sign of $4ca-b^2$
A: HINT:
$$\int\frac{ev+f}{av^2+bv+c}\space\text{d}v=$$
$$\int\left[\frac{e(2av+b)}{2a(av^2+bv+c)}-\frac{eb-2af}{2a(av^2+bv+c)}\right]\space\text{d}v=$$
$$\frac{e}{2a}\int\frac{2av+b}{av^2+bv+c}\space\text{d}v+\left(f-\frac{eb}{2a}\right)\int\frac{1}{av^2+bv+c}\space\text{d}v=$$

Substitute $u=av^2+bv+c$ and $\text{d}u=\left(2av+b\right)\space\text{d}v$:

$$\frac{e}{2a}\int\frac{1}{u}\space\text{d}u+\left(f-\frac{eb}{2a}\right)\int\frac{1}{av^2+bv+c}\space\text{d}v=$$
$$\frac{e\ln\left|u\right|}{2a}+\left(f-\frac{eb}{2a}\right)\int\frac{1}{av^2+bv+c}\space\text{d}v=$$
$$\frac{e\ln\left|av^2+bv+c\right|}{2a}+\left(f-\frac{eb}{2a}\right)\int\frac{1}{av^2+bv+c}\space\text{d}v$$
For the second integral, complete the square....
