Power system transient stability analysis through a homotopy analysis method