<s>[INST] Weird integral found in textbook I found the following integral in a calculus textbook.
$$\int_{-1}^1\frac{\mathrm d x}{\sqrt{4-x^2}}$$
What is $\mathrm d x$ doing up there and how do I fix this??? I didn't even know it was possible to write an integral like this. Much help needed.
 [/INST] The $dx$ is a symbol, that tells you by which variable to integrate. But it is often treated like a factor. Different ways to write this integral would be
$$ \int_{-1}^1 \frac{dx}{\sqrt{4-x^2}} = \int_{-1}^1 \frac{1}{\sqrt{4-x^2}}dx = \int_{-1}^1 dx \frac{1}{\sqrt{4-x^2}}. $$
The first variant is often used to save space, the last variant is often used in a physics context.

In order to solve this, we can use a substitution. $\sqrt{4-x^2}$ has actually something to do with a circle, so we choose a substitution that involves trig functions. In this case $x=2\sin t$ would be a good choice. We see that for $t=-\frac\pi6$ it is $-1=2\sin(-\frac\pi6)$ and for $t=\frac\pi6$ it is $1=2\sin(\frac\pi6)$. Also $2\sin t$ is monotonous on the interval $(-\frac\pi6,\frac\pi6)$. We have done this to find out the limits of our substituted integral.
Now we need the derivative of $x$ with respect to $t$:
$$ \frac{dx}{dt} = 2\cos t.$$
Since we want to substitute $t$ for $x$, we treat $dx$ and $dt$ symbolically as numbers in order to solve for $dx = 2\cos t\;dt$.
Now we plug everything together:
\begin{align*}
\int_{-1}^1\frac{dx}{\sqrt{4-x^2}} &= \int_{-\frac\pi6}^{\frac\pi6} \frac{2\cos t\;dt}{\sqrt{4 - (2\sin t)^2}} \\
&= \int_{-\frac\pi6}^{\frac\pi6} \frac{2\cos t\;dt}{\sqrt{4(1 - \sin^2 t)}} \\
&= \int_{-\frac\pi6}^{\frac\pi6} \frac{2\cos t\;dt}{2\sqrt{\cos^2 t}},
\end{align*}
where we have used the trigonometric pythogoras $1=\sin^2+\cos^2$. Now we see that for $t\in(-\frac\pi6,\frac\pi6)$ we have $\cos t \geq 0$ and thus $\sqrt{\cos^2t} = \cos t$. Going on:
\begin{align*}
\int_{-1}^1\frac{dx}{\sqrt{4-x^2}} 
&= \int_{-\frac\pi6}^{\frac\pi6} \frac{2\cos t\;dt}{2\sqrt{\cos^2 t}} \\
&= \int_{-\frac\pi6}^{\frac\pi6} \frac{\cos t\;dt}{\cos t} \\
&= \int_{-\frac\pi6}^{\frac\pi6} dt
= \int_{-\frac\pi6}^{\frac\pi6} 1 dt \\
&= [t]_{-\frac\pi6}^{\frac\pi6} = \frac\pi6 - (-\frac\pi6) = 2\frac\pi6 = \frac\pi3.
\end{align*}
</s>