magnetic field is maximum at M and at P