[tex]\bf g(t)=5cos^2(\pi t)\iff g(t)=5[cos(\pi t)]^2\\\\
-----------------------------\\\\
\textit{thus, using the chain-rule}
\\\\\\
\cfrac{dg}{dt}=5\cdot 2cos(\pi t)^1\cdot \pi \cdot t^0\implies \cfrac{dg}{dt}=10\pi cos(\pi t)[/tex]
one thing to recall with trigonometric functions is that, they have the exponent next to the function, not comprising the argument as well
but the exponent applies to the whole thing
so say [tex]\bf cos^5\left( \frac{2\pi }{3}\theta \right)\iff \left[ cos\left( \frac{2\pi }{3}\theta \right) \right]^5[/tex]