2
$\begingroup$

I have been trying to integrate a function with a polynomial as the denominator.

i.e, how would I go about integrating

$$\frac{1}{ax^2+bx+c}.$$

Any help at all with this would be much appreciated, thanks a lot :)

ps The polynomial has NO real roots $${}{}$$

  • 0
    Parentheses, please. Presumably you mean to integrate ${1}/(ax^2+bx+c)$2012-12-05
  • 1
    This should help: http://en.wikipedia.org/wiki/Partial_fractions_in_integration2012-12-05
  • 0
    Lookup "partial fraction decomposition".2012-12-05
  • 0
    Ross Millikan I assumed that would be clear if you read the title and put two and two together2012-12-05
  • 0
    @Justin The notation is important. $1/ax^2+bx+c\ne 1/(ax^2+bx+c)$.2012-12-05
  • 0
    gawdddddd okay sorry2012-12-07

2 Answers 2

9

The details depend on $a$, $b$, and $c$.

Assume $a\ne 0$. If there are two distinct real roots, use partial fractions.

If there are two identical real roots, we are basically integrating $\dfrac{1}{u^2}$.

If there are no real roots, complete the square. With the right substitution, you basically end up integrating $\dfrac{1}{1+u^2}$, and get an $\arctan$.

For polynomials of higher degree, factor as a product of linear terms and/or quadratics with no real roots. (In principle this can be done. In practice, it may be very unpleasant).

Then using partial fractions and substitutions you end up with integrals of $\dfrac{1}{u^{n}}$, and/or $\dfrac{u}{(1+u^2)^{n}}$ and/or $\dfrac{1}{(1+u^2)^{n}}$. All of these are doable.

Added: It turns out the OP was interested in the irreducible case. Will write a bit on that, because I want to advocate a procedure slightly different from the standard one. Assume that $a$ is positive.

Rewrite $\dfrac{1}{ax^2+bx+c}$ as $\dfrac{4a}{4a^2x^2+4abx+4ac}$, and then, completing the square, as $\dfrac{4a}{(2ax+b)^2+4ac-b^2}$.

Note that $4ac-b^2$ is positive. Call it $k^2$, with $k$ positive.

Make the change of variable $2ax+b=ku$. Substitute. There is some cancellation, and we end up integrating $\dfrac{2}{k}\dfrac{1}{1+u^2}.$

I would suggest going through this procedure in any individual case. As an example, with $\dfrac{1}{x^2+x+1}$ we write $\dfrac{4}{4x^2+4x+4}$, then $\dfrac{4}{(2x+1)^2+3}$, make the change of variable $2x+1=\sqrt{3} u$.

Another addition: The OP has expressed a wish to see the particular problem $\int\frac{dx}{x^2+10x+61}$. The numbers here are particularly simple, designed for the "standard" style, so we will do it that way. Also, we will use more steps than necessary.

First we complete the square. We get $x^2+10x+61=(x+5)^2-25+61=(x+5)+36$. Now let $u=x+5$. Then $du=dx$ and $$\int\frac{dx}{x^2+10x+61}\int \frac{dx}{(x+5)^2+36}=\int\frac{du}{u^2+36}.$$

Now maybe think: it would be nice if we had $u^2=36w^2$, because the $36$ could then "come out." So let $u=6w$. Then $du=6\,dw$, and we get $$\int\frac{du}{u^2+36}=\int \frac{6\,dw}{36w^2+36}=\int\frac{1}{6}\frac{dw}{w^2+1}=\frac{1}{6}\arctan(w) +C.$$ Finally, we undo our substitution. We have $w=\frac{u}{6}=\frac{x+5}{6}$.

  • 0
    sorry I should have said that the quotient in particular had no real roots, so it would be the second instance with arctan, thank you very much andre Nicolas, this was a great help2012-12-05
  • 0
    also I completed the square now and I am still stuck, sorry it is probably obvious but where do I go from there?2012-12-05
  • 0
    I added stuff on that, in a style slightly different and I think easier than the usual one. If I had known your numbers, would have used those.2012-12-05
  • 0
    $\frac{1}{x^2+10x+61}$ please help2012-12-06
  • 0
    @Justin: I will do it in a few minutes, probably using the standard style, since the numbers are designed for that. It will be added to the main poast, easier to type there.2012-12-06
  • 0
    Thank you so much andre, you complete genius legend!2012-12-07
4

If $a=0$, then $$I = \int \dfrac{dx}{bx+c} = \dfrac1b \log (\vert bx+c \vert) + \text{constant}$$ $$I = \int \dfrac{dx}{ax^2 + bx + c} = \dfrac1a \int\dfrac{dx}{\left(x + \dfrac{b}{2a}\right)^2 + \left(\dfrac{c}a- \dfrac{b^2}{4a^2} \right)}$$ If $b^2 < 4ac$, then recall that $$\int \dfrac{dt}{t^2 + a^2} = \dfrac1a\arctan \left(\dfrac{t}a \right) + \text{constant}$$ Hence, if $b^2 < 4ac$, then $$I = \dfrac2{\sqrt{4ac-b^2}} \arctan \left( \dfrac{2ax + b}{\sqrt{4ac-b^2}} \right) + \text{constant}$$ If $b^2 = 4ac$, then $$I =\dfrac1a \dfrac{-1}{\left(x + \dfrac{b}{2a}\right)} + \text{constant} = - \dfrac2{2ax+b} + \text{constant}$$ If $b^2 > 4ac$, then $$I = \dfrac1a \int\dfrac{dx}{\left(x + \dfrac{b}{2a}\right)^2 - \sqrt{\left( \dfrac{b^2}{4a^2} -\dfrac{c}a\right)}^2}$$ Now $$\int \dfrac{dt}{t^2 - k^2} = \dfrac1{2k} \left(\int \dfrac{dt}{t-k} - \int \dfrac{dt}{t+k} \right) = \dfrac1{2k} \log \left(\left \vert \dfrac{t-k}{t+k} \right \vert \right) + \text{constant}$$ Hence, if $b^2 > 4ac$, then $$I = \dfrac1{\sqrt{b^2-4ac}} \log \left(\left \vert \dfrac{2ax + b - \sqrt{b^2-4ac}}{2ax + b + \sqrt{b^2-4ac}} \right \vert \right) + \text{constant}$$

  • 0
    Marvis, thanks a lot my answer will involve arctan, once I complete the square, where do I go from there? Thanks again2012-12-05