wz=Aw1z+Bw2z+pz,