In the given solution energy is given as
$$E=\dfrac{A^2}{2}\int_{-0.5T}^{0.5T}1+\cos\left(\dfrac{2\pi t}{T}\right)dt=\dfrac{1}{2}A^2T $$
Why does the rect function disappear?
In the given solution energy is given as
$$E=\dfrac{A^2}{2}\int_{-0.5T}^{0.5T}1+\cos\left(\dfrac{2\pi t}{T}\right)dt=\dfrac{1}{2}A^2T $$
Why does the rect function disappear?
It is implicit in the integral. You compute it just from $-0.5T$ to $+0.5T$, where the $\mbox{rect}$ is constant and equal to 1.