Similarity solutions of differential equations for boundary layer approximations in porous media