# Integration of sqrt(x^2-9)/x

FatalFlare
I used trig substitution and got sqrt(x^2-9)+3*arcsin(3/x) which seems to be incorrect when I check it in my calculator and the textbook. I made a right triangle where one of the legs was sqrt(x^2-9) and it so happens that if you switch the leg the answer becomes sqrt(x^2-9) - 3*arctan(sqrt(x^2-9)/3)) which is the correct answer. It shouldn't matter which leg I choose but it does why?