An extension of a theorem by C. Miranda in weighted spaces