The question asks to find the area under one arch of the cycloid:
$$x=a(t-\sin t), y=a(1-\cos t)$$
The solution says that $A=\int_{0}^{2\pi}ydx$
I'm just confused about how they were able to get this integral. Can someone please explain how to set up this integral? Why is it not $\int y dy$?
This is the same as your standard area integral. The integral $\int_a^b f(x) dx$ represents area above the $x$-axis and below the curve $y=f(x)$, so we can replace the $f(x)$ in the integrand with a $y$.
You can also see that this should indeed be a $dx$ integral because the limits of integration are the $x$-values $0$ and $2\pi$. The cycloid never gets near the height $y=2\pi$.
That said, how do we interpret the expression $\int y dx$ in this context? We can replace the "$y$" with our expression for $y$: $a(1-\cos t)$. The "$dx$" can be replaced with $\frac{dx}{dt}dt$, taking the derivative of the $x(t)$ expression and then calculating at $dt$ integral, which also runs from $0$ to $2\pi$.