Universal substitution or Feynman trick to solve this integral I started with an integral $ \int_{0}^{2\pi} \sqrt{2[\sin^2(t) + 16\cos^2(t) - 4\sin(t)\cos(t)]} \,dt $
And I simplified it to $ \int_{0}^{2\pi} \sqrt{17 + 15\cos(2t) - 4\sin(2t)} \, dt$
My question: I know this can be simplified with some sort of substitution that cancels the $\sin$ and $\cos$ with a $u$-sub, but I do not know how. I saw it online, with no explanation (see the first answer: find length of curve of intersection).
I think this has an exact elementary solution, if you use $\tan\left(\frac x2\right)$ substitution and possibly Feynman's trick if necessary.
 A: $\begin{align}
\int_0^{2\pi}\sqrt{17+15\cos2t-2\sin2t}\,dt&\overset{2t=x}{=}\frac12\int_0^{4\pi}\sqrt{17+15\cos x-2\sin x}\,dx\\
&=\int_0^{2\pi}\sqrt{17+15\cos x-2\sin x}\,dx\\
&=\int_0^{2\pi}\sqrt{17+\sqrt{229}\cos(x+\alpha)}\,dx\\
&=\int_\alpha^{2\pi+\alpha}\sqrt{17+\sqrt{229}\cos x}\,dx\\
&=\int_0^{2\pi}\sqrt{17+\sqrt{229}\cos x}\,dx\\
&=2\int_0^{\pi}\sqrt{17+\sqrt{229}\cos x}\,dx\\
&=2\int_0^{\pi}\sqrt{17+\sqrt{229}-2\sqrt{229}\sin^2(\frac x2)}\,dx\,\, (\text{By $\cos x=1-2\sin^2(x/2)$})\\
&\overset{x\rightarrow 2x}{=}4\int_0^{\pi/2}\sqrt{17+\sqrt{229}-2\sqrt{229}\sin^2x}\,dx\\
&=4\sqrt{17+\sqrt{229}}\int_0^{\pi/2}\sqrt{1-\frac{2\sqrt{229}}{17+\sqrt{229}}\sin^2x}\,dx\\
&=4\sqrt{17+\sqrt{229}}\int_0^{\pi/2}\sqrt{1-\frac{17\sqrt{229}-229}{30}\sin^2x}\,dx\\
&=4\sqrt{17+\sqrt{229}}E\left(\sqrt{\frac{17\sqrt{229}-229}{30}}\right)
\end{align}$
In agreement with Wolfram Alpha. Here, WA uses $m=\frac{17\sqrt{229}-229}{30}$ but I used $k=\sqrt m$ as the variable of the function $E$.
A: I don't think this integral has an elementary closed form, but there is a way to express it in terms of a complete elliptic integral of the second kind like this:
$$
\begin{align}
\int_{0}^{2\pi}\sqrt{17+15\cos2x-4\sin2x}dx &= \frac{1}{2}\int_{0}^{4\pi}\sqrt{17+15\cos x-4\sin x}dx \\
&= \int_{0}^{2\pi}\sqrt{17+15\cos x-4\sin x}dx \\
&= \int_{0}^{2\pi}\sqrt{17-\sqrt{241}\sin\left(x-\arctan\left(\frac{15}{4}\right)\right)}dx \\
&= \int_{-\arctan\left(\frac{15}{4}\right)}^{2\pi-\arctan\left(\frac{15}{4}\right)}\sqrt{17-\sqrt{241}\sin x}dx \\
&= \int_{0}^{2\pi}\sqrt{17-\sqrt{241}\sin x}dx \\
&= \int_{0}^{2\pi}\sqrt{17-\sqrt{241}\cos x}dx \\
&= \sqrt{17}\int_{0}^{2\pi}\sqrt{1-\frac{\sqrt{241}}{17}\cos x}dx \\
&= 4\sqrt{17-\sqrt{241}} \operatorname{E}\left(\frac{2\sqrt{241}}{\sqrt{241}-17}\right)
\end{align}
$$
where in the last line, we use this result.
