Nonlinear waves in a liquid with gas bubbles are studied. Higher order terms with respect to the small parameter are taken into account in the derivation of the equation for nonlinear waves. A nonlinear differential equation is derived for long weakly nonlinear waves taking into consideration liquid viscosity, inter-phase heat transfer and surface tension. Additional conditions for the parameters of the equation are determined for integrability of the mathematical model. The transformation for linearization of the nonlinear equation is presented too. Some exact solutions of the nonlinear equation are found for integrable and non-integrable cases. The nonlinear waves described by the nonlinear equation are numerically investigated.