The refractive index in the core material of the fiber varies due to variation in the composition of the core material which give rise to two types of optical fibers….