On Wikipedia, I recently stumbled upon a method of obtaining the volume of a solid of revolution generated by a curve in parametric form, which was useful in my case because I had a curve I had trouble representing as an equation of 2 variables. However, when I got strange results (integrating an odd function from $-a$ to $a$, volume should have been nonzero), I tried testing the formula on something simpler: a sphere.
Wikipedia gives a formula for the volume of a solid of revolution generated by taking a curve with $x$ and $y$ given as functions of $t$ and rotating it around the $y$-axis as
$$V=\int_a^b\pi x^2\frac{dy}{dt}dt$$
which I attempted to use on the sphere generated by rotating
$$x^2+y^2=r^2,x>0$$
around the y-axis. To change this to parametric form, I applied a substitution
$$x=r\sin t,y=r\cos t,\frac{dy}{dt}=-r\sin t$$ $$\int_0^\pi\pi x^2\frac{dy}{dt}dt=\pi r^3\int_0^\pi-\sin^3tdt=\pi r^3\int_0^\pi-\sin t(1-\cos^2t)dt$$ $$u=\cos t,du=-\sin tdt$$ $$\pi r^3\int_1^{-1}1-u^2du=\pi r^3(u-\frac{u^3}3]^{-1}_1)=$$ $$\pi r^3(-1+\frac13-1+\frac13)=-\frac43\pi r^3$$
Which is right except for the minus sign. Why did it come out negative? Was it a mistake on my end or a problem with Wikipedia's formula?