A simple proof of Kotake–Narasimhan theorem in some classes of ultradifferentiable functions