1 Introduction

For \(x>0\), the classical gamma function \(\Gamma(x)\) and the psi function \(\psi(x)\) are, respectively, defined by

$$ \Gamma(x)= \int_{0}^{\infty}t^{x-1}e^{-t}\,dt, \qquad \psi(x)=\frac{\Gamma ^{\prime}(x)}{\Gamma(x)}, $$

they satisfy

$$\begin{aligned}& \Gamma(x+1)=x\Gamma(x),\qquad\psi(x+1)=\psi(x)+\frac{1}{x}, \\& \psi(x)=\sum_{n=0}^{\infty}\frac{x-1}{(n+1)(n+x)}- \gamma, \qquad\psi^{\prime}(x)=\sum_{n=0}^{\infty} \frac{1}{(n+x)^{2}},\qquad\psi^{\prime\prime}(x)=-2\sum _{n=0}^{\infty}\frac{1}{(n+x)^{3}}, \\& \psi(1)=-\gamma,\qquad\psi\biggl(\frac{1}{2} \biggr)=-2\log2-\gamma, \end{aligned}$$

where \(\gamma=\lim_{n\rightarrow\infty} (\sum_{k=1}^{n}1/k-\log n )=0.577215\cdots\) is the Euler-Mascheroni constant.

It is well known that the gamma and psi functions have many applications in the areas of mathematics, physics, and engineering technology. Recently, the bounds for the gamma and psi functions have attracted the interest of many researchers. In particular, many remarkable inequalities for the psi function \(\psi(x)\) can be found in the literature [115].

Let \(x\in(0, 1/2]\). Then the Ramanujan constant function \(R(x)\) [16] is given by

$$ R(x)=-2\gamma-\psi(x)-\psi(1-x). $$
(1.1)

Very recently, Wang et al. [17] proved that the double inequality

$$ \frac{R^{2}(x)}{ (1+x-x^{2} )R(x)-1}< \frac{\pi}{\sin(\pi x)}< \bigl(1+x-x^{2} \bigr)R(x) $$
(1.2)

holds for all \(x\in(0, 1/2]\).

The main purpose of this paper is to improve inequality (1.2).

2 Lemmas

In order to prove our main results we need several lemmas, which we present in this section.

Lemma 2.1

(See [18, 19])

Let \(-\infty< a< b<\infty\), \(f, g: [a, b]\rightarrow\mathbb{R}\) be continuous on \([a, b]\) and differentiable on \((a, b)\), and \(g^{\prime}(x)\neq0\) on \((a, b)\). Then the functions

$$ \frac{f(x)-f(a)}{g(x)-g(a)} $$

and

$$ \frac{f(x)-f(b)}{g(x)-g(b)} $$

both are increasing (decreasing) on \((a, b)\) if \(f^{\prime}(x)/g^{\prime }(x)\) is increasing (decreasing) on \((a, b)\). If \(f^{\prime }(x)/g^{\prime}(x)\) is strictly monotone, then the monotonicity in the conclusion is also strict.

Lemma 2.2

(See [20])

The double inequality

$$ \frac{x^{2}+1}{x+1}< \Gamma(x+1)< \frac{x^{2}+2}{x+2} $$

holds for all \(x\in(0, 1)\).

Lemma 2.3

(See [21], Section 3, in the proof of Theorem 5, pp. 2500-2502)

Let \(x\in(0, \pi/2)\), \(k, n\in\mathbb{N}\), the sequence \(\{a_{k}\}_{k=0}^{\infty}\) and function \(F_{n}(x)\) be, respectively, defined by

$$\begin{aligned}& a_{0}=\frac{2}{\pi}, \qquad a_{1}= \frac{1}{\pi^{3}}, \end{aligned}$$
(2.1)
$$\begin{aligned}& a_{k+1}=\frac{2k+1}{2(k+1)\pi^{2}}a_{k}-\frac{1}{16k(k+1)\pi ^{2}}a_{k-1} \quad(k\geq1), \end{aligned}$$
(2.2)
$$\begin{aligned}& F_{n}(x)=\frac{\frac{\sin x}{x}-\sum_{k=0}^{n}a_{k} (\pi ^{2}-4x^{2} )^{k}}{ (\pi^{2}-4x^{2} )^{n+1}}. \end{aligned}$$
(2.3)

