Integral of $\sin^2 \pi x$ Evaluate 
$$\int_0^{1/4} \sin^2 \pi x \; dx$$
Can someone please explain what to do if theres a power and how to do it in general thanks

Hint
$$\sin^2 x=\frac{1}{2}(1-\cos(2x))$$
And in general
$$\sin^p x=\left(\frac{1}{2i}(e^{ix}-e^{-ix})\right)^p$$
and use the binomial formula.
Added

 $$\int_0^{1/4} \sin^2 \pi x \; dx=\int_0^{1/4}\frac{1}{2}(1-\cos(2\pi x))dx=\frac{1}{8}-\frac{1}{4\pi}\sin(2\pi x)\Big|_0^{1/4}=\frac{1}{8}-\frac{1}{4\pi}$$

