Text this: Solving variational problems by homotopy–perturbation method