Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to calculate the integral of $1 / (2x^2+2x+1)$.

I used WolframAlpha and get this answer: $$\tan^{-1}(2x+1)$$ but I don't understand how to get there.

Can you help?

share|cite|improve this question
complete the square in the denominator. – GEdgar Mar 15 '12 at 2:22
up vote 2 down vote accepted

First note that $\displaystyle \int \frac{dy}{a^2+y^2} = \frac1a \tan^{-1}\left(\frac{y}{a} \right)$. This is obtained by substituting $y = a \tan( \theta)$ in the integrand and integrating.

For your problem, $I = \displaystyle \int \frac{dx}{2x^2 + 2x+1}$. First complete the square in the denominator i.e. rewrite $2x^2 + 2x + 1$ as $2 \left(x^2 + x + \frac12 \right) = 2 \left( \left( x + \frac12 \right)^2 + \left(\frac12 \right)^2 \right)$. Hence, we get $$I = \displaystyle \int \frac{dx}{2x^2 + 2x+1} = \int \frac{dx}{2 \left( \left( x + \frac12 \right)^2 + \left(\frac12 \right)^2 \right)} = \frac12 \int \frac{dx}{\left( \left( x + \frac12 \right)^2 + \left(\frac12 \right)^2 \right)}.$$ Setting $y = x + \frac12$, we get $$I = \frac12 \int \frac{dy}{y^2 + \left(\frac12 \right)^2} = \tan^{-1}(2y) = \tan^{-1}(2x+1).$$

share|cite|improve this answer
Thanks. That was what I had done but I made a mistake after setting $y$. – Justin D. Mar 15 '12 at 2:29

$2/((4x^2+4x+1)+1)$ just multiply the numerator and denominator by 2

share|cite|improve this answer
Somebody had flagged this answer for low quality. I think that it is ok. – Jyrki Lahtonen Mar 15 '12 at 8:06
Well, I have little knowledge of Latex. Thank you for your comment. – eccstartup Mar 15 '12 at 9:39
@Jyrki: That was not "somebody", but rather the automatic process which flags certain posts which it thinks to have a low quality score. Often those are short messages which contain LaTeX code (which the machine probably recognizes as junk of some sort). – Asaf Karagila Mar 15 '12 at 11:26
@AsafKaragila, thanks for the explanation. This was one of the first times SW managed to call my attention to a list of flagged posts (+10k users have the privilege to reinforce/water down such messages to moderators), and I'm inexperienced at that. It does sound like I did the right think in directing the moderators' attention elsewhere? – Jyrki Lahtonen Mar 15 '12 at 11:29

Here's the method to completion. If it still doesn't make sense, post your progress and we can proceed from there.

You should complete the square on the bottom, use a u-substitution on the squared part, and use the regular arctan integral.

Does that make sense?

share|cite|improve this answer
I don't understand how Wolfram goes from $1 / (1+2x+2x²) $ to $1 / (sqrt(2)x + 1/(sqrt(2)))² + 1/2$. – Justin D. Mar 15 '12 at 2:22
@JustinDomingue: See my answer. – Samuel Reid Mar 15 '12 at 2:23

Well, there are a few general methods that you want to employ when you see a rational function like that. Remember to look for completing the square, inverse trigonometric substitutions, direct substitutions, integration by parts, or partial fractions. In this case, it seems like completing the square or maybe even just factoring it might work, I'll give it a shot.

$$\int \frac{1}{2x^2 + 2x +1} dx = \int \frac{1}{2(x^2 + x + \frac{1}{2})} dx= \int \frac{1}{2((x+\frac{1}{2})^2 + \frac{1}{4})} dx$$

From here I would recommend using a direct substituion of $u=x + \frac{1}{2}$ and continuing from here as suggested in the other answers.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.