# Why can't you integrate sqrt(1+(cosx/-sinx)^2?

Jan 29, 2015

The answer is: $\ln | \tan \left(\frac{x}{2}\right) | + c$

First of all it's useful to "change" a little the function:

$y = \sqrt{1 + {\left(\cos \frac{x}{-} \sin x\right)}^{2}} = \sqrt{1 + \frac{{\cos}^{2} x}{{\sin}^{2} x}} = \sqrt{\frac{{\sin}^{2} x + {\cos}^{2} x}{{\sin}^{2} x}} = \sqrt{\frac{1}{{\sin}^{2} x}} = \frac{1}{\sin} x$.

I used the first fondamental relation of trigonometry: ${\sin}^{2} x + {\cos}^{2} x = 1$

So we have to integrate: $\int \frac{1}{\sin} x \mathrm{dx}$.

Before integrate this function, it is useful to remember the parametric formula of sinus, that says:

$\sin x = \frac{2 t}{1 + {t}^{2}}$, where $t = \tan \left(\frac{x}{2}\right)$.

Now the integral will be done with the method of substitution:

$\tan \left(\frac{x}{2}\right) = t \Rightarrow \frac{x}{2} = \arctan t \Rightarrow x = 2 \arctan t \Rightarrow \mathrm{dx} = 2 \left(\frac{1}{1 + {t}^{2}}\right) \mathrm{dt}$.

Our integral becoms:

$\int \frac{1}{\sin} x \mathrm{dx} = \int \frac{1}{\frac{2 t}{1 + {t}^{2}}} 2 \left(\frac{1}{1 + {t}^{2}}\right) \mathrm{dt} = \int \frac{1 + {t}^{2}}{2 t} 2 \left(\frac{1}{1 + {t}^{2}}\right) \mathrm{dt} = \int \frac{1}{t} \mathrm{dt} = \ln | t | + c = \ln | \tan \left(\frac{x}{2}\right) | + c$