How to integrate $\int\sqrt{\frac{4-x}{4+x}}$? Let 
$$g(x)=\sqrt{\dfrac{4-x}{4+x}}.$$
I would like to find the primitive of $g(x)$, say $G(x)$.
I did the following: first the domain of $g(x)$ is $D_g=(-4, 4]$. Second, we have
\begin{align}
G(x)=\int g(x)dx &=\int\sqrt{\dfrac{4-x}{4+x}}dx\\
                 &=\int\sqrt{\dfrac{(4-x)(4-x)}{(4+x)(4-x)}}dx\\
                 &=\int\sqrt{\dfrac{(4-x)^2}{16-x^2}}dx\\
                 &=\int\dfrac{4-x}{\sqrt{16-x^2}}dx\\
                 &=\int\dfrac{4}{\sqrt{16-x^2}}dx-\int\dfrac{x}{\sqrt{16-x^2}}dx\\
                 &=\int\dfrac{4}{\sqrt{16(1-x^2/16)}}dx+\int\dfrac{-2x}{2\sqrt{16-x^2}}dx\\
                 &=\underbrace{\int\dfrac{1}{\sqrt{1-(x/4)^2}}dx}_{\text{set $t=x/4$}}+\sqrt{16-x^2}+C\\
                 &=\underbrace{\int\dfrac{4}{\sqrt{1-t^2}}dt}_{\text{set $t=\sin \theta$}}+\sqrt{16-x^2}+C\\
                 &=\int\dfrac{4\cos\theta}{\sqrt{\cos^2\theta}}d\theta+\sqrt{16-x^2}+C\\
\end{align}
So finally, I get 
$$G(x)=\pm\theta+\sqrt{16-x^2}+C'.$$
With wolframalpha I found some different answer. Could you provide any suggestions?
Also, multiplying by $4-x$ is it correct at the beginning? because I should say then that $x\neq 4$.

First of all, you are right that there is trouble in multiplying by $\frac{4-x}{4-x}$ when $x=4$. But why bother with the domain $\langle-4,4]$ in the first place? You can change the integrand at one point without changing integral, so that one point is irrelevant. Thus, choose $D_g = \langle-4,4\rangle$. 
The only other issue is the one that I already mentioned in the comments. If you substitute $t = \sin\theta \in\langle -1,1\rangle$, just choose $\theta$ to be in $\langle-\frac\pi 2,\frac\pi 2\rangle$ (substitution is natural bijection that way). Then you have that $\cos\theta>0$, and thus $\sqrt{\cos^2\theta}=\cos\theta$.
So, your final result should be $$4\theta + \sqrt{16-x^2} + C = 4\arcsin\frac x4 + \sqrt{16-x^2} + C$$ and if you differentiate it, you can see that the result is just fine.
Although your procedure is fine, in this case you might want to make trigonometric substitution much sooner:
$$\int\sqrt{\frac{4-x}{4+x}}\,dx = \int\frac{4-x}{\sqrt{16-x^2}}\, dx = [x = 4\sin t] =\int \frac{4-4\sin t}{4\cos t}\cdot 4\cos t\, dt=\\ = 4(t+\cos t)+C = 4\arcsin\frac x4 +4\cos(\arcsin\frac x4) + C = 4\arcsin\frac x4 +4\sqrt{1-\frac{x^2}4} + C$$
