The following inequality is from page 125 of D.S. Mitrinovic, J. Pecaric, A.M. Fink, Classical and new inequalities in analysis, Kluwer
Academic Publishers, Dordrecht/Boston/London, 1993.


If $a\_i>0$, $b\_i>0$ for $i=1,\cdots, n$ and $A=\frac{\max a\_k}{\min a\_k}$, $B=\frac{\max b\_k}{\min b\_k}$ with $\frac{1}{p}+\frac{1}{q}=1$, $p>1$. Then


$$\left(\sum\limits\_{i=1}^na\_i^p\right)^{1/p}\left(\sum\limits\_{i=1}^nb\_i^q\right)^{1/q}\le \frac{1}{p^{1/p}}\frac{1}{q^{1/q}}\frac{A^pB^q-1}{(BA^p-A)^{1/q}(AB^q-B)^{1/p}}\sum\limits\_{i=1}^na\_ib\_i$$


My question is how to prove this inequality (The book does not contain a proof). Though this is a known result, I am expecting different proofs from interested readers. Hopefully this does not go far away from the principle of this forum.


**Added** There are already satisfactory answers below, but let me add one question 


If $a\_{1i}>0$, $a\_{2i}>0, \cdots, a\_{ri}>0$ for $i=1,\cdots, n$ and $A\_1=\frac{\max a\_{1k}}{\min a\_{1k}}$, $A\_2=\frac{\max a\_{2k}}{\min a\_{2k}},\cdots, A\_r=\frac{\max a\_{rk}}{\min a\_{rk}}$ with $\sum\limits\_{i=1}^r\frac{1}{p\_i}=1$, $p\_i>1$. Then $$\left(\sum\limits\_{i=1}^na\_{1i}^{p\_1}\right)^{1/p\_1}\left(\sum\limits\_{i=1}^na\_{2i}^{p\_2}\right)^{1/p\_2}\cdots \left(\sum\limits\_{i=1}^na\_{ri}^{p\_r}\right)^{1/p\_r}\le M(A\_1,\cdots, A\_r)\sum\limits\_{i=1}^na\_{1i}a\_{2i}\cdots a\_{ri}$$


What would $M(A\_1,\cdots, A\_r)$ be? 



How to prove a known inequality from a book
The following proof was inspired by Fedor Petrov's and Gjergji's Zaimi's argument, but it is simpler.


By a scaling argument we may assume $a\_i\in[1,A]$, $b\_i\in[1,B]$.
The inequality can be rewritten as
$$x^{1/p}y^{1/q} \leq (A^pB^q-1)\sum\_{i=1}^n a\_ib\_i,$$
where
$$x:=p(AB^q-B)\sum\_{i=1}^na\_i^p\qquad\text{and}\qquad
y:=q(BA^p-A)\sum\_{i=1}^nb\_i^q.$$
By Young's inequality $x^{1/p}y^{1/q}\le \frac{x}{p}+\frac{y}{q}$, the above follows from
$$\frac{x}{p}+\frac{y}{q}\leq (A^pB^q-1)\sum\_{i=1}^n a\_ib\_i.$$
Therefore it suffices to show, for any $i$,
$$(AB^q-B)a\_i^p+(BA^p-A)b\_i^q\leq (A^pB^q-1)a\_ib\_i.$$
The difference LHS-RHS is a convex function of $a\_i$ and $b\_i$, hence we can assume that 
$a\_i\in\{1,A\}$, $b\_i\in\{1,B\}$. The inequality becomes an identity when exactly one of $a\_i$ and $b\_i$ equals 1, while in the other two cases it is equivalent to
$$(1-A^{1-p})(1-B^{1-q})\leq(A-1)(B-1)\leq (A^p-A)(B^q-B).$$
By convexity again,
$$1-A^{1-p}\leq(p-1)(A-1)\leq A^p-A,$$
$$1-B^{1-q}\leq(q-1)(B-1)\leq B^q-B,$$
whence the required inequality follows upon noting that $(p-1)(q-1)=1$.


