Study of heat flow in a rod using homotopy analysis method and homotopy perturbation method