Evaluate the integral $$\int \frac{\cos x}{\sqrt{1+\sin^2x}} \mathrm{d}x$$
Hey guys, I've been having real problems with this one. I've tried setting $u=\sin x$ so $\mathrm{d}u=\cos x ~\mathrm{d}x$ but that didn't go anywhere... Tried subbing out $\sin^2x$ via pythagorean identity but alas, I ran into another dead end. I checked the answer and it's supposed to be $\ln(1 + \sqrt{2})$, which makes me think there is some identity involved I am not aware of... Thanks in advance!
$$\int \frac {\cos x}{\sqrt {1+\sin^2 x}} \ \mathrm{d}x$$
$u = \sin x$ seems like a reasonable place to start... but we know that that is not quite right.
$\displaystyle \int \frac {1}{\sqrt {1+u^2}} \mathrm{d}u$
When we see $1+u^2$ we should be thinking of two options.
$u = \sinh t$ or $u=\tan t.$ Ultimately, either one will work. But, many Calc $1,2$ students never see the hyperbolics. I will show both approaches.
$u = \tan t, \mathrm{d}u = \sec^2 t~ \mathrm{d}t$
$\begin{aligned} \displaystyle \implies \int \frac {\sec^2 t}{\sqrt {1+\tan^2 t}} \mathrm{d}t &=\int \frac {\sec^2 t}{|\sec t|} \mathrm{d}t \\ &=\int |\sec t| \mathrm{d}t \\ &=\ln |\sec t + \tan t| + C \end{aligned}$
And reverse the substitutions.
$\begin{aligned} \ln |\sec (\arctan u) + \tan (\arctan u)| + C &=\ln |\sqrt {1+u^2} + u| + C \\ &=\ln |\sqrt {1+\sin^2 x} + \sin x| + C \end{aligned}$
Or
$u = \sinh t ,\mathrm{d}u = \cosh t$
$\begin{aligned} \implies \int \frac {\cosh t}{\sqrt {1+\sinh^2 t}} \mathrm{d}t &=\int 1~ \mathrm{d}t \\ &=t + C \\ &=\sinh^{-1} (\sin x) + C \end{aligned}$