Then \(F_{n}(x)\) is strictly decreasing from \((0, \pi/2)\) onto \((a_{n+1}, (1-\sum_{k=0}^{n}a_{k}\pi^{2k})/\pi^{2n+2})\).

Lemma 2.4

Let \(k, n\in\mathbb{N}\), \(\{a_{k}\}_{k=0}^{\infty}\) be defined by (2.1) and (2.2), and \(\{b_{k}\}_{k=0}^{\infty}\) be defined by

$$\begin{aligned}& b_{0}=0, \qquad b_{1}=\frac{1}{4\pi}, \end{aligned}$$
(2.4)
$$\begin{aligned}& b_{k+1}=\frac{2k-1}{2(k+1)\pi^{2}}b_{k}-\frac{1}{16k(k+1)\pi ^{2}}b_{k-1} \quad(k\geq1). \end{aligned}$$
(2.5)

Then \(a_{k}=8(k+1)b_{k+1}\) for all \(k\in\mathbb{N}\).

Proof

We use mathematical induction to prove Lemma 2.4. From (2.1), (2.4), and (2.5) we clearly see that Lemma 2.4 holds for \(k=0\) and \(k=1\).

Suppose that \(k_{0}\geq1\) and

$$ a_{k}=8(k+1)b_{k+1} $$
(2.6)

holds for all \(k\leq k_{0}\). Then it follows from (2.2), (2.5), and (2.6) that

$$\begin{aligned} a_{k_{0}+1}&=\frac{2k_{0}+1}{2(k_{0}+1)\pi^{2}}a_{k_{0}}- \frac {1}{16k_{0}(k_{0}+1)\pi^{2}}a_{k_{0}-1} \\ &=\frac{2k_{0}+1}{2(k_{0}+1)\pi^{2}}\times8(k_{0}+1)b_{k_{0}+1}- \frac {1}{16k_{0}(k_{0}+1)\pi^{2}}\times8k_{0}b_{k_{0}} \\ &=8(k_{0}+2)b_{k_{0}+2}=8\bigl[(k_{0}+1)+1 \bigr]b_{(k_{0}+1)+1}. \end{aligned}$$
(2.7)

Equation (2.7) shows that (2.6) also holds for \(k=k_{0}+1\). Therefore, Lemma 2.4 follows from (2.7) and the induction hypothesis (2.6). □

Lemma 2.5

The double inequality

$$\begin{aligned} &\frac{1}{4\pi} \bigl(\pi^{2}-4x^{2} \bigr)+\frac{1}{16\pi^{3}} \bigl(\pi^{2}-4x^{2} \bigr)^{2} +\frac{12-\pi^{2}}{384\pi^{5}} \bigl(\pi^{2}-4x^{2} \bigr)^{3} \\ &\quad< \cos x < \frac{1}{4\pi} \bigl(\pi^{2}-4x^{2} \bigr)+ \frac{1}{16\pi^{3}} \bigl(\pi^{2}-4x^{2} \bigr)^{2} +\frac{16-5\pi}{16\pi^{6}} \bigl(\pi^{2}-4x^{2} \bigr)^{3} \end{aligned}$$
(2.8)

holds for all \(x\in(0, \pi/2)\).

Proof

Let \(x\in(0, \pi/2)\), \(k, n\in\mathbb{N}\), \(\{a_{k}\} _{k=0}^{\infty}\) and \(\{b_{k}\}_{k=0}^{\infty}\) be, respectively, defined by (2.1), (2.2), (2.4), and (2.5), \(F_{n}(x)\) be defined by (2.3), and \(f_{n}(x)\) and \(g_{n}(x)\) be defined by

$$ f_{n}(x)=\cos x-\sum_{k=0}^{n}b_{k} \bigl(\pi^{2}-4x^{2} \bigr)^{k},\qquad g_{n}(x)= \bigl(\pi^{2}-4x^{2} \bigr)^{n+1}. $$
(2.9)

Then it follows from (2.1)-(2.5), Lemma 2.4, and equation (2.9) that

