# Solving a triangle using the given equation

In a triangle $ABC$ $2a^2+4b^2+c^2=4ab+2ac$ then the numerical value of $cos B$ equals ?

($a,b,c$ are sides opposite to angles $A,B,C$)

I tried to use cosine rule , but couldn't adjust terms accordingly, using the given equation.
Any hints / Solutions are welcome.

Answer: $7/8$

$$2a^2+4b^2+c^2=4ab+2ac\iff (a-2b)^2+(a-c)^2=0$$
Now sum of squares of two real numbers is zero, so each must be individually zero. Hence $a=c=2b$. Then $$\cos B=\frac{a^2+c^2-b^2}{2ac}=\frac{4b^2+4b^2-b^2}{8b^2}=\frac{7}{8}.$$
• @lab bhattacharjee: Since I give the process of calculating $\cos B$, we posted our solution 5 seconds late than you :D – impartialmale Apr 7 '14 at 7:59
Since $a^2+c^2\geq 2ac$ and $a^2+4b^2\geq 4ab$ (Cauchy's inequality) and so from the given equality we have $$a=c \quad \text{and} \quad a=2b.$$ Then $$\cos B=\frac{a^2+c^2-b^2}{2ac}=\frac{4b^2+4b^2-b^2}{8b^2}=\frac{7}{8}.$$