Integrate $\int \frac{2x}{x^2 +2x+1}$ Here is my attempt:
$$ \frac{2x}{x^2 +2x+1}= \frac{2x}{(x+1)^2 } = \frac{2}{x+1}-\frac{2}{(x+1)^2 }$$
Then I tried to integrate it,I got $2\ln(x+1)+\frac{2}{x+1}+C$ as my answer. Am I right? please correct me if I'm wrong.

Add and remove $2$ in the numerator, and you will obtain:
$$\frac{2x+2-2}{x^2+2x+1} = \frac{2x+2}{x^2+2x+1} - \frac{2}{x^2+2x+1}$$
Now you see that the numerator in the first fraction is nothing but the derivative of the denominator, id est you have a function of the form $\frac{f'(x)}{f(x)}$.
This hen integrated is simply 
$$\ln(x^2+2x+1)$$
Now the other term
$$2\int\frac{1}{x^2 + 2x + 1}\ \text{d}x = 2\int\frac{1}{(x+1)^2}\ \text{d}x = -\frac{2}{(x+1)}$$
Obtained by simply using $y = (x+1)$.
Final result:
$$\ln(x^2+2x+1) -\frac{2}{(x+1)}$$
The logarithm can be written also as
$$\ln((x+1)^2) = 2\ln(x+1)$$
