This is a somewhat theoretical question, but one that has some impact on power theory.
The circuit in the figure is composed of a real DC source (with non-negligible internal resistance) and feeds a non-linear load, composed of an ideal switch that switches every T/2. This problem is proposed in https://doi.org/10.1109/EPE.2019.8777983 by L. Czarnecki (a renowned power system engineer).
It seems clear that the instantaneous power is null, since the voltage is 0 when the current flows and the current is also 0 when the switch is open. It seems quite intuitive. Mathematically, the instantaneous power is defined by \$p(t)=u(t)i(t)=0\$ and the active power \$P\$ is the average value, so it should be also 0. The problem arises if you use the Fourier series for a square wave. In this case (\$\omega=\frac{2\pi}{T}\$),
$$u(t)=\frac{100}{2}\left(1+\frac{4}{\pi}\sum_{n=1,3,5...}^{\infty}\frac{1}{n}\sin{n\omega t}\right)$$ $$i(t)=\frac{100}{2}\left(1-\frac{4}{\pi}\sum_{n=1,3,5...}^{\infty}\frac{1}{n}\sin{n\omega t}\right)$$
In this case, it can be seen that the power is no longer equal to 0, as there is at least one DC term
$$p(t)=\frac{100}{2}\frac{100}{2}+...=2500+... \quad \text{[W]}$$
What do you think about this? For me, it makes more sense physically the first proposal, but I think there's something that I miss...
Update: I update the summation index to reflect odd sequence.
SOLVED: Indeed, all the terms sum up to zero. The key is that the cross products between 1 and the summations cancel out and the product of summations is
$$\left(\frac{100}{2}\frac{4}{\pi}\sum_{n=1,3,5...}^{\infty}\frac{1}{n}\sin{n\omega t}\right)\left(-\frac{100}{2}\frac{4}{\pi}\sum_{n=1,3,5...}^{\infty}\frac{1}{n}\sin{n\omega t}\right)=-2500 $$
so \$p(t)=0\$ in both time and frequency domain