I have the integral $$ \int \frac{\sqrt{1-x^2}}{x}\;dx $$ I do a trig. substitution $x = \sin(\theta)$. Then I get $\sqrt{1-x^2} = \cos(\theta)$. So $$ \int \frac{\sqrt{1-x^2}}{x}\;dx = \int \frac{\cos(\theta)}{\sin(\theta)}\; d\theta = \ln\lvert \sin(\theta)\rvert + C= \ln\lvert x\rvert + C. $$ But I am thinking that I made a mistake somewhere because the derivative of $\ln\lvert x\rvert$ is not $\frac{\sqrt{1-x^2}}{x}$.
Where is my mistake?
The omission is $dx=\cos(\theta)d\theta$.