I want to calculate the integral $$\int\frac{x-1}{x+1}\,\mathrm{d}x.$$ I have tried solving it by differentiating the denominator and substituting it, but I didn't get it. How else can I solve it?
$\endgroup$ 51 Answer
$\begingroup$$$\begin{align*} \int\frac{x-1}{x+1}\ dx &= \int\frac{x+1-2}{x+1}\ dx\\ &= \int\left(1-\frac2{x+1}\right)\ dx\\ &= \int dx - 2\int\frac{dx}{x+1}\\ &= \cdots \end{align*}$$
$\endgroup$