4

Can one do the indefinite integral of

$$\frac{1}{(ax^2+bx+c)^n}, a, b, c \in \mathbb{R}$$

quickly, without resorting to those awful recursion relations:

$$\eqalign{\int \dfrac1{(ax^2+bx+c)^n}dx&=\dfrac{2ax+b}{(n-1)(4ac-b^2)(ax^2+bx+c)^{n-1}} \\&+\dfrac{(2n-3)2a}{(n-1)(4ac-b^2)} \int\dfrac1{(ax^2+bx+c)^{n-1}}dx+C.}$$

or without using tricks such as writing $ax^2+bx+c$ as $x^2+1$ or something like that?

Hardy (P. 11-12) seems to claim that we can write the denominator as $[(x-\alpha)(x-\alpha^*)]^n$ and then re-write $\frac{1}{(ax^2+bx+c)^n}$ via partial fractions and integrate a bunch of $\frac{1}{(x-\alpha)^j}$ and $\frac{1}{(x-\alpha^*)^j}$ terms, but wont you end up with stuff that is necessarily complex, similar to this.

I think you're supposed to end up with something like this:

enter image description here

which gives only real numbers, but I'm not getting that :( Furthermore the answer you get when you use recursion relations involves $\arctan$ which is obviously not here :(

So:

What is the integral of

$$\frac{1}{(ax^2+bx+c)^n} = \frac{1}{(x-\alpha)^n(x-\alpha^*)^n}, a, b, c \in \mathbb{R}$$

Hakim
  • 10,213
bobby
  • 689
  • What's wrong with complex numbers? Or "tricks" for that matter, if they work really well? – anon May 27 '14 at 20:35
  • I'd just like my answer to have real numbers the way you get them if you do it using the recursion relation method. However I don't want to use the recursion method because it takes forever. I don't want to use tricks because I can't remember them and when there are nice general methods that give the right answer, like partial fractions, there's no need for tricks for a person like me. – bobby May 27 '14 at 20:36
  • Substitutions and change-of-variables are pretty important that one should remember to think of them. Especially if they're only linear or affine ones. Since they're intuitive and often get to the heart of the matter, I would not call them tricks as much as revelations. – anon May 27 '14 at 20:39
  • In this example, the only way I'd think of even using these substitutions is if I knew the answer I was after. In this example they are not intuitive to me at all, and in fact make life more complicated from my perspective. In other cases I am happy with substitutions. Any ideas regarding my question? – bobby May 27 '14 at 20:43
  • You don't want recurrence relations. You don't want complex numbers. You don't want substitution. I'm not sure what's left. – Emily May 27 '14 at 21:13
  • I'd like to use complex numbers in the solution method, but get rid of them in the final answer once the integration is done, ending up with the answer you'd get if you did it with the recursion method. – bobby May 27 '14 at 21:17

1 Answers1

2

I was a bit confused about what you did and did not want to involve, but in my opinion the simplest way to do this is using differentiation.

Note that: $${\frac { \left( -1 \right) ^{n-1} }{ \left( n-1 \right) !}}{\frac {\partial }{\partial c^{n-1}}}\frac{1}{ a{x}^{2}+bx+c } = \frac{1}{ \left(a{x}^{2}+bx+c \right)^n} $$ and that: $$\int \! \frac{1}{ a{x}^{2}+bx+c }{dx}=2\,\arctan \left( { \frac {2\,ax+b}{\sqrt {4\,ca-{b}^{2}}}} \right) {\frac {1}{\sqrt {4\,c a-{b}^{2}}}}$$ hence: $$\int \! \frac{1}{ \left(a{x}^{2}+bx+c \right)^n}{dx}= {\frac { \left( -1 \right) ^{n-1} }{ \left( n-1 \right) !}}{\frac {\partial }{\partial c^{n-1}}} \left( 2\,\arctan \left( {\frac {2\,ax+b}{\sqrt {4\,ca-{b}^{2}}}} \right) {\frac {1}{\sqrt {4\,ca-{b}^{2}}}} \right) $$

