In this paper, we establish sharp inequalities for trigonometric functions. For example, we consider the Wilker inequality and prove that for 0 < x < π/2 and n ≥ 1, 2 + ( n−1∑ j=2 d j+1x2 j+ δnx2n) x3 tan x < ( sin xx )2 + tan xx < 2 + ( n−1∑ j=3 d j+1x2 j+Dnx2n) x3 tan x with the best possible constants δn = dn and Dn = 2π6 − 168π4 + 15120 945π4 ( 2 π )2n − n−1∑ j=2 d j+1 ( 2 π )2n−2 j , where dk = 22k+2 ( (4k + 6) |B2k+2| + (−1)k+1 ) /(2k + 3)! and Bk are the Bernoulli numbers (k ∈N0 :=N ∪ {0}). This improves and generalizes the results given by Mortici, Nenezić and Malešević.