# Where did I go wrong with this Integral?

My integral is $$\int \frac{dx}{x \sqrt{3-x^2}}$$

so I used trig substitution,

let $x$ = $\sqrt{3}\cos{\theta}$

let $dx$ = $-\sqrt{3}\sin{\theta}\ d\theta$

$$\int \frac{-\sqrt{3}\sin{\theta}\ d\theta}{\sqrt{3}\cos{\theta}\sqrt{3-(\sqrt{3}\cos{\theta})^2}}$$

$$=-\int \frac{\sin{\theta}\ d\theta}{\cos{\theta}\sqrt{3(1-\cos^2{\theta})}}$$ $$=\frac{-1}{\sqrt{3}} \int \frac{\sin{\theta}\ d\theta}{\cos{\theta}\sin{\theta}}$$ $$=\frac{-1}{\sqrt{3}} \int \sec{\theta}\ d\theta$$ $$=\frac{-1}{\sqrt{3}} \log{\left(\tan{\theta}+\sec{\theta}\right)} + C$$

Next I converted $\theta$ back into x using the triangle. If $\cos{\theta} = \frac{x}{\sqrt{3}}$ then side $a$ of the triangle = $x$ and side $c = \sqrt{3}$. The missing side, $b$, is $\sqrt{3-x^2}$.

$\tan\theta = \frac{b}a = \frac{\sqrt{3-x^2}}{x}$

$\sec\theta = \frac{1}{\cos\theta} =\frac{\sqrt{3}}{x}$.

Substituted back in my answer is

$$-\frac{1}{\sqrt3} \log\left( \frac{\sqrt{3-x^2}}{x} +\frac{\sqrt{3}}{x}\right)+C$$

but it is incorrect. I checked Wolfram Alpha and it returned

$$\frac{\log{x} -\log{ \left(\sqrt{9-3x^2}+3 \right)}}{\sqrt3}+C$$

sometimes Wolfram Alpha returns an equivalent answer, just written in different terms, so I briefly plotted both equations here in Desmos to check if they were equal, but unfortunately, they are not equivalent, although they are close. I've been trying this problem for over an hour and I can't figure out what went wrong. Can anyone show me what to do?

• They are equivalent, they differ by a constant. – Nick Pavlov Sep 29 '17 at 23:40
• Answer confirmed by Mathematica. – David G. Stork Sep 30 '17 at 0:00

There's nothing wrong. Factor out a $\sqrt 3$ from their (second) log term, and absorb it into the constant of integration. Remember, also, that $\log(a/b) = \log a - \log b$.