Doubts in solving the integral $\int \frac{1}{\sqrt{1+\sin2x}}dx$

303 Views Asked by At

I tried to solve the integral $\int \frac{1}{\sqrt{1+\sin2x}}dx$ by using $1+\sin2x=(\sin x+\cos x)^2$ but got stuck. So I referred the solution in my book which is given below:

$$ I=\int \frac{1}{\sqrt{1+\sin2x}}dx $$ $$ = \int \frac{1}{\sqrt{1-\cos(\frac \pi 2+2x)}}dx\tag1\\ = \int \frac{1}{\sqrt{2\sin^2(\frac \pi 4+x)}}dx\\ =\frac 1 {\sqrt2} \int \csc\left(\frac \pi 4+x\right)dx\\ = \color{red}{\frac 1 {\sqrt2} \log\left|\tan\left(\frac \pi 8+\frac x 2\right)\right|+C}(*) $$

I wondered what if I replaced $\sin 2x$ by $\cos\left(\frac \pi 2 -2x\right)$ instead of $-\cos\left(\frac \pi 2 +2x\right)$ in step $(1)$. So I proceeded as follows:

$$ I=\int \frac{1}{\sqrt{1+\sin2x}}dx $$ $$ = \int \frac{1}{\sqrt{1+\cos(\frac \pi 2-2x)}}dx\\ = \int \frac{1}{\sqrt{2\cos^2(\frac \pi 4-x)}}dx\\ =\frac 1 {\sqrt2} \int \sec\left(\frac \pi 4-x\right)dx\\ = \color{red}{\frac 1 {\sqrt2} \log\left|\tan\left(\frac {3\pi} 8-\frac x 2\right)\right|+C}(**) $$

But I got a different result. Could you please explain the reason for this anomaly? Is it wrong to do a different replacement in step $(1)$? I think it shouldn't make any difference.

Further, could you please explain how to think we must be doing the replacement instead of using $1+\sin2x=(\sin x+\cos x)^2$ to solve this integral? I got this idea only after looking the solution.


*Using $\int \csc x dx=\log\left|\tan\left(x/2\right)\right|+C$

**Using $\int \sec x dx=\log\left|\tan\left(\frac \pi 4 +\frac x 2\right)\right|+C$

4

There are 4 best solutions below

2
On BEST ANSWER

I think I prefer your first idea for its cuteness. You're only a step away, for you have that $$\sin x+\cos x=\sqrt 2\sin\left(x+\fracπ4\right).$$

Then you would only want to do something which is a constant multiple of the form $$\int\csc y\mathrm dy,$$ which is a standard integral.

0
On

$$ \begin{aligned} I&=\int \frac{1}{\sqrt{1+\sin 2 x}} d x \\ & =\int \frac{1}{\sqrt{(\sin x+\cos{x})^2}} d x \\ & =\operatorname{sgn}(\cos{x}+\sin x) \int \frac{d x}{\cos x+\sin x} \\ & = \operatorname{sgn}(\cos x+\sin x)\int \frac{1}{\sqrt{2} \cos \left(x-\frac{\pi}{4}\right)} d x \\ & =\frac{\operatorname{sgn}(\cos x+\sin x)}{\sqrt 2} \ln \left|\sec \left(x-\frac{\pi}{4}\right)+\tan \left(x-\frac{\pi}{4}\right)\right| \\ & =\frac{\operatorname{sgn}(\cos x+\sin x) }{\sqrt{2}} \ln\left|\frac{\sqrt 2+\sin x-\cos x}{\cos x+\sin x}\right|+C \\ & \end{aligned} $$

0
On

Neither $\frac 1 {\sqrt2} \ln\left|\tan\left(\frac \pi 8+\frac x 2\right)\right|$ nor $\frac 1 {\sqrt2} \ln\left|\tan\left(\frac {3\pi}8-\frac x 2\right)\right|$ is correct. The anti-derivative valid over all domain is instead $$ \int \frac{1}{\sqrt{1+\sin2x}}dx = \frac{ \cos (x-\frac\pi4)}{\sqrt{1+ \sin 2x}}\tanh^{-1}\left(\sin(x-\frac\pi4)\right)+C $$

0
On

$\sqrt{1+sin2x}=\sqrt{(sinx+cosx)^{2}}=\sqrt{2}\left| sin(x+\frac{\pi}{4}) \right|\\ z=x+\frac{\pi}{4}\Rightarrow dz=dx\\ \displaystyle\int\frac{dx}{\sqrt{1+sin2x}}=\frac{1}{\sqrt{2}}\int\frac{dz}{\left| sinz \right|}\\ 1)sinz\gt 0\\ \displaystyle\int\frac{dz}{\left| sinz \right|}=\int\frac{sinzdz}{sin^{2}z}=\int\frac{sinzdz}{1-cos^{2}z}\\ (y=cosz)\to \displaystyle \int\frac{dz}{\left| sinz \right|}=-\int\frac{dy}{1-y^{2}}=-\frac{1}{2}\int(\frac{1}{1+y}+\frac{1}{1-y})dy=-ln\sqrt{1-y^{2}}+c\\ \displaystyle\int\frac{dx}{\sqrt{1+sin2x}}=-\frac{1}{\sqrt{2}}ln\left| sin(x+\frac{\pi}{4}) \right|+c\\ 2)sinz\lt 0\\ \displaystyle\int\frac{dz}{\left| sinz \right|}=-\int\frac{dz}{sinz}=\frac{1}{\sqrt{2}}ln\left| sin(x+\frac{\pi}{4}) \right|+c$