An approximation for the fiber refractive index profile via trapezoid formula