<s>[INST] Evaluate the following integral, $\int\sqrt{4-\sqrt{x}}dx$ Evaluate the following integral,
$$\int\sqrt{4-\sqrt{x}}dx$$


$$\int \sqrt{4-\sqrt{x}}dx=\int \sqrt{2^2-(x^{1/4})^2}dx$$
    Considering the common subsitution for $a^2-x^2$, let $$x^{1/4}=2\sin t$$
    $$x=16\sin^4t$$$$\int dx=\int 64\sin^3t\cos t dt$$
Therefore by subsitution, we have
    $$\int \sqrt{4-\sqrt{x}}dx=\int \sqrt{{4-(2\sin t)^2}}(64 \sin^3t\cos t)dt=\int \sqrt{4\cos^2 t}(64 \sin^3t\cos t) dt=\int128\cos^2t\sin^3 t dt=\int 128(\cos^2 t)*(1-cos^2t)\sin tdx=128\int \cos^2t\sin t-\cos^4 t\sin t dt=128(-1/3\cos^3 t+1/5\cos^5t)+C$$


Is there any mistake in my workings? This is a very important piece of work for me, and I was hoping SE could check it for me. Thanks! 
I suspect something is very wrong but I can't dig the mistake...i.e I tested it for a definite integral and it got me a different answer.
P.S Sorry about the messy typing. I am rather new to LaTex. 
 [/INST] So, substitute $u = \sqrt{x}$ and  $\mathrm{d}u = \frac{1}{2 \sqrt{x}} \,\mathrm{d}x$:
$$= 2 \int \!\sqrt{4-u}\, u \, \mathrm{d}u$$
For the integrand $\sqrt{4-u}\, u$, substitute $s = 4-u$ and  $\mathrm{d}s = - \mathrm{d}u$:
$$= 2 \int \!(s-4) \sqrt{s}\, \mathrm{d}s$$
Expanding the integrand $(s-4) \sqrt{s}$ gives  $s^{\frac{3}{2}}-4 \sqrt{s}$:
$$= 2 \int\! (s^{\frac{3}{2}}-4 \sqrt{s})\, \mathrm{d}s$$
Integrate the sum term by term and factor out constants:
$$= 2 \int \!s^{\frac{3}{2}} \, \mathrm{d}s-8 \int\! \sqrt{s}\,\mathrm{d}s$$
The integral of $\sqrt{s}$ is $\frac{2 }{3}\,s^\frac{3}{2}$:
$$= 2 \int \!s^{\frac{3}{2}}\,\mathrm{d}s-\frac{16}{3}\,s^{\frac{3}{2}}$$
The integral of $s^\frac{3}{2}$ is $\frac{2}{5}s^\frac{5}{2}$:
$$= \frac{4}{5}s^\frac{3}{2}-\frac{16}{3} s^\frac{3}{2}+constant$$
Substitute back for $s = 4-u$:
Hope I didn't made any typos.
$$= \frac{4}{5} (4-u)^\frac{5}{2}-\frac{16}{7} (4-u)^\frac{3}{2}+constant$$
Substitute back for $u = \sqrt{x}$:
$$= \frac{4}{5} (4-\sqrt{x})^\frac{5}{2}-\frac{16}{3} (4-\sqrt{x})^\frac{3}{2}+constant$$
Factor the answer a different way:
$$= -\frac{4}{15} (4-\sqrt{x})^\frac{3}{2} \,(3 \sqrt{x}+8)+constant$$
</s>