Soliton Solution for the BBM and MRLW Equations by Cosine-function Method