Let $c,\gamma\in\mathbb R$, $\gamma\geq1$. $c\geq1$ and $T\in(0,\pi/\gamma]$ if $c=1$, resp. $T\in(0,\pi/2\gamma$ if $c>1$. In this paper, we find the necessary and sufficient conditions on $a,b\in\mathbb R$ such that the inequalities \[ \frac{in x}x>a+b\cos^c(\gamma x),\quad xı(0,T] \] and \[ \frac{in x}x<a+b\cos^c(\gamma x),\quad xı(0,T] \] hold true. We also determine the best possible constants $p$ and $q$ such that \[ \frac{2+\cos(px)}3<\frac{in x}x<\frac{2+\cos(qx)}3, \quad xı(0,i/2). \] The proofs of main results contain several auxiliary results which can be of some independent interest.