You could do long division, but you'd get the same answer as doing the trick:
(u² - 1 + 2) / (u+1) = ((u² - 1)/(u+1)) + (2 / (u+1)) =
((u - 1)(u+1) / (u+1)) + (2 / (u+1)) =
u - 1 + (2 / (u+1))
Now it's simple to integrate.
(u² - 1 + 2) / (u+1) = ((u² - 1)/(u+1)) + (2 / (u+1)) =
((u - 1)(u+1) / (u+1)) + (2 / (u+1)) =
u - 1 + (2 / (u+1))
Now it's simple to integrate.
-
Long divide.
(u^2 + 1) / (u + 1)
= u - 1 + 2/(u + 1)
Integrate the equivalent expression to obtain,
u^2 / 2 - u + 2ln(u + 1) + C
(u^2 + 1) / (u + 1)
= u - 1 + 2/(u + 1)
Integrate the equivalent expression to obtain,
u^2 / 2 - u + 2ln(u + 1) + C
-
∫(u^2 + 1)/(u + 1) du = ∫(u^2 - 1 + 2)/(u + 1) du = ∫(u - 1 + 2/(u + 1)) du = (u^2)/2 - u + 2ln|u + 1| + C