As the composition sum of differentiable functions, shouldn't it also be differentiable? I am aware that a square wave is non-continuous non-smooth and thus not differentiable, I am just having trouble finding the flaw in the above argument.
Edited inaccuracies that were pointed out!