Problem with integrating this function I have the function $$f(u) = \frac{1}{\sqrt{1-bu^2 -cu}}$$ with $b,c$ positive. I want to integrate this function from $0$ to its first root. Within this interval, the function is not complex since the polynomial under the root is positive. But the function itself is obviously complex in general and I have its complex antiderivative.
Do I just plug in the values and take the real part? How do I proceed? (The result should be real).
 A: As suggested in the comments section, you need to complete the square, i.e.
\begin{equation} \int f(u) du = \int \frac{1}{\sqrt{1 - bu^2 - cu}} du 
= \int \frac{1}{\sqrt{-b \big( u^2 + \frac{cu}{b} + \frac{c^2}{4b^2} - \frac{c^2}{4b^2} - \frac{1}{b} \big) }} du \\ 
=  \frac{1}{\sqrt{- b \Big( \big(u^2 + \frac{cu}{b} + \frac{c^2}{4b^2} \big) - \frac{c^2 + 4b}{4b^2} \Big) }} du
= \frac{1}{\sqrt{b}} \int \frac{1}{\sqrt{\frac{c^2 + 4b}{4b^2} - \big( u + \frac{c}{2b} \big)^2}} du \end{equation}
Since you have an expression of the form $ k^2 - g(u)^2 $, then you want to use the substitution $ g(u) = k \times sin\theta $, i.e. $ u + \frac{c}{2b} = \sqrt{\frac{c^2+4b}{4b^2}}sin\theta \rightarrow du = \sqrt{\frac{c^2+4b}{4b^2}}cos\theta $.
Substituting these expressions back into the above equation, we get:
\begin{equation} \int \frac{1}{\sqrt{\frac{c^2 + 4b}{4b^2} - \big( \sqrt{\frac{c^2+4b}{4b^2} \times sin\theta} \big)^2}} \sqrt{\frac{c^2+4b}{4b^2}} cos\theta d\theta 
= \int \frac{1}{\sqrt{\frac{c^2 + 4b}{4b^2} (1 - sin^2\theta)}} \sqrt{\frac{c^2+4b}{4b^2}} cos\theta d\theta \\
= \frac{1}{\sqrt b} \int \frac{cos\theta}{\sqrt{1-sin^2\theta}} d\theta = \frac{1}{\sqrt b} \int d\theta = \frac{1}{\sqrt b} \theta + Constant \end{equation}
Since $ u+\frac{c}{2b} = \sqrt{\frac{c^2+4b}{4b^2}} sin\theta \rightarrow \frac{2ub+c}{2b} = \frac{\sqrt{c^2+4b}}{2b}sin\theta \rightarrow 2ub+c = \sqrt{c^2+4b} sin\theta $, then $ sin\theta = \frac{2ub+c}{\sqrt{c^2+4b}} $, which means that $ \theta = sin^{-1} \Big(\frac{2ub+c}{\sqrt{c^2+4b}}\Big) $.
Putting this all together, we get:
$$ \int f(u)du = \frac{1}{\sqrt{b}} sin^{-1} \Bigg(\frac{2ub+c}{\sqrt{c^2+4b}}\Bigg) + Constant $$
