\documentclass[reqno]{amsart}
\usepackage{hyperref}
\usepackage{graphicx}

\AtBeginDocument{{\noindent\small
\emph{Electronic Journal of Differential Equations},
Vol. 2018 (2018), No. 112, pp. 1--11.\newline
ISSN: 1072-6691. URL: http://ejde.math.txstate.edu or http://ejde.math.unt.edu}
\thanks{\copyright 2018 Texas State University.}
\vspace{8mm}}

\begin{document}
\title[\hfilneg EJDE-2018/112\hfil On $q$-Steffensen inequality]
{On $q$-Steffensen inequality}

\author[P. Rajkovi\'c, M. Stankovi\'c, S. Marinkovi\'c, M. Kirane \hfil EJDE-2018/112\hfilneg]
{Predrag Rajkovi\'c, Miomir Stankovi\'c, \\
Sladjana Marinkovi\'c, Mokhtar Kirane}

\address{Predrag M. Rajkovi\'c \newline
 Department of Mathematics and Informatics\\
 Faculty of Mechanical Engineering at University of Ni\v{s} \\
 Ni\v{s} 18000, Serbia}
\email{pedja.rajk@gmail.com}

\address{Miomir S. Stankovi\'c \newline
 Department of Mathematics,
 Faculty of Occupation Safety, University of Ni\v{s},
 Ni\v{s} 18000, Serbia}
\email{miomir.stankovic@gmail.com}

\address{Sladjana D. Marinkovi\'c \newline
Department of Mathematics,
Faculty of Electronic Engineering,
University of Ni\v{s}, Ni\v{s} 18000, Serbia}
\email{sladjana.marinkovic@elfak.ni.ac.rs}

\address{Mokhtar Kirane \newline
LaSIE, Facult\'e des Sciences et Technologies,
Universit\'e de La Rochelle,
Avenue M. Cr\'epeau, 17042 La Rochelle, France.\newline
NAAM Research Group, Department of Mathematics,
Faculty of Science King Abdulaziz University,
P.O. Box 80203 Jeddah 21589,
Saudi Arabia. \newline
RUDN University, 6 Miklukho-Maklay St,
 Moscow 117198 Russia}
\email{mokhtar.kirane@univ-lr.fr}

\thanks{Submitted March 1, 2018. Published May 10, 2018.}
\subjclass[2010]{33D60, 26D15}
\keywords{$q$-integral; nonnegativity; integral inequality}

\begin{abstract}
 In this article, we study an analogue of the classical integral inequality
 established by Steffensen in $q$-calculus. The difficulties ensued form
 differences between the classical and $q$-integral. We exceed them in
 two directions: firstly, by restricting the area of parameter $q$, and
 another by modifying the expression of the original inequality.
 We establish the conditions which guarantee their holding on. Finally,
 we illustrate our considerations by the examples.
\end{abstract}

\maketitle
\numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{example}[theorem]{Example}
\allowdisplaybreaks

\section{Introduction}

Integral inequalities have important role in the theory of
functional analysis, differential equations, and applied sciences.
They can be used for studying qualitative and quantitative
properties of integrals.

The well-known Steffensen inequality \cite{Mitrinovic,Steffensen}
has the form
\begin{equation}\label{stef}
\int_{b-\lambda}^b f(x)\,dx \le \int_a^b f(x)g(x)\,dx
\le \int_a^{a+\lambda} f(x)\,dx,
\end{equation}
 where
$ \lambda = \int_a^b g(x)\,dx$, and $f(x)$ and
$g(x)$ are both integrable functions on $[a,b]$,
$f(x)$ is decreasing and $0\le g(x)\le 1$ for each $x\in (a,b)$.
This inequality has attracted the attention of mathematicians
since it was established in 1918, because of its unusual and original form.
A lot of generalizations and modifications have been presented, such as those
 in \cite{Cerone,Kaluszka} and even applications to
other sciences \cite{Geetha}.

 Although for a few  inequalities, for example Chebyshev,
Gr\"uss and Hermite-Hadamard inequality, it was a pretty obvious
matter, here we confront with some difficulties ensued from
differences between the classical and $q$-integral \cite{Marinkovic}.

The analogous of \eqref{stef} for the $q$-integral \eqref{Iqfab}
was not discussed; so we wish to make a contribution to
it through this article.

The paper is organized as follows:
the next section deals with the problems with a few basic inequalities
for $q$-integrals. In the Section 3, we present the Steffensen integral
inequality in $q$-calculus with restrictions. Finally, in the las section, we
find a modification of the previous inequality which is valid on
any interval of the form $(0,b)$ for every $q\in(0,1)$.

\section{Preliminaries}

The $q$-integral of the function $f$ over the interval $[a,b]$ is
defined by (see, for example \cite{Gasper-Rahman,Kac,Koepf})
\begin{equation}\label{Iqfab}
I_q(f;a,b)=\int_a^b f(x)\,d_q x = \int_0^b f(x)\,d_q x - \int_0^a
f(x)\,d_q x\quad (0<q<1),
\end{equation}
where
\begin{equation}\label{Iqf0b}
\int_0^b f(x)\,d_q x = b(1-q)\sum_{j=0}^{\infty}f(bq^j)q^j.
\end{equation}
We say that $f(x)$ is $q$-integrable on $(a,b)$ if \eqref{Iqfab} exists.
Obviously, if a function $f(x)$ is $q$-integrable and $f(x)\ge 0$ over
$[0,b]$, then
\[
\int_0^b f(x)\,d_q x \ge 0\quad (0<q<1).
\]
If $f$ is integrable over $[0,b]$, then
\begin{equation}\label{limqto1}
\lim_{q\nearrow 1} I_q(f;a,b) = I(f;a,b)=\int_a^b f(t)\,dt \quad (0<a<b).
\end{equation}
Lacks of definition \eqref{Iqfab} was discussed in a few
papers especially because of influence of the points outside of
the interval $[a,b]$.
One way to overcome this problem was suggested in \cite{Marinkovic}
where the definition of the $q$-integral of the Riemann type was
considered.
Another way was suggested in \cite{Gauchman} by restricting the $q$-integral
over $[a,b]$ to a finite sum with points only inside the interval $[a,b]$.
Its number directly depends on $a$, $b$ and $q$ and the nonnegativity is guaranteed.
Namely, if a lower limit of integral has the special form $a=bq^k$
$(k\in\mathbb N)$, $q$-integral reduces on the finite sum
\begin{equation}\label{finite}
\int_{bq^k}^b f(x)\,d_q x=b(1-q)\sum_{j=0}^{k-1} f(bq^j)q^j.
\end{equation}

\begin{lemma} \label{lem2.1}
If a function $f(x)$ is $q$-integrable, nonnegative and nondecreasing over
 $[0,b]$, then
\begin{equation}\label{IqfabPos}
\int_a^b f(x)\,d_q x \ge 0\quad (0\le a\le b;\ 0<q<1).
\end{equation}
\end{lemma}

\begin{proof}
 From the definition, we have
$$
\int_a^b f(x)\,d_q x = (1-q)\sum_{n=0}^\infty \big( bf(bq^n) -
af(aq^n)\big)q^n.
$$
Since $a<b$, $0<q<1$ and $f(x)\ge 0$, then $af(aq^n)\le bf(aq^n)$.
Also, since $aq^n\le bq^n$ and $f(x)$ is nondecreasing, then
$bf(aq^n)\le bf(bq^n).$ Hence $ bf(bq^n)- af(aq^n)\ge 0$, for every
$n\in\mathbb N$, wherefrom the nonnegativity of \eqref{IqfabPos} follows.
\end{proof}

Note that some obvious integral inequalities in
classical mathematical analysis are not valid for $q$-integrals.
Even more, the $q$-integral of a positive function does not have to be positive.

For instance, for $0<a<b<r$, the function $f(x)=x(r-x)$ is
positive on $(0,r)$. However, $q$-integral
$$
\int_a^b x(r-x)\,d_qx = (b-a)\left( \frac{a+b}{1+q}r
-\frac{a^2+ab+b^2}{1+q+q^2}\right).
$$
is equal to zero for
$$
r=r_q = \frac{a^2+ab+b^2}{a+b} \frac{1+q}{1+q+q^2}\,.
$$
In special case $a=9$ and $b=10$, we obtain
$r_q = \frac{271}{19} \frac{1+q}{1+q+q^2}$.
For $q\in (0,0.9)$, the parameter $r_q>10$, the function $f(x)=x(r_q-x)$
is positive on the interval $(9, 10)$, but
$$
\int_9^{10} x(r_q-x)\,d_qx = 0,\quad
\int_9^{10} x(c-x)\,d_qx < 0\quad (10<c<r_q).
$$

As it was illustrated by the previous discussion, the mean value theorem
to $q$-integrals is valid only in a restricted form (see \cite{MatVes}).

\begin{lemma} \label{Lem2.4}
Let $u(x)$ be a continuous function on $[a,b]$ and $v(x)$ be a nonnegative
and integrable function such that $I_q(v;a,b)>0$ for all $q\in (0,1]$.
Then thee exists $\hat q\in(0,1)$ such that
for every $q\in(\hat q,1)$ exists $\xi=\xi(q)\in(a,b)$ so that
\begin{equation}\label{MeanValq}
I_q(u v;a,b) = u(\xi) I_q(v;a,b).
\end{equation}
\end{lemma}

\begin{proof}
Under the assumed conditions, the mean value theorem for the real integrals
 ($q=1$) states that
$$
I(u v;a,b) = u(c) I(v;a,b),
$$
where $c \in (a,b)$. Using relation \eqref{limqto1}, we can write
\[\label{limit1}
\lim_{q\to 1} \frac{I_q(u v;a,b)}{I_q(v;a,b)} = u(c).
\]
Since $u(x)$ is a continuous function on $[a,b]$,
it attains its minimum $m_u$ and maximum $M_u$.
Let $\varepsilon = \min \{M_u-u(c),u(c)-m_u\}$.
Then, there exists $\hat q =\hat q(\varepsilon) \in (0,1)$ such that
for all $q\in(\hat q,1)$ the following implication is true:
$$
u(c) - \varepsilon < \frac{I_q(u v;a,b)}{I_q(v;a,b)} < u(c) + \varepsilon
\; \Rightarrow \;
m_u < \frac{I_q(u v;a,b)}{I_q(v;a,b)} < M_u.
$$
Since $u(x)$ takes all values between $m_u$ and $M_u$,
we conclude that there exists $\xi=\xi(q) \in (a,b)$ so that
$$
\frac{I_q(u v;a,b)}{I_q(v;a,b)}= u(\xi).
$$
\end{proof}

Although for a few  inequalities, for example Chebyshev,
Gr\"uss and Hermite-Hadamard inequality, it was pretty obvious
matter, here we confront with some difficulties ensued form
differences between the classical and $q$-integral.

Namely, it was easy in \cite{Gauchman} to establish $q$-analog of \eqref{stef}
for the $q$-integrals of the type \eqref{finite} as a relation between
finite sums with the values of a function in the points between $a$ and $b$.

If someone wants to make the analogous of \eqref{stef} for the
$q$-integral \eqref{Iqfab}, the infinite
sums and to consider the points out of the interval $(a,b)$ need to be
considered. Probably, that why no-one has discussed it.
In this article, we wish to make a contribution.


\section{The $q$-Steffensen inequality with restricted parameter}

Because of the properties mentioned above, inequality \eqref{stef}
is not valid for the $q$-integrals in its original form for every parameter $q$.
That is why we will examine its feasible region.

\begin{theorem}[$q$-Steffensen inequality] \label{Thm3.1}
Let $0<a<b$, $f(x)$ and $g(x)$ are both continuous functions on
$[a,b]$, $f(x)$ is decreasing and $0< g(x)< 1$ on $[a,b]$
and $\int_a^d g(x)\,d_qx>0$ for every $d\in(a,b)$. If we denote by
$\lambda=\int_a^b g(x)\,d_qx$, then there is a
$\hat q\in(0,1)$ such that
\begin{equation}\label{q-Stef}
\int_{b-\lambda}^b f(x)\,d_q x \le \int_a^b f(x)g(x)\,d_q x \le
\int_a^{a+\lambda} f(x)\,d_q x
\end{equation}
for all $q \in (\hat q,1)$.
\end{theorem}

\begin{proof}
Taking $u\equiv g$ and $v\equiv 1$ in
Lemma~\ref{Lem2.4}, there exists $q_1\in(0,1)$ such that for every $q \in (q_1,1)$,
it exists $\xi_1=\xi_1(q)\in(a,b)$ so that
$$
\lambda = \int_a^b g(x)\,d_qx = g(\xi_1)\int_a^b d_qx = g(\xi_1)(b-a).
$$
Since $0< g(x)< 1$, it is $0< \lambda < b-a$.

For the same reasons, there exists $q_2\in(q_1,1)$ such that for every
$q \in (q_2,1)$, there exists $\xi_2=\xi_2(q)\in(a,b)$ so that
$$
\int_a^{a+\lambda} g(x)\,d_qx = \lambda\;g(\xi_2)\quad (a<\xi_2<a+\lambda).
$$
Hence
$$
\int_a^{a+\lambda}\left(1-g(x)\right)\,d_q x
 = \lambda\left(1-g(\xi_2)\right) > 0.
$$
Let us consider the expression
$$
RHS= \int_a^{a+\lambda} f(x)\,d_q x - \int_a^b f(x)g(x)\,d_q x,
$$
which  can be written as
\begin{align*}
RHS &= \int_a^{a+\lambda} f(x)\,d_q x -\int_a^{a+\lambda} f(x)g(x)\,d_q x
- \int_{a+\lambda}^b f(x)g(x)\,d_q x\\
&= \int_a^{a+\lambda} f(x)\left(1-g(x)\right)\,d_q x -
\int_{a+\lambda}^b f(x)g(x)\,d_q x/
\end{align*}
Let us apply Lemma~\ref{Lem2.4} to the first integral with $u\equiv f$ and
$v\equiv 1-g$.
We conclude that there is $q_3\in(q_2,1)$ such that,
for all $q\in(q_3,1)$, $\xi\in(a,a+\lambda)$ exists such that
\begin{align*}
\int_a^{a+\lambda} f(x)\left(1-g(x)\right) d_q x
=f(\xi)\int_a^{a+\lambda}\left(1-g(x)\right) d_q x.
\end{align*}
Since $f(x)$ is decreasing and $\xi<a+\lambda$, it is obvious
that $f(\xi)>f(a+\lambda)$. Now, let $q\in(q_3,1)$. Then
$$
\int_a^{a+\lambda} f(x)\left(1-g(x)\right)\,d_q
x>f(a+\lambda)\int_a^{a+\lambda}\left(1-g(x)\right) d_q x.
$$
Since
$$
\int_a^{a+\lambda}\left(1-g(x)\right) d_q
x=\lambda-\int_a^{a+\lambda}g(x) d_q x =\int_a^b g(x)\,d_q
x-\int_a^{a+\lambda}g(x)\,d_q x,
$$
we have
$$
\int_a^{a+\lambda} f(x)\left(1-g(x)\right)\,d_q
x>f(a+\lambda)\int_{a+\lambda}^b g(x)\,d_q x.
$$
The previous inequality and the function $f(x)$ begin decreasing, give
\begin{align*}
RHS&>f(a+\lambda)\int_{a+\lambda}^b g(x)\,d_q x
 - \int_{a+\lambda}^b f(x)g(x)\,d_q x\\
&=\int_{a+\lambda}^b \bigl(f(a+\lambda)-f(x)\bigr)g(x)\,d_q x.
\end{align*}
Since the integrand is nonnegative on $[a,b]$, there is
$\hat q_1\in(q_3,1)\subset(0,1)$
such that $RHS \ge 0$ for all $q\in(\hat q_1,1)$.

To prove left side inequality we consider $G(x)=1-g(x)$ and
$\Lambda = \int_a^b G(x)\,d_q t=b-a-\lambda$. Applying just proven
inequality we conclude that there is $\hat q_2\in(0,1)$ such that
$$
\int_{a}^b f(x)G(x)\,d_q x \le \int_a^{a+\Lambda} f(x)\,d_q x,
$$
i.e,
$$
\int_{b-\lambda}^b f(x)\,d_q x - \int_a^b f(x)g(x)\,d_q x \le 0,
$$
for all $q\in(\hat q_2,1)$. If we denote by $\hat q=\max\{\hat q_1,\hat q_2\}$,
than the both sides of the inequality hold on for all $q \in(\hat q,1)$.
\end{proof}

When $q\to 1^-$, this reduces to the well-known Steffensen
inequality \eqref{stef}.
Here, we will present a few examples which include different values
for a bound $\hat q$ which illustrates the $q$-Steffensen inequality
\eqref{q-Stef}.


\begin{example} \label{examp3.2} \rm
The function $f(x) = (9-x^2)/4$ is decreasing and $g(x) = x/4$ is
bounded $0\le g(x)\le 1$ on $[1,3]$. Thus, $f(x)$ and $g(x)$ fulfill
the assumptions of Theorem~\ref{Thm3.1} and
$ \lambda (q) =\frac{2}{1+q} \in[1,2]$. Here,
$$
\int_{b-\lambda}^b f(x)\,d_q x \le \int_a^b f(x)g(x)\,d_qx \quad
(0<q<1),
$$
but, the right inequality is valid for $q$ on stricter interval, i.e.,
$$
\int_a^b f(x)g(x)\,d_qx \le \int_a^{a+\lambda} f(x)\,d_qx \quad
(\hat q<q<1;\, \hat q\approx 0.1383).
$$
This is shown on Figure \ref{fig1}. Notice that, for $q\in(0,0.18)$,
all integrals are negative although the functions are positive.
Even more, the integral $I_q[fg,a,b]=\int_a^b f(x)g(x)\,d_qx $,
for $q\in(0,\hat q)$, is not between the limit integrals
$I_q[f;a,a+\lambda]$ and $I_q[f;b-\lambda,b]$ in any way.

\begin{figure}[ht]
\begin{center}
\includegraphics[width=0.46\textwidth]{fig1a} \quad % fgFALSE.eps 
\includegraphics[width=0.46\textwidth]{fig1b} % IntegfgFALSE.eps
\end{center}
\caption{The case $f(x) = (9-x^2)/4$ and $g(x) = x/4$ on $[1,3]$
and the integrals.}\label{fig1}
\end{figure}

Similarly, if we take both decreasing functions: $f(x)=1-x^2$ and $g(x)=2-x$
on $[1,2]$, shown on the Figure \ref{fig2}, the both sides of
inequality \eqref{q-Stef} are true for
every $q\in(1/2,1)$.

\begin{figure}[ht]
\begin{center}
\includegraphics[width=0.46\textwidth]{fig2a} \quad % fgdecres.eps 
\includegraphics[width=0.46\textwidth]{fig2b}  % Integfgdecres.eps
\end{center}
\caption{The case $f(x) = 1-x^2$ and $g(x) =2-x$ on $[1,2]$ and
the integrals.}\label{fig2}
\end{figure}
\end{example}


\section{The $q$-Steffensen inequality on $(0,b)$}

It would be interesting to find modification of the previous inequality
 which is valid for every $q\in(0,1)$.
We will improve the results from \cite{Gauchman} considering the $q$-integrals
$(0,b)$ when they are represented by the infinite sums.


\begin{theorem}\label{qStef-dis-th}
Let $0<q<1$, $b>0$, $f(x)$ and $g(x)$ are both $q$-integrable
functions on $[0,b]$, $f(x)$ is non-negative and decreasing and
$0\le g(x)\le 1$ for each $x\in[0,b]$ and
$\lambda=\int_0^b g(x)\,d_qx$. Let $l,k\in\mathbb N_0=\mathbb N\cup \{0\}$
 be such that
\begin{equation}\label{kl}
l=\lfloor\log_q(1-\lambda/b)\rfloor,\quad
k=\lfloor\log_q(\lambda/ b)\rfloor.
\end{equation}
Then
\begin{equation}\label{q-Stef-dis}
L_q(f;0,b)= \int_{bq^{l}}^{b} f(x)\,d_q x
\le \int_0^b f(x)g(x)\,d_q x
\le \int_{0}^{bq^{k}} f(x)\,d_q x = U_q(f;0,b).
\end{equation}
\end{theorem}

\begin{proof} From condition \eqref{kl}, it follows that
\[\label{kl1}
b(1-q^l)\le\lambda\le bq^k.
\]
Let us consider the right inequality
\begin{align*}
RHS&=\int_0^{bq^k} f(x)\,d_q x - \int_0^b f(x)g(x)\,d_q x\\
&=\int_0^{bq^k} f(x)\,d_q x -\int_0^{bq^k} f(x)g(x)\,d_q x
 - \int_{bq^k}^b f(x)g(x)\,d_q x\\
&=\int_0^{bq^k} f(x)\bigl(1-g(x)\bigr)\,d_q x
 - \int_{bq^k}^b f(x)g(x)\,d_q x.
\end{align*}
Using the definition of $q$-integral, we have
$$
\int_0^{bq^k} f(x)\left(1-g(x)\right)\,d_q x =
bq^k(1-q)\sum_{j=0}^{\infty}f(bq^{k+j})\left(1-g(bq^{k+j})\right)q^j.
$$
Because $f(x)$ is decreasing, $f(bq^{k+j})\ge f(bq^{k})$ is valid
for all $j\in\mathbb N_0$, so
\begin{align*}
\int_0^{bq^k} f(x)\left(1-g(x)\right)\,d_q x
&\ge bq^k(1-q)f(bq^{k})\sum_{j=0}^{\infty}\left(1-g(bq^{k+j})\right)q^j\\
&= f(bq^{k})\int_0^{bq^k}\bigl(1-g(x)\bigr)\,d_q x.
\end{align*}
Since
$$
\int_0^{bq^k}\,d_q x = bq^k \ge \lambda = \int_0^{b}g(x)\,d_q x,
$$
we can write
\begin{align*}
RHS
&\ge f(bq^{k})\Big(\int_0^{b}g(x)\,d_q x-\int_0^{bq^k}g(x)\,d_q x\Big)
 -\int_{bq^k}^b f(x)g(x)\,d_qx\\
&= f(bq^{k})\int_{bq^k}^b g(x)\,d_qx-\int_{bq^k}^b f(x)g(x)\,d_qx\\
&= \int_{bq^k}^b \bigl(f(bq^k)-f(x)\bigr)g(x)\,d_qx.
\end{align*}
According to \eqref{finite}, we obtain
$$
\int_{bq^k}^b \bigl(f(bq^k)-f(x)\bigr)g(x)\,d_q x =
b(1-q)\sum_{j=0}^{k-1}\bigl(f(bq^k)-f(bq^j)\bigr)g(bq^j)\ge 0,
$$
which completes the proof of the right inequality in
\eqref{q-Stef-dis}. The left inequality can be proved in a similar manner.
\end{proof}


\begin{example} \label{examp4.2} \rm
The functions
$f(x) = 2-\frac{x^2}4$ and $g(x) = \frac{x}2$ $(x\in[0,2])$,
fulfill the conditions of the Theorem~\ref{qStef-dis-th} and
 $ \lambda (q)\in[0,2]$.
The integral $I_q[fg;0,b]$ for different values $q\in(0,1)$ and appropriate
$L_q(f;0,b)$ and $U_q(f;0,b)$
are shown on the Figure \ref{fig3}.
\end{example}

\begin{figure}[ht]
\begin{center}
\includegraphics[width=0.46\textwidth]{fig3a} \quad % fg02.eps 
\includegraphics[width=0.46\textwidth]{fig3b} % qSteff-Ifg-2017.eps
\end{center}
\caption{The case $f(x) = 2-\frac{x^2}4$ and $g(x) = \frac{x}2$ on $[0,2]$.}
\label{fig3}
\end{figure}


\begin{corollary}
Inequality \eqref{q-Stef-dis} reduces to well-known Steffensen inequality
\eqref{stef} when $q$ increases to $1$.
\end{corollary}

\begin{proof}
Let us notice that
$$
\lim_{q\uparrow 1} q^{\lfloor\log_q x\rfloor} = x \quad (0<q,x<1).
$$
Really, denoting by $n = \lfloor\log_q x\rfloor $, we can write
$n \le \log_q x<n+1$, i.e.,
$q^{n+1}< x\le q^n.$ Hence
$x\le q^n <x/q$. Then
$$
\lim_{q\uparrow 1} q^n = x\; \Rightarrow \;
\lim_{q\uparrow 1} q^{\lfloor\log_q x\rfloor} = x.
$$
Hence
$$
\lim_{q\uparrow 1} bq^{\lfloor\log_q(1-\lambda/b)\rfloor} = b - \lambda,\quad
\lim_{q\uparrow 1} bq^{\lfloor\log_q(\lambda/ b)\rfloor} = \lambda.
$$
\end{proof}

We can formulate and prove another version of $q$-Steffensen inequality.

\begin{corollary}\label{q-Stef-improv}
Let $0<q<1$, $b>0$, $f(x)$ and $g(x)$ are both $q$-integrable functions on $[0,b]$,
$f(x)$ is non-negative and decreasing and $0\le g(x)\le 1$ for each
$x\in[0,b]$ and $\lambda=\int_0^b g(x)\,d_qx$. Then
\begin{equation}\label{q-Stef-improve}
\tilde L_q[f;0,b]
\le \int_0^b f(x)g(x)\,d_q x
\le \frac{b}{\lambda}\int_0^{\lambda} f(x)\,d_q x = \tilde U_q[f;0,b],
\end{equation}
where
\begin{equation}\label{q-Stef-improve2}
\tilde L_q[f;0,b] =
\max \Big\{0, \int_{b-\lambda}^b f(x)\,d_q x
-\bigl(\frac{1}{q}-1\bigr)\int_0^b f(x)\,d_q x\Big\} .
\end{equation}
\end{corollary}

\begin{proof}
Since $0<\lambda < b$ and $0<q<1$,
there exist $l,k\in\mathbb N_0$ such that
$$
l=\lfloor\log_q(1-\lambda/b)\rfloor,\quad
k=\lfloor\log_q(\lambda/ b)\rfloor.
$$
Now, the following inequalities are valid:
\begin{gather}\label{lambda-k-l}
bq^{l+1}<b-\lambda\le bq^l, \quad bq^{k+1}<\lambda\le bq^k,\\
\label{lambda-q}
\frac 1q >\frac{bq^l}{b-\lambda}\ge 1, \quad \frac 1q
>\frac{bq^k}{\lambda}\ge 1.
\end{gather}
Using Theorem \ref{qStef-dis-th}, the right side in
\eqref{q-Stef-improve} can be written in the form
$$
RHS = \frac{b}{\lambda}\int_0^{\lambda} f(x)\,d_q x - \int_0^b f(x)g(x)\,d_q x
\ge \frac{b}{\lambda}\int_0^{\lambda} f(x)\,d_q x - \int_0^{bq^k} f(x)\,d_q x.
$$
Since $f(x)$ is a decreasing function on $(0,b)$ and in accordance
 to \eqref{lambda-k-l}, we have $f(bq^{k+j})\le f(\lambda q^j)$, wherefrom
\begin{align*}
\int_0^{bq^k}
f(x)\,d_q x-\int_0^{\lambda} f(x)\,d_q x
&=(1-q)\Big(bq^k\sum_{j=0}^\infty
f(bq^{k+j})q^j-\lambda\sum_{j=0}^\infty f(\lambda
q^{j})q^j\Big)\\
&\le (1-q)\Big(bq^k\sum_{j=0}^\infty f(\lambda
q^{j})q^j-\lambda\sum_{j=0}^\infty f(\lambda
q^{j})q^j\Big) \\
&= (1-q)\bigl(bq^k-\lambda\bigr)\sum_{j=0}^\infty f(\lambda
q^{j})q^j,
\end{align*}
where
$$
\int_0^{bq^k} f(x)\,d_q x-\int_0^{\lambda} f(x)\,d_q x \le
\frac{bq^k-\lambda}{\lambda}\int_0^\lambda f(x)\,d_q x.
$$
Using \eqref{lambda-q}, we obtain
\begin{align*}
\int_0^{bq^k} f(x)\,d_q x
&\le \int_0^{\lambda} f(x)\,d_q x + \frac{bq^k-\lambda}{\lambda}
\int_0^\lambda f(x)\,d_q x\\
&= \frac{bq^k}{\lambda}\int_0^\lambda f(x)\,d_q x \\
&\le \frac {b}{\lambda} \int_0^\lambda f(x)\,d_q x,
\end{align*}
where the right inequality in \eqref{q-Stef-improve} follows.

Let us consider the left side inequality.
If $\int_{b-\lambda}^{b} f(x)\,d_q x \le 0$, since
the other integrals are nonnegative, the inequality
\eqref{q-Stef-improve} is immediately fulfilled.

Let $\int_{b-\lambda}^{b} f(x)\,d_q x > 0$. By using
the Theorem \ref{qStef-dis-th}, we have
\begin{align*}
LHS &\ge \int_{bq^l}^{b} f(x)\,d_q x -
\Big( \int_{b-\lambda}^{b} f(x)\,d_q x
-\Bigl(\frac{1}{q}-1\Bigr)\int_0^{b} f(x)\,d_q x\Big)\\
&= - \int_{b-\lambda}^{bq^l} f(x)\,d_q x
+\Bigl(\frac{1}{q}-1\Bigr)\int_0^{b} f(x)\,d_q x.
\end{align*}
By definition of $q$-integral, we have
$$
-\int_{b-\lambda}^{bq^l} f(x)\,d_q x =(1-q)\sum_{j=0}^\infty \left(
(b-\lambda) f\bigl((b-\lambda)q^{j}\bigr) - bq^l
f(bq^{l+j})\right)q^j.
$$
Since $f(x)$ is decreasing on $[0,b]$, from \eqref{lambda-k-l} we have
$f\bigl((b-\lambda)q^{j}\bigr) > f(bq^{l+j})$,
i.e.,
$-f(bq^{l+j})>- f\bigl((b-\lambda)q^{j}\bigr)$;
therefore
\begin{align*}
-\int_{b-\lambda}^{bq^l} f(x)\,d_q x
&\ge (1-q)\sum_{j=0}^\infty \left( (b-\lambda) f\bigl((b-\lambda)q^{j}\bigr)
 - bq^l f\bigl((b-\lambda)q^{j}\bigr)\right)q^j\\
&= (1-q)\bigl(b-\lambda -bq^l\bigr)\sum_{j=0}^\infty
 f\bigl((b-\lambda) q^{j}\bigr)q^j\\
&= \frac{b-\lambda-bq^l}{b-\lambda}\int_0^{b-\lambda} f(x)\,d_q x.
\end{align*}
Hence,
\begin{align*}
LHS&\ge -\int_{b-\lambda}^{bq^l} f(x)\,d_q x
 +\Bigl(\frac{1}{q}-1\Bigr)\int_0^{b} f(x)\,d_q x\\
 &\ge \Big(1-\frac{bq^l}{b-\lambda}\Big)
 \Big(\int_0^{b} f(x)d_q x-\int_{b-\lambda}^b f(x)d_q x\Big)
 +\Bigl(\frac{1}{q}-1\Bigr)\int_0^{b} f(x)d_q x\\
 &=\Big(\frac{bq^l}{b-\lambda}-1\Big)\int_{b-\lambda}^b f(x)\,d_q x
 + \Big(\frac{1}{q}-\frac{bq^l}{b-\lambda}\Big) \int_0^{b} f(x)\,d_q x \ge 0.
\end{align*}
\end{proof}

\begin{example} \label{examp4.5} \rm
The functions
$f(x) = \frac{9-x^2}4$ and $g(x) = 1-\frac{1}4(x-\frac32)^2$, on $[0,3]$
fulfill the conditions of the Corollary~\ref{q-Stef-improv} and
 $ \lambda (q)\in[0,3]$.
The integral $I_q[fg;0,b]$ for different values $q\in(0,1)$ and
appropriate $\tilde L_q(f;0,b)$ and $\tilde U_q(f;0,b)$
are shown on the Figure~\ref{fig4}(a).
\end{example}

\begin{figure}[ht]
\begin{center}
\includegraphics[width=0.46\textwidth]{fig4a} \quad % ProvenIntqSteff-Ifg-2018.eps 
\includegraphics[width=0.46\textwidth]{fig4b} \\ % ConjIntqSteff-Ifg-2018.eps
 (a) proved \hfil (b) conjectured
\end{center}
\caption{Estimations of $I_q[fg;0,3]$ for $f(x) = \frac{9-x^2}4$ and
$g(x) = 1-\frac{1}4\left(x-\frac32\right)^2$, on $[0,3]$}
\label{fig4}
\end{figure}


Furthermore, we believe that the sharper estimation is valid as it is
shown on the Figure~\ref{fig4}$b)$ and supposed in the following conjecture.
Using the Theorem \ref{Thm3.1} with $a=0$, we can easy see that it is true
on some interval $(\hat q,1)\subset (0,1)$, but it is not sufficient.

\subsection*{Conjecture}
Let $0<q<1$ and $b>0$. Suppose $f(x)$ and $g(x)$ are both nonnegative and
$q$-integrable functions on $[0,b]$ and $\lambda=\int_0^b g(x)\,d_qx$.
If $f(x)$ is decreasing and $g(x)\le 1$ on $[0,b]$, then
\[
\max \Big\{0,\int_{b-\lambda}^b f(x)\,d_q x \Big\}
\le \int_0^b f(x)g(x)\,d_q x
\le \int_0^{\lambda} f(x)\,d_q x.
\]


\subsection*{Acknowledgments}
This research was supported by the Ministry of Science and Technological
Development of the Republic Serbia, projects No 174011.
We are very grateful to anonymous referees to their careful reading
and their suggestions which improved this article.


\begin{thebibliography}{99}

\bibitem{Cerone} P. Cerone;
 \emph{On Some Generalizations of Steffensen's Inequality and Related Results},
 Journal of Inequalities in Pure and Applied Mathematics,
 {2} Issue 3 (2001), Article 28.

\bibitem{Gasper-Rahman} G. Gasper, G., M. Rahman;
 \emph{Basic Hypergeometric Series, 2nd ed.}
 Encyclopedia of Mathematics and its Applications 96,
 Cambridge University Press, 2004.

\bibitem{Gauchman} H. Gauchman;
 \emph{Integral Inequalities in $q$-Calculus},
 Computers and Mathematics with Applications, {47} (2004), 281--300.

\bibitem{Geetha}  R.S. Geetha, R.S. Keshavamurthy, R. Harish;
 \emph{Temperature and energy derivatives of Doppler broadening functions
 by Steffensen’s inequality technique},
 Annals of Nuclear Energy, 37, Issue 7 (2010), 985-990.

\bibitem{Kac} V. Kac, P. Cheung;
 \emph{Quantum Calculus},
 Springer-Verlag, New York, 2002.

\bibitem{Kaluszka} M. Kaluszka, M. Boczek;
 \emph{Steffensen type inequalities for fuzzy integrals},
 Applied Mathematics and Computation, {261} (2015), 176-182.

\bibitem{Koepf}  W. Koepf;
 \emph{Hypergeometric Summation},
 Advanced Lectures in Mathematics, Vieweg, Braunschweig/Wiesbaden, 1998.

\bibitem{Marinkovic} S. D. Marinkovi\'c, P. M. Rajkovi\'c, M. S. Stankovi\'c;
 \emph{The inequalities for some types of q-integrals},
 Computers and Mathematics with Applications {56} (2008), 2490--2498.

\bibitem{Mitrinovic} D. S. Mitrinovi\'c;
 \emph{Analitic Inequalities},  Springer, 1970.

\bibitem{MatVes} P. M. Rajkovi\'c, M. S. Stankovi\'c, S. D. Marinkovi\'c;
 \emph{Mean value theorems in $q$--calculus},
 Matemati\v{c}ki vesnik, {54} (2002), 171--178.

\bibitem{Steffensen} J. F. Steffensen;
 \emph{On certain inequalities between mean values, and their application to
 actuarial problems},  Skandinavisk Aktuarietidskrift, 82--97, 1918.

\end{thebibliography}


\end{document}


