Optimal fourth and eighth-order iterative methods for non-linear equations