You can then use the generalized Leibniz formula to obtain a polynomial plus an arctan part, although as far as I can tell the arctan part will always be there as it begins the awful recursion.

Update

In light of the discussion in the comments of this answer, perhaps something like this would be better...

Note that: $${\frac {1}{ \left( x-\mu \right) ^{1 +n} \left( x-\nu \right) ^{1+n}}}=\frac{1}{(n!)^2}{\frac {\partial ^{2\,n}}{\partial {\nu}^{n}\partial {\mu}^{n}}} \left( {\frac {1}{ \left( x-\mu \right) \left( x-\nu \right) }} \right) \tag{1}$$ and: $${\frac {1}{ \left( x-\mu \right) \left( x-\nu \right) }}={\frac {1}{ \left( - \nu+\mu \right) \left( x-\mu \right) }}-{\frac {1}{ \left( x-\nu \right) \left( -\nu+\mu \right) }} \tag{2}$$ hence: $$\begin{aligned} \int{\frac {1}{ \left( x-\mu \right) ^{1+n} \left( x-\nu \right) ^{1+n}}}{dx}&=\frac{1}{(n!)^2}{\frac {\partial ^{2\,n}}{\partial {\nu}^{n}\partial {\mu}^{n}}}\frac{1}{\left( -\nu+\mu \right)}\int \!{ \frac {1}{ \left( x-\mu \right) }}-{\frac {1}{ \left( x-\nu \right) }}{dx}\\ &=\frac{1}{(n!)^2}{\frac {\partial ^{2\,n}}{\partial {\mu}^{n}\partial {\nu}^{n}}} \left({\frac {\ln \left( x-\mu \right) }{-\nu+\mu}} -{\frac {\ln \left( x-\nu \right) }{-\nu+\mu}}\right) \end{aligned}\tag{3} $$ Then note that, for example: $$\frac{1}{(n!)^2}{\frac {\partial ^{2\,n}}{\partial {\mu}^{n}\partial {\nu}^{n}}}\frac {\ln \left( x-\mu \right) }{-\nu+\mu}=\frac{1}{n!}{\frac {\partial }{\partial \mu^n}} \left( {\frac {\ln \left( x-\mu \right) }{ \left( - \nu+\mu \right) ^{1+n}}} \right) \tag{4} $$ and that the second term on the right of $(3)$ is just $\mu \leftrightarrow\nu$. The generalized Leibniz formula states: $${\frac {d}{d \mu^n}}\left( f\left( \mu \right) g \left( \mu \right) \right) =\sum _{m=0}^{n}{n\choose m} \left( {\frac {d^{m}}{d{\mu}^{m}}}f \left( \mu \right) \right)\left( {\frac {d^{n-m}}{d{\mu}^{n-m}}}g \left( \mu \right)\right) \tag{5}$$ apply $(5)$ to the right hand side of $(4)$, using the numerator as $f$ and the denominator as $g$. Pull out the zeroth order term from the sum as this contains the $\log$ term. Shift down the index on the remaining sum by $1$, applying the derivative once, to the log term in the sum. For the remaining derivatives you will need the useful formula: $${\frac {\partial ^{k}}{\partial {\mu}^{k}}} \frac{1}{\left( - \nu+\mu \right) ^{1+n}} ={\frac { \left( -1 \right) ^{k} \left( n+k \right) !}{n!\, \left( -\nu+\mu \right) ^{1+n +k}}} \tag{6}$$ After some lengthy algebra, the end result is:

$$\int{\frac {1}{ \left( x-\mu \right) ^{1+n} \left( x-\nu \right) ^{1+n}}}{dx}= \frac{\left( -1 \right) ^{n}}{\left( -\nu+\mu \right) ^{1+2\,n}} \left[{2\,n\choose n}\left(\ln \left( x-\mu\right)-\ln \left( x-\nu \right)\right)-P_n(\mu,\nu,x)\right] $$ where: $$P_n(\mu,\nu,x)=\sum _{m=1}^{n}\frac{{2\,n-m\choose n}}{m} \left[ \left( {\frac {-\nu+\mu} {-x+\mu}} \right) ^{m}- \left( {\frac {\nu-\mu}{-x+\nu}} \right) ^{m} \right] \tag{7}$$

