Given that one of the values of \(x\) satisfying the quadratic equation \[x^2-(2a+1)x+(a^2+2)=0\] is twice the other, find \(a\).
If \(x^2-(2a+1)x+a^2+2 = 0\) has one root double the other, then we can call the roots \(b\) and \(2b\), and write \[x^2-(2a+1)x+a^2+2 \equiv (x-b)(x-2b),\] as the quadratic on the right hand side has roots \(b\) and \(2b\).
Multiplying out we have \[x^2-(2a+1)x+a^2+2 \equiv x^2-3bx+2b^2.\]
Since this holds for all \(x\) (it is an identity), we can equate coefficients, giving us \(2a+1=3b\) and \(a^2 + 2 =2b^2\).
The first equation gives \(b = \dfrac{2a+1}{3}\), so we can substitute this into the second equation to obtain \[a^2 + 2 = 2\left(\dfrac{2a+1}{3}\right)^2.\]
Expanding the brackets and rearranging yields \(a^2 - 8a + 16 = 0\), or \((a-4)^2=0\), so \(a = 4\).
Checking this in the original equation: \(x^2-(2 \times 4+1)x+4^2+2 = (x-3)(x-6)\).