Correct result for this integral $\int \frac{\sqrt{\sqrt{\sqrt{2 \cos \left(5 \sqrt{x}+4\right)+2}+2}+2}}{\sqrt{x}}\, dx$ Wolfram|Alpha and its CAS, Wolfram Mathematica are, as far as I know, the only website and software that give the correct solution to this integral,
$$ f(x) = \frac{\sqrt{\sqrt{\sqrt{2 \cos \left(5 \sqrt{x}+4\right)+2}+2}+2}}{\sqrt{x}} $$
$$ F(x) = \int f(x)\, dx$$
because deriving the function given as result and using the FullSimplify function of Mathematica we get to the original function that we wanted to integrate.
This is the solution:
$$ F(x) = \frac{1}{5} (-8) \sqrt{2} \sqrt{\cos \left(5 \sqrt{x}+4\right)+1} \sqrt{\sqrt{2} \sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+2} \left(\sqrt{\sqrt{2} \sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+2}-2\right) \sqrt{\sqrt{\sqrt{2} \sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+2}+2} \csc \left(5 \sqrt{x}+4\right) + C $$
Fricas finds another expression for the integral that I'm curious about:
$$ F(x) = \frac{1}{5} (-8) \sqrt{2} \sqrt{\sqrt[4]{2} \sqrt{\sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+\sqrt{2}}+2} \left(\sqrt{2} \cos \left(5 \sqrt{x}+4\right)-2 \sqrt{\sqrt{2} \sqrt{\cos \left(5 \sqrt{x}+4\right)+1} \left(\sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+\sqrt{2}\right)+2 \sqrt{\cos \left(5 \sqrt{x}+4\right)+1}+\sqrt{2}}\right) \csc \left(5 \sqrt{x}+4\right) + C$$
However, in this video, an incorrect result is given although the integration process seems correct. As above, you know that the result is incorrect since deriving the resulting function doesn't result in the original function we wanted to integrate.
Is the expression given by Fricas equivalent to the one given by Wolfram|Alpha and Mathematica?
Final update: According to Mathematica, the expression given by FriCAS is not equal to the correct solution given by Mathematica and Wolfram|Alpha. This means it is not the solution to this problem.
Even though I have a Pro Premium subscription, the step-by-step solution is not available for this input. What are the steps taken by Mathematica/Wolfram|Alpha to get to the given result?

 A: This is a partial solution, equivalent to the process used in the video, which is only valid if
$$\cos\frac t2$$
is non-negative.
Start with this identity:
$$\sqrt{2+2\cos t} = \sqrt{4\cos^2\frac t2} = 2\cos\frac t2$$
For applying this to the integrand, first make the substitution $t = \sqrt x$, then successively apply this property.
$$\begin{gather}
I = \int\sqrt{2 + \sqrt{2 + \sqrt{2 + 2\cos(5t+4)}}}\cdot 2dt\\
= \int\sqrt{2 + \sqrt{2+2\cos\left(\frac{5t+4}{2}\right)}} \cdot 2 dt\\
= \int\sqrt{2 + 2\cos\left( \frac{5t+4}{4}\right)} \cdot 2dt \\
= \int 4\cos\left(\frac{5t+4}{8}\right) dt \\
= \frac{32}{5}\sin\left( \frac{5\sqrt x + 4}{8} \right) + C
\end{gather}$$
A: These are the steps to get to the given result:
$$f(x)=\dfrac1{\sqrt x}\sqrt{2+\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}
=\dfrac1{\sqrt x}\,\dfrac{\sqrt{2-\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}}$$
$$=\dfrac1{\sqrt x}\,\dfrac{\sqrt{2-2\cos(5\sqrt x+4)\large\mathstrut}}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}$$
$$=\dfrac1{\sqrt x}\,\dfrac{\sqrt{4-4\cos^2(5\sqrt x+4)\large\mathstrut}}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}$$
$$=\dfrac25\,\dfrac{2\cdot\dfrac5{2\sqrt x}\,|\sin(5\sqrt x+4)|}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}$$
$$=-\dfrac{4}5\,\dfrac{\operatorname{sign}(\sin(5\sqrt x+4))\cdot(2+2\cos(5\sqrt x+4))'}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}\;2\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}$$
$$=-\dfrac{8}5\,\dfrac{\operatorname{sign}(\sin(5\sqrt x+4))\cdot\left(2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}\right)'}{\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\;2\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}$$
$$=\dfrac{16}5\,\dfrac{\operatorname{sign}(\sin(5\sqrt x+4))\cdot\left(2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}\right)'}{2\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}}$$
$$=\dfrac{16}5\,\operatorname{sign}(\sin(5\sqrt x+4))\cdot\left(\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}\right)'.$$
Now we can easily verify that the function
$$F(x)=\dfrac{16}5\,\operatorname{sign}(\sin(5\sqrt x+4))\cdot\sqrt{2-\sqrt{2+\sqrt{2+2\cos(5\sqrt x+4)\large\mathstrut}}}+C$$
corresponds to the given one in the OP.
