naaga wrote:

how did you take a=2sqrtb, from the above equation ?

Since the given equation is a quadratic equation, there would always be 2 roots (solution) for it. eg: (x+p)(x+q)

But the question says the equation has only 1 solution. This could be possible only when both the roots are same. i.e (x+p)(x+p).

This can be written as \((x+p)^2\)

We know the formula for this i.e \((x+p)^2 = x^2+2px+p^2\)

Now visualize the given equation (\(x^2+ax+b\)) with the above formula:

Coefficient of \(x^2\) = 1

Coefficient of \(x\) = a (which is nothing but 2p)

Constant term (i.e the \(p^2\)) = b

Hence we can write:

\(p^2=b\)

=> \(p=\sqrt{b}\)

=> a=2p = \(2\sqrt{b}\)