$$\begin{aligned}& a_{2}=\frac{12-\pi^{2}}{16\pi^{5}},\qquad b_{2}=\frac{1}{16\pi^{3}}, \qquad\frac{f_{2}(0^{+})}{g_{2}(0^{+})}=\frac{1-\sum_{k=0}^{2}b_{k}\pi ^{2k}}{\pi^{6}}=\frac{16-5\pi}{16\pi^{6}}, \end{aligned}$$
(2.10)
$$\begin{aligned}& \frac{f_{n}(0^{+})}{g_{n}(0^{+})}=\frac{1-\sum_{k=0}^{n}b_{k}\pi ^{2k}}{\pi^{2n+2}}, \end{aligned}$$
(2.11)
$$\begin{aligned}& \frac{f_{n}(x)}{g_{n}(x)}=\frac{f_{n}(x)-f_{n} (\frac{\pi}{2} )}{g_{n}(x)-g_{n} (\frac{\pi}{2} )}, \end{aligned}$$
(2.12)
$$\begin{aligned}& \frac{f_{n}^{\prime}(x)}{g_{n}^{\prime}(x)}=\frac{\frac{\sin x}{x}-\sum _{k=0}^{n-1}8(k+1)b_{k+1} (\pi^{2}-4x^{2} )^{k}}{8(n+1) (\pi^{2}-4x^{2} )^{n}}=\frac{F_{n-1}(x)}{8(n+1)}. \end{aligned}$$
(2.13)

From Lemma 2.1, Lemma 2.3, (2.12), and (2.13) we clearly see that

$$ \frac{a_{n}}{8(n+1)}=\lim_{x\rightarrow{\pi/2}^{-}}\frac {f_{n}(x)}{g_{n}(x)}< \frac{f_{n}(x)}{g_{n}(x)}< \lim_{x\rightarrow 0^{+}}\frac{f_{n}(x)}{g_{n}(x)} $$
(2.14)

for all \(x\in(0, \pi/2)\).

Equations (2.9) and (2.11) together with inequality (2.14) lead to the conclusion that

$$ \frac{a_{n}}{8(n+1)}< \frac{\cos x-\sum_{k=0}^{n}b_{k} (\pi ^{2}-4x^{2} )^{k}}{ (\pi^{2}-4x^{2} )^{n+1}} < \frac{1-\sum _{k=0}^{n}b_{k}\pi^{2k}}{\pi^{2n+2}} $$
(2.15)

for all \(x\in(0, \pi/2)\).

Letting \(n=2\), then inequality (2.8) follows easily from (2.4), (2.10), and (2.15). □

Remark 2.1

We clearly see that both the first and the second inequalities in (2.8) become to equations if \(x=\pi/2\). If \(x=0\), then the first inequality of (2.8) also holds and the second inequality of (2.8) becomes to equation.

Lemma 2.6

Let \(n\in\mathbb{N}\) and \(R(x)\) be the Ramanujan constant function given by (1.1). Then the double inequality

$$\begin{aligned} &\sum_{k=0}^{n-1} \frac{2k+1}{(k+x)(k+1-x)}+2\psi(1)-2\psi\biggl(n+\frac {1}{2} \biggr) \\ &\quad\leq R(x) < \sum_{k=0}^{n-1} \frac{2k+1}{(k+x)(k+1-x)}+2\psi(1)-\psi(n)-\psi(n+1) \end{aligned}$$
(2.16)

holds for all \(x\in(0, 1/2]\) and \(n\geq1\).

Proof

Let \(n\in\mathbb{N}\), \(x\in(0, 1/2]\), and

$$ h_{n}(x)=2\psi(1)-\psi(n+x)-\psi(n+1-x). $$
(2.17)

Then (1.1) and (2.17) together with the mean value theorem lead to

$$\begin{aligned}& h_{n}(x)=R(x)-\sum_{k=0}^{n-1} \frac{1}{k+x}-\sum_{k=0}^{n-1} \frac{1}{k+1-x}=R(x)-\sum_{k=0}^{n-1} \frac{2k+1}{(k+x)(k+1-x)}, \end{aligned}$$
(2.18)
$$\begin{aligned}& h^{\prime}_{n}(x)=-\psi^{\prime}(n+x)+\psi^{\prime}(n+1-x)=(1-2x) \psi^{\prime\prime}\bigl[n+x+\theta(1-2x)\bigr]< 0 \end{aligned}$$
(2.19)

for \(x\in(0, 1/2]\), where \(\theta\in(0, 1)\).

