Periodic Schur forms and some matrix equations