# Proof: a<sqrt(ab)<( a+b)/2<b

I am currently working on spivak calculus 4th edition.

One of the problem asks the following:

Prove that if $0 < a < b$

$a < \sqrt(ab) < (a+b)/2 < b$

Here is how I wrote it:

If $0<a<b$

Then $b-a \in P$ where $P$ is the set of all positive numbers

and $a \in P$

and $b \in P$

1) $(b-a)a \in P$ , hence $ab - a^2 \in P$ , hence $ab>a^2$ and consequently $\sqrt(ab) > a$.

Here, can apply the square root on each side of the equality and keep it true? If yes, which property am I using?

2) $(b-a)(b-a) \in P \Rightarrow b^2 -2ab + a^2 \in P \Rightarrow (b^2 + a^2) - 2ab \in P \Rightarrow b^2 + a^2 > 2ab \\\Rightarrow b^2 + 2ab + a^2 > 4ab \Rightarrow (b+a)^2>4ab \Rightarrow (b+a)^2/4 > ab$

And finally by applying the square root on each side

$$(b+a)/2 > \sqrt(ab)$$.

3) $a+a<a+b<b+b$ so $(a+b)/2 < (b+b)/2$

$$\Rightarrow (a+b)/2 < b$$

4) From the 3 conclusion,

$$a<\sqrt(ab)< (a+b)/2 < b$$

Anyways, my questions are: what is the property that tells me that I can divide by 2 on each side and keep the inequality true ?What would be the property for applying functions on each side of an inequality (or equality) such as square root and keep it true? Finally do I have shown enough to make my conclusion at my point 4 or should I have to prove something else?

And yes, I'm new to writing proofs so If you guys could maybe tell me what I'm doing wrong with the structure of my proof.

Thank you so much in advance

PS: I'm working on my english too and it's my first time posting on this forum

You want to know why it is trua that $0<a<b\Longrightarrow\sqrt a<\sqrt b$. That's because $\sqrt b+\sqrt a>0$ (by the definition of square root) and $(\sqrt b+\sqrt a)(\sqrt b-\sqrt a)=b-a>0$. Therefore$$\sqrt b-\sqrt a=\frac1{\sqrt b+\sqrt a}(b-a)\in P.$$I'm assuming that at this point you have already proved that $x\in P\Longrightarrow\frac1x\in P$.
In particular, since $2\in P$, $\frac12\in P$. Therefore$$a+b<2b\Longrightarrow\frac12(a+b)<\frac12\times(2b)\Longleftrightarrow\frac{a+b}2<b.$$
Apart from your prove, you could do it shortly as follows:$${ \left( \sqrt { b } -\sqrt { a } \right) }^{ 2 }>0\\ b-2\sqrt { ab } +a>0\\ b+a>2\sqrt { ab } \\ \frac { b+a }{ 2 } >\sqrt { ab }$$ and since $0<a<b$
$$\sqrt { { a }^{ 2 } } <\sqrt { ab } <\frac { b+a }{ 2 } <\frac { b+b }{ 2 }$$