It follows from (2.17) and (2.19) that

$$\begin{aligned} 2\psi(1)-2 \psi\biggl(n+\frac{1}{2} \biggr)&=h_{n} \biggl( \frac{1}{2} \biggr)\leq h_{n}(x) < h_{n} \bigl(0^{+}\bigr) =2\psi(1)-\psi(n)-\psi(n+1). \end{aligned}$$
(2.20)

Therefore, Lemma 2.6 follows from (2.18) and (2.20). □

Lemma 2.7

Let \(A(t)\) and \(B(t)\) be defined by

$$\begin{aligned} A(t)=\frac{8 (320t^{3}-1{,}936t^{2}+1{,}292t+945 )^{2}}{3(1-4t)(9-4t)(25-4t) (-1{,}280t^{4}+9{,}728t^{3}-18{,}208t^{2}+8{,}896t+3{,}375 )} \end{aligned}$$
(2.21)

and

$$ B(t)=\frac{236}{3(125-28t)}+\frac{4}{1-4t}-\frac{12}{9-4t}- \frac{4}{25-4t}. $$
(2.22)

Then \(0< A(t)< B(t)\) for \(t\in[0, 1/4)\).

Proof

We clearly see that

$$ A(t)>0,\qquad880t^{2}-6{,}488t+10{,}207>0 $$
(2.23)

and

$$ -1{,}280t^{4}+9{,}728t^{3}-18{,}208t^{2}+8{,}896t+3{,}375>0 $$
(2.24)

for \(t\in[0, 1/4)\).

Therefore, Lemma 2.7 follows from (2.23) and (2.24) together with the elaborated computations result

$$ A(t)-B(t)=- \frac{32t(1-4t) (880t^{2}-6{,}488t+10{,}207 )}{(125-28t) (-1{,}280t^{4}+9{,}728t^{3}-18{,}208t^{2}+8{,}896t+3{,}375 )}. $$
(2.25)

 □

Lemma 2.8

Let \(B(t)\) be defined by (2.22). Then

$$ B(t)< \frac{\pi}{\cos(\sqrt{t}\pi)}. $$
(2.26)

for \(t\in[0, 1/4)\).

Proof

From (2.22) we clearly see that \(B(0)=1{,}176/375=3.136<\pi\), which implies that inequality (2.26) holds for \(t=0\).

Let \(t\in(0, 1/4)\). Then \(\sqrt{t}\pi\in(0, \pi/2)\) and the second inequality in (2.8) leads to

$$ \cos(\sqrt{t} \pi)< \frac{\pi}{4}(1-4t)+\frac{\pi}{16}(1-4t)^{2}+ \frac {16-5\pi}{16}(1-4t)^{3}. $$
(2.27)

It follows from (2.22) and (2.27) that

$$\begin{aligned} &B(t)- \frac{\pi}{\cos(\sqrt{t}\pi)} \\ &\quad< \frac{236}{3(125-28t)}+\frac {4}{1-4t}- \frac{12}{9-4t}- \frac{4}{25-4t} \\ &\qquad{}-\frac{\pi}{\frac{\pi}{4}(1-4t)+\frac{\pi}{16}(1-4t)^{2}+\frac {16-5\pi }{16}(1-4t)^{3}} \\ &\quad=\bigl(4(1-4t) \bigl[(1{,}024-320\pi)t^{3}+(3{,}864\pi -12{,}416)t^{2}+(32{,}128-9{,}750\pi)t \\ &\qquad{}+264{,}600-84{,}375\pi\bigr]\bigr) \\ &\qquad{}/\bigl( 3(9-4t)(25-4t)(125-28t) \bigl[(64-20\pi)t^{2}+(9\pi-32)t+4 \bigr]\bigr). \end{aligned}$$
(2.28)

Note that

$$\begin{aligned}& \frac{(1-4t)}{(9-4t)(25-4t)(125-28t)}>0, \end{aligned}$$
(2.29)
$$\begin{aligned}& (64-20\pi)t^{2}+(9\pi-32)t+4>\frac{9\pi-32}{4}+4= \frac{9\pi-16}{4}>0, \end{aligned}$$
(2.30)
$$\begin{aligned}& (1{,}024-320\pi)t^{3}+(3{,}864\pi-12{,}416)t^{2}+(32{,}128-9{,}750 \pi)t+264{,}600-84{,}375\pi \\& \quad< \frac{1{,}024-320\pi}{64}+\frac{32{,}128-9{,}750\pi}{4}+264{,}600-84{,}375\pi \\& \quad=272{,}648-86{,}817.5\times\pi=-97.2202\cdots \end{aligned}$$
(2.31)

