Quant interview problem#
The following is a sample problem from a quant interview presented in Isichenko [2021] (see page 62).
Try to keep your thinking flexible while attempting to solve the equation. The solution does not require anything more than what you learned about the quadratic equation in high school.
Exercise
Solve for x:
Solution
Begin by getting rid of the square-roots:
At this point it may not be so obvious how to proceed. But if we try to think flexibly, we might notice that if we treat \(a\) as the variable and \(x\) as the parameter (rather than the more natural other way around), we can reorganize the equation as
so it fits the standard form of a quadratic equation in \(a\)
with
Solving for \(a\) with the roots of a quadratic equation,
The part under the square-root is
Therefore,
so either
or
The solutions to these two equations are, respectively,
and
For real solutions, \(x\) must be non-negative, so the first equation implies
Note that \(a=0\), \(x=0\) is also a solution. \(\blacksquare\)
As a quick verification, choose \(a=7\). Then
and it is easy to verify that
Sympy can also solve problems like this: