Question: [This question](https://i.stack.imgur.com/YY664.jpg) recently popped up on one of my tests and I still have no idea on how to even begin.

I tried assuming $\sin(x+2A)+\sin(A)=t^2$ which did not help at all.

Then I went on to multiply and divide by $\tan x$ to create a derivative on the numerator, still does not help.

I even tried to expand $\sin(x+2A)$ which too does not seem to follow.

I have also tried Approach$0$ and Wolfram Alpha but they do not seem to help.

and many more...

Now I am stumped I have no idea as to how to even begin. I have tried everything that I could think of.

Note that we are only familiar with basics of integration(no contour integrals ; no special functions etc..)

$\bullet~\textbf{Question:}~$

"Can the above integral be evaluated in elementary functions?" If yes then how? If not , can we prove that it cannot be solved using elementary funcions?

Answer: 
*Not elementary at all*

$$I=\int \frac{\sec (x)}{\sqrt{\sin(x+2a)+\sin(a)}}\,dx$$
$$\sin(x+2a)+\sin(a)=\sin (a)+\sin (2 a) \cos (x)+\cos (2 a) \sin (x)$$
Using the tangent half-angle substitution $x=2 \tan^{-1}(t)$
$$\sin(x+2a)+\sin(a)=\frac{(\sin (a)+\sin (2 a))+2 t \cos (2 a)+t^2 (\sin (a)-\sin (2 a))}{1+t^2}$$
$$(\sin (a)+\sin (2 a))+2 t \cos (2 a)+t^2 (\sin (a)-\sin (2 a))=$$
$$(\sin (a)-\sin (2 a))\left(t+\tan \left(\frac{3 a}{2}\right)\right) \left(t-\cot
 \left(\frac{a}{2}\right)\right)$$
Let
$$\alpha=\sin (a)+\sin (2 a)\qquad \beta=\tan \left(\frac{3 a}{2}\right) \qquad \gamma=\cot \left(\frac{a}{2}\right)$$

$$I=\frac 2 \alpha \int \frac {\sqrt{1+t^2}} {(1-t^2)\sqrt{(t+\beta) (t-\gamma) }}\,dt$$

The result is given in terms of elliptic integrals (have a look [here](https://www.wolframalpha.com/input/?i=Integrate%5BSqrt%5B1+%2B+t%5E2%5D%2F%28%281+-+t%5E2%29*Sqrt%5B%28t+%2B+%5C%5BBeta%5D%29*%28t+-+%5C%5BGamma%5D%29%5D%29%2Ct%5D)).

**Edit**

$$a=\frac \pi 4 \qquad \qquad \implies \qquad I=2 \sqrt{2-\sqrt{2}} \,\,\Pi \left(2;\frac{x}{2}|4-2 \sqrt{2}\right)$$
Let
$$A=\dfrac\pi2-2b,\quad x=4b-\dfrac\pi2-y,\tag1$$
then
$$I=\int\dfrac{\text dy}{\cos(y-4b)\sqrt{\cos y+\cos2b}}
=\int\dfrac{\text dy}{(\cos4b\cos y+\sin4b\sin y)\sqrt{\cos y+\cos2b}}$$
$$=\int\dfrac{(\cos4b\cos y-\sin4b\sin y)\,\text dy}{(\cos^2 4b\cos^2 y-\sin^2 4b\sin^2y)\sqrt{\cos y+\cos2b}}=I\_1\cos4b-I\_2\sin4b,$$
where
$$I\_1=\int\dfrac{\cos y\,\text dy}{(\cos^2y-\sin^24b)\sqrt{\cos y+\cos2b}}, \tag2$$
$$I\_2=\int\dfrac{\sin y\,\text dy}{(\cos^2y-\sin^2 4b)
)\sqrt{\cos y+\cos2b}}.\tag3$$
Integral $\,I\_2\,$ can be expressed via elementary functions (see the WA
result below).

[![Second integral](https://i.stack.imgur.com/zAq3W.png)](https://i.stack.imgur.com/zAq3W.png)

At the same time, the first integral in the common case can be expressed via elliptic integral of the third kind and cannot be expressed via elementary
functions.

[![The first integral.](https://i.stack.imgur.com/E7tTK.png)](https://i.stack.imgur.com/E7tTK.png)

However, for $\;b=\dfrac\pi2 k,\;A=\dfrac\pi2+\pi n,\; k,n\in\mathbb Z\;$
there are exceptions

[![Exception](https://i.stack.imgur.com/Q7ouR.png)](https://i.stack.imgur.com/Q7ouR.png)