# Evaluating $\int \dfrac {2x} {x^{2} + 6x + 13}dx$

I am having trouble understanding the first step of evaluating $$\int \dfrac {2x} {x^{2} + 6x + 13}dx$$

When faced with integrals such as the one above, how do you know to manipulate the integral into:

$$\int \dfrac {2x+6} {x^{2} + 6x + 13}dx - 6 \int \dfrac {1} {x^{2} + 6x + 13}dx$$

After this first step, I am fully aware of how to complete the square and evaluate the integral, but I am having difficulties seeing the first step when faced with similar problems. Should you always look for what the $"b"$ term is in a given $ax^{2} + bx + c$ function to know what you need to manipulate the numerator with? Are there any other tips and tricks when dealing with inverse trig antiderivatives?

-

2
The first step is to get rid of the x at the top by creating the derivative. So if you have $\frac{dx+e}{ax^2+bx+c}$ you need to write the top as $f(2ax+b)+g$. Note that $2af=d$ and $fb+g=e$, you can find $f$ from the first equation and $g$ from the second. – N. S. Apr 7 '12 at 20:41
Ah, can't believe I glossed over that! After making the $u$ the bottom, you still need the $+6$ for your $du!$ – Joe Apr 7 '12 at 20:43
Exactly ;) And all you need is to create the du... – N. S. Apr 7 '12 at 20:44
Maybe you should first consider if the denominator factors into linear terms (it doesn't here, of course). – David Mitra Apr 7 '12 at 20:48
Any reason for the downvote? – Joe Jun 26 '12 at 14:55

## 4 Answers

I look at that fraction and see that the numerator differs from the derivative of the denominator by a constant, $6$. If the numerator were $2x+6$ instead of $2x$, the fraction would be of the form $u'/u$, and I’d be very happy. So I simply make it $2x+6$, subtracting $6$ to compensate:

$$\frac{2x}{x^2+6x+13}=\frac{(2x+6)-6}{x^2+6x+13}=\frac{2x+6}{x^2+6x+13}-\frac6{x^2+6x+13}\;.$$

Then I consider whether I can integrate the correction term. In this case I recognize it as the derivative of an arctangent, so I know that I’ll be able to handle it, though it will take a little algebra.

-

+1. Lovely answer, thank you. – Joe Apr 7 '12 at 20:48

Just keep in mind which "templates" can be applied. The LHS in your second line is "prepped" for the $\int\frac{du}{u}$ template. Your choices for a rational function with a quadratic denominator are limited to polynomial division and then partial fractions for the remainder, if the denominator factors (which it always will over $\mathbb{C}$). The templates depend on the sign of $a$ and the number of roots. Here are some relevant "templates": $$\eqalign{ \int\frac1{ax+b}dx &= \frac1{a}\ln\bigl|ax+b\bigr|+C \\ \int\frac{dx}{(ax+b)^2} &= -\frac1{a}\left(ax+b\right)^{-1}+C \\ \int\frac1{x^2+a^2}dx &= \frac1{a}\arctan\frac{x}{a}+C \\ \int\frac1{x^2-a^2}dx &= \frac1{2a}\ln\left|\frac{x-a}{x+a}\right|+C \\ }$$ So, in general, to tackle $$I = \int\frac{Ax+B}{ax^2+bx+c}dx$$ you will want to write $Ax+B$ as $\frac{A}{2a}\left(2ax+b\right)+\left(B-\frac{Ab}{2a}\right)$ to obtain $$\eqalign{ I & = \frac{A}{2a}\int\frac{2ax+b}{ax^2+bx+c}dx + \left(B-\frac{Ab}{2a}\right) \int\frac{dx}{ax^2+bx+c} \\& = \frac{A}{2a}\ln\left|ax^2+bx+c\right| + \left(\frac{B}{a}-\frac{Ab}{2a^2}\right) \int\frac{dx}{x^2+\frac{b}{a}x+\frac{c}{a}} }$$ and to tackle the remaining integral, you can find the roots from the quadratic equation or complete the squares using the monic version (which is easier to do substitution with). If $a=0$, use the first "template" above. If you complete the squares and it's a perfect square, or if you get one double root, then use the second. If the roots are complex or there are two distinct real roots, then (after substituting $u=x+\frac{b}{2a}$) use the third or fourth "template".

-

+1. Thanks for the quick, succinct, yet reliable answer. – Joe Apr 7 '12 at 20:49

You want to make the substitution $u=x^2+6x+13$ . Thus, $du=2x+6$ the rest follows easily from there.

-

It's not necessary to write it out like that beforehand. It comes up naturally when you try to solve it.

$\displaystyle \int \dfrac {2x} {x^{2} + 6x + 13}dx = \int \dfrac{2x}{x^2 + 6x + 9 + 4}dx = \int \dfrac{2x}{(x + 3)^2 + 4}dx$

This sounds like a job for... u-substitution! (da-da-daaaa!)

Let $u = (x+3)^2$, so that $du = 2(x+3)dx = (2x + 6)dx$

Now is when we see that we wish we had that 6. There's only one way to get it - add and subract it. So we get

$\displaystyle \int \dfrac {2x} {x^{2} + 6x + 13}dx = \int \dfrac{2x + 6 - 6}{(x + 3)^2 + 4}dx = \int \dfrac{du}{u^2 + 4} + \int \dfrac{-6}{(x+3)^2 + 4}$

At least, that's how I think of it.

-

+1. Definitely the way I would like to approach problems like this rather than having to see it immediately. Thanks for mentioning it. – Joe Apr 7 '12 at 20:55
Or similarly let $x=y-3$, changing the integral to $\frac{2y-6}{y^2+4}dy$, then split the numerator. – Mike Apr 7 '12 at 21:12
Absolutely - or that. There are many ways to approach this integral, it turns out. – mixedmath♦ Apr 7 '12 at 21:32
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 33, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9279651045799255, "perplexity_flag": "head"}