How to integrate $$\int \frac{1}{\sqrt{1+\sin(x)}}dx?$$ I am trying this question by writing $\sin(x)=\frac{2\tan(\frac{x}{2})}{1+\tan^{2}(\frac{x}{2})}$. So, the above expression will become $$\int \frac{\sec(\frac{x}{2})}{1+\tan(\frac{x}{2})}dx.$$ So, after this step the integral will become $$\int \frac{1}{\cos(\frac{x}{2})+\sin(\frac{x}{2})}dx.$$ Now, the next step of the integral will be $$\int \frac{\sin^{2}(\frac{x}{2})}{\sin(\frac{x}{2})+\cos(\frac{x}{2})}dx + \int \frac{\cos^{2}(\frac{x}{2})}{\sin(\frac{x}{2})+\cos(\frac{x}{2})}dx.$$ But after this step I can't approach further. Please help me out.
How to integrate $\int \frac{1}{\sqrt{1+\sin(x)}}dx$?
137 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
You're basically done!
Be careful with square-roots that you take the positivity into account. Hence, you should have \begin{align*} \int \frac{1}{\sqrt{1 + \sin(x)}} \ \mathrm{d}x &= \int \frac{1}{\left |\sin\left (\frac{x}{2}\right ) + \cos\left (\frac{x}{2}\right )\right |} \ \mathrm{d}x\\ &= \int \frac{1}{\sqrt{2}\left |\sin\left (\frac{x}{2} + \frac{\pi}{4}\right )\right |} \ \mathrm{d}x\\ &= \frac{1}{\sqrt{2}} \int \left |\csc \left (\frac{x}{2} + \frac{\pi}{4}\right )\right | \ \mathrm{d}x\\ &= \sqrt{2} \operatorname{sgn}\left (\tan\left ( \frac{x}{4} + \frac{\pi}{8} \right )\right ) \ln\left |\tan\left ( \frac{x}{4} + \frac{\pi}{8} \right ) \right | + C \end{align*} where the $\operatorname{sgn}$ operator accounts for sign-changes due to the $|\cdot|$ in the integrand.
You can come up with this expression by ignoring the absolute-values initially so you're left with the standard $\int \csc \theta = \ln(\tan(\frac{\theta}{2}))+C$ result, and then carefully checking the cases where $\csc$ evaluates as negative.
On
Alternatively, the affine substitution $x = \frac{\pi}{2} - 2 y$ transforms the integral, via the double-angle identity for cosine, to \begin{multline*} 2 \int \frac{dy}{\sqrt{1 + \cos 2 y}} = \sqrt 2 \int \frac{dy}{|\cos y|} = \sqrt 2 \int |\sec y| \,dy \\ = \sqrt 2 \operatorname{arsinh} \tan y + C = \sqrt{2} \operatorname{arsinh} \tan \left(\frac\pi4 - \frac{x}2\right) + C. \end{multline*}
On
$$I:= \int \frac{dx}{\sqrt{1+\sin(x)}}$$ this can be solved by a famous trick which is using $2t = \frac{\pi}{2}-x $ , $dx =-2dt $ to turn the $\sin(x) $ to $\cos(2t)$ and use the formula $\cos(2t) =2\cos^2(t)-1$ to get rid of that annoying $1$
$$I =\sqrt{2} \int \frac{dt}{|\cos(t)| } =\sqrt{2} \operatorname{sgn}(\cos(t)) \ln \left| \sec(t)+ \tan(t )\right|+C$$ $$ = \sqrt{2}\operatorname{sgn}\left(\cos\left(\frac{\pi}{4}- \frac{x}{2}\right)\right) \ln \left|\sec\left(\frac{\pi}{4}- \frac{x}{2}\right)+ \tan\left(\frac{\pi}{4}- \frac{x}{2} \right)\right|+C$$
You can write $$\cos \frac{x}{2} + \sin \frac{x}{2} = \sqrt{2} \left(\cos \frac{x}{2} \cos \frac{\pi}{4} + \sin \frac{x}{2} \sin \frac{\pi}{4}\right) = \sqrt{2} \cos \left(\frac{x}{2} - \frac{\pi}{4}\right).$$ Hence $$\frac{1}{\cos \frac{x}{2} + \sin\frac{x}{2}} = \frac{1}{\sqrt{2}} \sec \left(\frac{x}{2} - \frac{\pi}{4}\right)$$ and recall that $$\int \sec \theta \, d\theta = \log |\sec \theta + \tan \theta| + C.$$
That said, be careful: the expression $(\cos \frac{x}{2} + \sin \frac{x}{2})^{-1}$ is negative for certain values of $x$, but your integrand is always nonnegative, so you should include an absolute value somewhere.