# Calculus II - Trigonometric Substitutions, Explanation Please

Evaluate

integral sqrt(9-x^2)/x dx

I get to here

-3 ln|csc(sin^-1(x/2)+cot(sin^-1(x/3))|+3cos(sin^-1(x/3)+c

I plugged in for theta because originally I had this

-3 ln|csc(theta)+cot(theta)|+3cos(theta)+c

and I set x equal to a expression

x=3sin(theta)

Hence i had to change my equation back to terms of x because the original integral was in terms of so by solving for theta

theta=sin^-1(x/3)

-3 ln|csc(theta)+cot(theta)|+3cos(theta)+c = -3 ln|csc(sin^-1(x/2)+cot(sin^-1(x/3))|+3cos(sin^-1(x/3)+c

but I'm lost as to why

-3 ln|csc(sin^-1(x/2)+cot(sin^-1(x/3))|+3cos(sin^-1(x/3)+c=-3ln((sqrt(9-x^2)+3)/x)+sqrt(9-x^2)+c

and was hoping someone could explain why