Having problems with the substitution. I don't see how it fits, although I feel like I am doing it correctly.

int arcsec(x) dx

=xarcsec(x) - int (x)/((x)(sqrt((x^2)-1)))

=xarcsec(x) - int 1/(sqrt(x^2)-1)

Here I try to use substitution but it doesn't seem to go well for me. Thanks in advance!