Something wrong at $\int \frac{x^2}{x^2+2x+1}dx$

285 Views Asked by At

I have to calculate $$\int \frac{x^2}{x^2+2x+1}dx$$ and I obtain: $$\int \frac{x^2}{x^2+2x+1}dx=\frac{-x^2}{x+1}+2\left(x-\log\left(x+1\right)\right)$$ but I verify on wolfram and this is equal with: $$x-\frac{1}{x+1}-2\log\left(x+1\right)$$ where did I go wrong?


P.S: Here is all steps: $$\int \:\frac{x^2}{x^2+2x+1}dx=-\frac{x^2}{x+1}+\int \:\frac{2x}{x+1}dx=-\frac{x^2}{x+1}+2\left(x-\log\left(x+1\right)\right)$$ I am sure that is not wrong, but the form on wolfram seems easily then it.

5

There are 5 best solutions below

2
On BEST ANSWER

Your answer is equivalent, since

$$\frac{-x^2}{x+1} + 2x = \frac{2x^2 + 2x-x^2}{x+1} = \frac{x^2 + 2x + 1 - 1}{x+1} = x - \frac{1}{x+1} +1$$

and it differs by a constant $1$.

1
On

$$\int \frac{x^2}{x^2+2x+1}=\int\frac{x^2+2x+1}{x^2+2x+1}+\int \frac{-2x-2}{x^2+2x+1}+\int \frac{1}{x^2+2x+1} $$

Can you take it from here?

0
On

Hint: write $$\frac{x^{2}}{\left(x+1\right)^{2}}=1+\frac{1}{\left(x+1\right)^{2}}-\frac{2}{x+1}. $$

4
On

setting $$x+1=t$$ then we get the integral $$\int \frac{(t-1)^2}{t^2}dt=\int\left(1-\frac{2}{t}+\frac{1}{t^2}\right)dt$$

1
On

You are not wrong: your answer and the Wolfram answer differ by a constant. Both answers have a term of $-2\log(x+1)$. As for the rest: $$ \text{(Yours) - (Wolfram)} = \left(2x - {x^2\over x+1}\right) - \left(x - {1\over x+1}\right) = x - {x^2-1\over x+1} = x - (x-1) = 1 $$