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?

2more comments