<s>[INST] How to solve $\int\frac{dx}{\sqrt{4-x^2}}$ with trigonometric substitution? The integral
$$\int\frac{dx}{\sqrt{4-x^2}}$$
I've found the variable
$$x=2\sin\theta$$
$$x^2=4\sin^2\theta$$
$$dx=2\cos\theta\,d\theta$$
Which gave me by substitution
$$\int\frac{2\cos\theta}{4-\sqrt{4\sin^2\theta}}\,d\theta$$
$$\int\frac{\cos\theta}{2-\sin\theta}\,d\theta$$
$$\frac{1}{2}\int \cos\theta \,d\theta-\int\frac{\cos\theta}{\sin\theta}\,d\theta$$
$$\frac{1}{2}\int \cos\theta \,d\theta-\int\cot\theta \,d\theta$$
$$= \frac{\sin\theta}{2}-\ln|\sin\theta| + C$$
Now if I look at the expected answer, it should be
$$\arcsin\left(\frac{x}{2}\right)+C$$
What am I missing ?
 [/INST] Do you need to use trigonometric substitution? Because you can solve it easier using regular substitution. First:
$$\int{\frac{dx}{\sqrt{4(1-\frac{x^2}{4})}}}=\frac{1}{2}\int{\frac{dx}{\sqrt{1-(\frac{x}{2})^2}}}$$
We use substitution $\frac{x}{2}=t ; \frac{dx}{2}=dt$.
Now we have:
$$\int{\frac{dt}{\sqrt{1-t^2}}}=arcsint=arcsin\frac{x}{2}+c$$
</s>