for \(t\in(0, 1/4)\).

Therefore, Lemma 2.8 follows from (2.28)-(2.31). □

3 Main results

Theorem 3.1

Let \(R(x)\) be the Ramanujan constant function given by (1.1) and \(C(x)\) be defined by

$$ C(x)=\frac{2 [320 (\frac{1}{2}-x )^{6}-1{,}936 (\frac {1}{2}-x )^{4}+1{,}292 (\frac{1}{2}-x )^{2}+945 ]}{ 3 [1-4 (\frac{1}{2}-x )^{2} ] [9-4 (\frac {1}{2}-x )^{2} ] [25-4 (\frac{1}{2}-x )^{2} ]}. $$
(3.1)

Then

$$ 4\log2\leq\frac{1}{x(1-x)}-4+4\log2\leq R(x)< C(x) $$
(3.2)

for \(x\in(0, 1/2]\).

Proof

Let \(n=1\), then the first inequality of (2.16) leads

$$\begin{aligned} R(x)&\geq\frac{1}{x(1-x)}+2 \biggl[\psi(1)-\psi\biggl(\frac{3}{2} \biggr) \biggr]=\frac{1}{x(1-x)}+2 \biggl[\psi(1)-\psi\biggl(\frac{1}{2} \biggr)-2 \biggr] \\ &=\frac{1}{x(1-x)}-4+4\log2\geq4\log2 \end{aligned}$$

for \(x\in(0, 1/2]\).

Let \(n=3\) and \(x\in(0, 1/2)\), then (3.1) and the second inequality of (2.16) give

$$\begin{aligned} R(x)&< \sum_{k=0}^{2}\frac{2k+1}{(k+x)(k+1-x)}+2 \psi(1)-\psi(3)-\psi(4) \\ &=\sum_{k=0}^{2}\frac{2k+1}{ (k+\frac{1}{2} )^{2}- (\frac {1}{2}-x )^{2}}+2 \psi(1)-2 \biggl[\psi(1)+\frac{3}{2} \biggr]-\frac{1}{3} \\ &=\frac{1}{\frac{1}{4}- (\frac{1}{2}-x )^{2}}+\frac{3}{\frac {9}{4}- (\frac{1}{2}-x )^{2}} +\frac{5}{\frac{25}{4}- (\frac{1}{2}-x )^{2}}-\frac{10}{3} \\ &=\frac{2 [320 (\frac{1}{2}-x )^{6}-1{,}936 (\frac {1}{2}-x )^{4}+1{,}292 (\frac{1}{2}-x )^{2}+945 ]}{ 3 [1-4 (\frac{1}{2}-x )^{2} ] [9-4 (\frac {1}{2}-x )^{2} ] [25-4 (\frac{1}{2}-x )^{2} ]}=C(x). \end{aligned}$$

If \(x=1/2\), then (1.1) and (3.1) lead to

$$ R \biggl(\frac{1}{2} \biggr)=4\log2=2.7725\cdots< C \biggl( \frac{1}{2} \biggr)=\frac{378}{135}=2.8. $$

 □

Theorem 3.2

Let \(R(x)\) be the Ramanujan constant function, given by (1.1), and the function \(A(t)\) be defined by (2.21). Then the inequality

$$ \frac{R^{2}(x)}{ (1+x-x^{2} )R(x)-1}< A \biggl[ \biggl(\frac {1}{2}-x \biggr)^{2} \biggr] $$
(3.3)

for all \(x\in(0, 1/2]\).

Proof

Let \(C(x)\) be defined by (3.1). Then from (3.2) and \(4\log 2=2.7725\cdots>2\) together with

$$ \frac{\partial[\frac{y}{ (1+x-x^{2} )y-1} ]}{\partial y}=\frac{[x(1-x)y+(y-2)]y}{ [ (1+x-x^{2} )y-1 ]^{2}}>0 $$

