Is the use of reverse chain rule with absolute values justified? eg. Integral of inverse sec x

33 Views Asked by At

With the use of antiderivative of x times inverse sec x, you get

$$\int\sec^{-1}xdx = \int\left[\frac{d}{dx}(x\sec^{-1}x) - \frac{x}{|x|\cdot \sqrt{x^2-1}}\right]dx = x\sec^{-1}x - \int\frac{d[|x|]}{\sqrt{|x|^2-1}} = x\sec^{-1}x - \ln{\Bigl||x|+\sqrt{x^2-1}\Bigr|} + C$$

Which is what my friend did

Whereas I did this

$$\int\sec^{-1}xdx = \int\left[\frac{d}{dx}(x\sec^{-1}x) - \frac{x}{|x|\cdot \sqrt{x^2-1}}\right]dx = x\sec^{-1}x - \Biggl|\int\frac{dx}{\sqrt{x^2-1}}\Biggr| = x\sec^{-1}x - \biggl|\ln{\Bigl|x+\sqrt{x^2-1}\Bigr|\biggr|} + C$$

I've also tried testing integrating other examples but it seems that both ways are correct to me, so if anyone knows a good explanation, please tell me.