I'm trying to find $\int y \, dx$ over the unit circle. I'm thinking it should be negative $\pi$, because e.g. in the 1st quadrant, dx is negative and y is positive, so the result is negative there, and likewise the rest of the way.
I also tried parameters with $y=\sin(t), x=\cos (t)$ and get $dx=-\sin (t) dt$. So it was $\int y \,dx=\int_0^{2\pi} -\sin^2(t) \, dt=-\pi$ (per Mr. Wolfram).
But the solution in Strang's calculus book says it's $\pi$ because that's the area of the region. Me confuse why it's positive, not negative.
If $D \subset \mathbb{R}^2$ is a regular, bounded and connected domain, whose boundary $\partial D$ is given by a simple, closed, piecewise regular and positively oriented curve, then for each $P\mathbf{i}+Q\mathbf{j} \in C^1(D)$ we have:
$$ \iint_D (Q_x-P_y)\,\text{d}x\,\text{d}y = \int_{\partial^+D} P\,\text{d}x+Q\,\text{d}y\,. $$
In particular, if:
$P = 0$ and $Q = x$ then $||D|| = \begin{aligned}\int_{\partial^+D}\end{aligned} x\,\text{d}y\,$;
$P = -y$ and $Q = 0$ then $||D|| = \begin{aligned}\int_{\partial^+D}\end{aligned} -y\,\text{d}x\,$;
$P = -y$ and $Q = x$ then $||D|| = \begin{aligned}\frac{1}{2}\int_{\partial^+D}\end{aligned} -y\,\text{d}x+x\,\text{d}y\,$;
which are three convenient formulas for calculating the area of $D$ via a line integral on $\partial D$.
In light of all this, it should be evident that the orientation of the boundary $\partial D$ is crucial, which is positive when following it keeps $D$ to the first left. Otherwise the integral changes sign, it's normal.
In the specific case of the unit circle, to calculate its area it's sufficient to calculate:
$$ ||D|| := \iint_D 1\,\text{d}x\,\text{d}y = \int_{\partial^+D} -y\,\text{d}x = \int_0^{2\pi} -\left(\sin\theta\right)\left(-\sin\theta\,\text{d}\theta\right) = \pi\,. $$
Obviously, by changing the sign and inverting the integration extremes, the integral doesn't change.