for \(y>2\) and \(x\in(0, 1/2]\) we clearly see that

$$ \frac{R^{2}(x)}{ (1+x-x^{2} )R(x)-1}< \frac{C^{2}(x)}{ (1+x-x^{2} )C(x)-1}. $$
(3.4)

for \(x\in(0, 1/2]\).

Elaborated computations give

$$ \frac{C^{2}(x)}{ (1+x-x^{2} )C(x)-1}=A \biggl[ \biggl(\frac {1}{2}-x \biggr)^{2} \biggr]. $$
(3.5)

Therefore, Theorem 3.2 follows from (3.4) and (3.5). □

Theorem 3.3

Let \(R(x)\) be the Ramanujan constant function given by (1.1). Then

$$ R(x)>\frac{\pi}{ (1+x-x^{2} )\sin(\pi x)}+\frac{125\log 2-81}{4 (1+x-x^{2} ) (6+x-x^{2} )} $$
(3.6)

for \(x\in(0, 1/2]\).

Proof

It is well known that

$$ \Gamma(x)\Gamma(1-x)=\frac{\pi}{\sin(\pi x)} $$
(3.7)

for \(x\in(0, 1)\).

It follows from Lemma 2.2 and (3.2) that

$$\begin{aligned} &\frac{\pi}{\sin(\pi x)}- \bigl(1+x-x^{2} \bigr)R(x) \\ &\quad=\Gamma(x)\Gamma(1-x)- \bigl(1+x-x^{2} \bigr)R(x) =\frac{\Gamma(x+1)}{x}\frac{\Gamma[(1-x)+1]}{1-x}- \bigl(1+x-x^{2} \bigr)R(x) \\ &\quad< \frac{x^{2}+2}{x(x+2)}\frac{(1-x)^{2}+2}{(1-x)(3-x)}- \bigl(1+x-x^{2} \bigr) \biggl[\frac{1}{x(1-x)}+4\log2-4 \biggr] \\ &\quad=\frac{4(1-\log2)x(1-x) (7+x-x^{2} )-(24\log2-13)}{6+x-x^{2}} \end{aligned}$$
(3.8)

for \(x\in(0, 1/2]\).

Note that

$$ x(1-x) \bigl(7+x-x^{2} \bigr)\leq\frac{1}{4}\times \frac{29}{4}=\frac{29}{16} $$
(3.9)

for \(x\in(0, 1/2]\).

It follows from (3.8) and (3.9) that

$$ \frac{\pi}{\sin(\pi x)}- \bigl(1+x-x^{2} \bigr)R(x)< -\frac{125\log 2-81}{4 (6+x-x^{2} )} $$
(3.10)

for \(x\in(0, 1/2]\).

Therefore, Theorem 3.3 follows easily from (3.10). □

Corollary 3.1

Let \(R(x)\) be the Ramanujan constant function given by (1.1). Then

$$ R(x)>\frac{\pi}{ (1+x-x^{2} )\sin(\pi x)}+4\log2-\frac {324}{125}=\frac{\pi}{ (1+x-x^{2} )\sin(\pi x)}+0.18058872 \cdots $$

for \(x\in(0, 1/2]\).

Proof

Corollary 3.1 follows easily from (3.6) and

$$ 4 \bigl(1+x-x^{2} \bigr) \bigl(6+x-x^{2} \bigr)\leq4\times \biggl(1+\frac {1}{4} \biggr) \biggl(6+\frac{1}{4} \biggr)= \frac{125}{4} $$

for \(x\in(0, 1/2]\). □

Remark 3.1

Let \(A(t)\) and \(B(t)\) be, respectively, defined by (2.21) and (2.22). Then it follows from Lemmas 2.7 and 2.8 that

$$ A \biggl[ \biggl(\frac{1}{2}-x \biggr)^{2} \biggr]< B \biggl[ \biggl(\frac {1}{2}-x \biggr)^{2} \biggr] < \frac{\pi}{\cos[\pi(\frac{1}{2}-x ) ]}= \frac{\pi }{\sin(\pi x)} $$

for \(x\in(0, 1/2]\).

Therefore, inequality (3.3) is an improvement of the first inequality given by (1.2).

Remark 3.2

We clearly see that inequality (3.6) is an improvement of the second inequality given by (1.2).