Show $\int_0^{2\pi}\cos^2t\,dt=\pi$ using Pythagorean Theorem
Your argument is definitely valid. To add more explanation, we can say that $$ \int_{a}^{a+T} f(x)dx = \int_{0}^{T} f(x) dx $$ for any $T$-periodic function $f(x)$ (try to prove this rigorously), and then $$ \int_{0}^{2\pi} \sin^{2} t dt = \int_{0}^{2\pi} \cos^{2}\left(t-\frac{\pi}{2}\right) \,dt = \int_{-\frac{\pi}{2}}^{2\pi - \frac{\pi}{2}} \cos^{2}t\,dt = \int_{0}^{2\pi} \cos^{2}t\,dt $$