- 1,495
- 5
While integrating a rational function I stumbled upon the following problem (In the calculation of the integral the substitution u=x+1, du=d(x+1)=dx was used).
<br /> \begin{align}<br /> \int \frac{x^2}{(1+x)^2}\,dx &= \int \frac{(u-1)^2}{u^2}\,du<br /> \\<br /> &= \int du+\int \frac{du}{u^2}\ -2 \int \frac{du}{u}\<br /> \\<br /> &= u-\frac{1}{u}- 2 \log(u)<br /> \\<br /> &=1+x - \frac{1}{1+x}-2 \log(1+x)<br /> \end{align}<br />
The problem now is that if I substitute x back into the integral during step (2) I get x - \frac{1}{1+x}-2 \log(1+x).
Obviously taking the derivative of both primitives yields the same integrand.
My problem with this is that instead of getting an unknown constant I get this unwanted extra 1. Secondly if I plug this integral into mathematica it gives the result without the constant 1.
So my question is why do I get different functions without having specified the integration constant?
<br /> \begin{align}<br /> \int \frac{x^2}{(1+x)^2}\,dx &= \int \frac{(u-1)^2}{u^2}\,du<br /> \\<br /> &= \int du+\int \frac{du}{u^2}\ -2 \int \frac{du}{u}\<br /> \\<br /> &= u-\frac{1}{u}- 2 \log(u)<br /> \\<br /> &=1+x - \frac{1}{1+x}-2 \log(1+x)<br /> \end{align}<br />
The problem now is that if I substitute x back into the integral during step (2) I get x - \frac{1}{1+x}-2 \log(1+x).
Obviously taking the derivative of both primitives yields the same integrand.
My problem with this is that instead of getting an unknown constant I get this unwanted extra 1. Secondly if I plug this integral into mathematica it gives the result without the constant 1.
So my question is why do I get different functions without having specified the integration constant?