What is basis for the equation : $a-b= \sqrt{(a+b)^2 -4ab}$

703 Views Asked by At

I've been going through solution which solves about missing two number in array. The solution provider assumes following equation :

$\displaystyle a-b= \sqrt{(a+b)^2 -4ab}$

I am not sure, what is the base equation from which it has been derived.

3

There are 3 best solutions below

2
On BEST ANSWER

First of all :

$$\sqrt{(a+b)^2-4ab} \color{red}\neq a-b $$

The correct identity is :

$$\displaystyle \sqrt{(a+b)^2-4ab} =|a-b| $$ $\big(|x|$ denotes Absolute Value of $x \big)$

This is so because ;

$$\color{blue}{(a+b)^2-4ab}=a^2+b^2+2ab-4ab=a^2+b^2-2ab= \color{blue}{(a-b)^2}$$

Therefore :

$$ \sqrt{(a+b)^2-4ab}=\sqrt{(a-b)^2}=|a-b|$$

0
On

Your equation is only valid when $a-b\ge0$. It is based on $$ (a-b)^2 = (a+b)^2 - 4ab $$

6
On

It certainly means :

$a-b =\sqrt{(a^2+b^2+2ab)-4ab}$ which when you'll solve get $\sqrt{(a-b)^2}$ but it's not only (a-b) but also $|a-b|$