Study of self phase modulation in liquid crystals