using substitution wrongly Solving integral, first way:
$$\int \frac{du}{u^2-9}=-\int \frac{du}{9-u^2}$$
$$u={3\sin v}$$
$$du=3\cos vdv$$
$$-\int \frac{3\cos vdv }{9-9\sin^{2}v}=-\frac 13\int\frac{dv}{\cos v}=-\frac 13\ln\left(\sec v+\tan v\right)=-\frac13 \ln \frac {\frac u3}{\sqrt{1-\frac{u^2}{9}}}$$
$$-\frac13 \ln \frac{u}{\sqrt{9-u^2}}=-\frac16 \ln \frac {u^2}{9-u^2}=\frac16 \ln \frac{9-u^2}{u^2}$$
second way:
$$\int \frac{du}{u^2-9}=\frac 16\int \frac{du}{u-3}-\frac16 \int \frac{du}{u+3}=\frac16 \ln \frac {u-3}{u+3}$$
what's wrong with first way?
Thanks all. $1$ from $\sec$ is missed, must be $1+\frac u3$

$-\dfrac 13 \ln|\sec v + \tan v|$ $ = -\dfrac 13 \ln \left| \dfrac{1+\sin v}{\cos v} \right| \\ = -\dfrac 13 \ln \left|\dfrac{3+u}{\sqrt{9-u^2}}\right| \\ = - \dfrac 16 \ln \left|\dfrac{(3+u)^2}{(3-u)(3+u)}\right| \\ = \dfrac 16 \ln\left|\dfrac{3-u}{3+u}\right|$
