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$.