The polynomial is of generalized hypergeometric form.

FShrike
  • 40,125
  • Yeah that is lovely, but you have to know the integral of $\frac{1}{ax^2+bx+c}$ which is usually computed with tricks, i.e. first knowing to reduce it to $x^2+1$ and then knowing the integral of this is $\arctan...$. The partial fractions method avoids all of this and not only computes $(ax^2+bx+c)$ it computes $(ax^2+bx+c)^n$ by the same idea. If you could illustrate that as well I'd be extremely greatful. – bobby May 27 '14 at 20:58
  • 1
    *Leibniz ${\hspace{1em}}$ – Cheerful Parsnip May 27 '14 at 20:59
  • @Bobby, you do acknowledge though that which ever method you use, the answer will always involve $\arctan$ right? So even if you use partial fractions to reduce the problem (equivalent to a recursion in my opinion) then you will still have to solve the $n=0$ case which involves $\arctan$. – Graham Hesketh May 27 '14 at 21:06
  • If you break it up into partial fractions, as done here http://i.stack.imgur.com/5Oyp7.png you then end up with what is in that picture, and for the $p = n = 0$ case you end up with $\ln$, not $\arctan$, terms but containing complex numbers - my hope is that you'll just show me how to start with the real-valued $\frac{1}{(ax^2+bx+c)^n}$, break it up into linear terms involving potentially complex roots, integrate the linear terms, end up with something involving logarithms and maybe $i$'s, and then from this get $\arctan$'s and only real-numbers in the end result. I keep messing it up :( – bobby May 27 '14 at 21:14
  • I don't think you can use partial fractions with repeated roots though can you? – Graham Hesketh May 27 '14 at 21:19
  • 1
    Yeah you can, on the very bottom of page 11 of the Hardy book I linked to he gives the final result of doing partial fractions on a $n_s-$fold repeated root. Furthermore case 4 here http://math.ucsd.edu/~wgarner/math20b/partialfractions.htm gives examples, – bobby May 27 '14 at 21:25
  • 1
    Ok I see your point. – Graham Hesketh May 27 '14 at 21:32
  • $\int \frac{dx}{ax^2+bx+c}=\frac{1}{a} \int \frac{dx}{(x-\alpha)(x-\beta)}=\frac{1}{a} \int ( \frac{ \frac{1}{\alpha-\beta} }{x-\alpha} - \frac{\frac{1}{\alpha-\beta}}{x-\beta})= \frac{1}{a} \frac{1}{\alpha-\beta} \ln|\frac{x-\alpha}{x-\beta}|$ :( – bobby May 27 '14 at 22:50
  • Wow, that is absolutely phenomenal! Bravo! I wonder would you be able to do one more thing? Can you show that solving the $n = 1$ case (or n = 0 in your notation) using logarithms (the solution in the comment above me) is equivalent to the arctan solution you've got in your post (for the cases of unequal distinct real, or complex conjugate roots)? $$\int ! \frac{1}{ a{x}^{2}+bx+c }{dx}=2,\arctan \left( { \frac {2,ax+b}{\sqrt {4,ca-{b}^{2}}}} \right) {\frac {1}{\sqrt {4,c a-{b}^{2}}}}$$ I literally can't explicitly show they are equal, and have been trying for 2 days :( – bobby May 29 '14 at 17:51
  • Section 2.8 of Bronstein's Symbolic Integration seems to indicate they are not always equal, and that you can go wrong applying the fundamental theorem of calculus in definite integrals, but that may have nothing to do with this, I am not sure. – bobby May 29 '14 at 18:43