# Analytic expression for the primitive of square root of a quadratic

Can an analytic expression be given for

$$\int \sqrt{ax^2 + bx +c} \, dx$$

I think substitution doesn't work in this case (I need to compute the integral $\int_0^t \ldots$).

-
You can find what this integral evaluates to using Wolfram|Alpha. Click "show steps" to see a derivation. –  Shaktal Jul 12 '12 at 12:15
Thanks, I'll try the tool –  teodron Jul 12 '12 at 12:18
complete the square to get an integrand of the form $\sqrt{(ax+k)^2\pm l^2}$ Then use the substitution $u=ax+k$. Limits of integration change accordingly, and you get $\sqrt{u^2\pm l^2}$ times a constant which you can pull out (I'm assuming $a>0$) If $a<0$ then you get an integrand looking like $\sqrt{l^2-u^2}$. In any case, a 12th std textbook does the rest for you! –  Host-website-on-iPage Jul 12 '12 at 12:19
HINT: $$ax^2+bx+c=a\left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{4a}$$ –  Ｊ. Ｍ. Jul 12 '12 at 12:21
Thank you all.. quite a few ways to solve it.. –  teodron Jul 12 '12 at 12:24

When you see $$ax^2 + \underbrace{{}\quad bx\quad{}}_\text{1st-degree term} + c,$$ it may help to remember that there is a standard technique in algebra for reducing problems involving quadratic polynomials with a first-degree term to problems involving quadratic polynomials with no first-degree term. It's called "completing the square". You write $$ax^2+bx+c = a\left( x^2 + \frac b a x\right) + c.$$ Then you need to work on $\displaystyle x^2 + \frac b a x$.

Half of the coefficient of the first-degree term is $\dfrac{b}{2a}$. If you square that and add it to this expression you're working on, you get a perfect square—i.e. something squared: $$\underbrace{x^2 + \frac b a x} \quad +\quad \frac{b^2}{4a^2} = \left( x + \frac{b}{2a} \right)^2.$$

So \begin{align} ax^2+bx+c = a\left( x^2 + \frac b a x\right) + c & = a\left( x^2 + \frac b a x + \frac{b^2}{4a^2} \right) - a\left( \frac{b^2}{4a^2} \right) + c \\[12pt] & = a\left( x+ \frac{b}{2a} \right)^2 + \frac{4ac-b^2}{4a} \\[12pt] & au^2 + \text{constant}. \end{align}

Let's call that last constant capital $C$, and later we'll recall that it's $\dfrac{4ac-b^2}{4a}$.

Then since $u= x + \dfrac{b}{2a}$, we have $du = dx$, and the integral becomes $$\int \sqrt{au^2+C}\,du.$$

Now we'd like a "$1$" where $C$ is, so that we can apply trigonometric identities. So do a bit of algebra: $$\int \sqrt{au^2+C}\,du = \int \sqrt{\frac{a}{C} u^2 + 1} \, du.$$ We also need $(\text{something})^2+1$, in order to apply the identity involving $\tan^2\theta+1$. So we write: $$\int\sqrt{\left(u\sqrt{\frac{a}{C}}\right)^2+1}\ du.$$

Then we have $$\int \sqrt{w^2 + 1}\ du.$$ Since $w=u\sqrt{\dfrac{a}{C}}$, we have $dw = du\sqrt{\dfrac{a}{C}}$, so $du = dw\sqrt{\dfrac{C}{a}}$.

Now we have $$\sqrt{\dfrac{C}{a}} \int \sqrt{w^2+1}\ dw.$$

This is $$\sqrt{\dfrac{C}{a}} \int \sqrt{\tan^2\theta+1}\ \sec^2\theta\,d\theta.$$ $$= \sqrt{\dfrac{C}{a}} \int \sec^3\theta\,d\theta.$$

In April 2007, I wrote this Wikipedia article, which has since been edited by a number of others, and by me, explaining how to treat that integral and why it matters.

Later note: The above works if $a$ and (capital) $C$ are positive. This implies (among other things) that $b^2-4ac<0$, so the quadratic polynomial cannot be factored using real numbers.

-
One might also use hyperbolic functions instead of trigonometric functions in the substitutions, of course. –  Ｊ. Ｍ. Jul 12 '12 at 17:59
Isn't $dw = du\sqrt{\frac{a}{C}}$? Apart from that, it's a bit difficult to write $\sqrt{\frac{a}{C}}$ since, C could be zero and $a$ could be negative. Looks like what I got using @J.M. 's hint up to the idea of having $w = tan(\theta)$. Thanks, that was really nice to know!! –  teodron Jul 13 '12 at 8:20