Quant interview problem

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:

\[\sqrt{a-\sqrt{a+x}}=x.\]

Sympy can also solve problems like this:

Hide code cell content

from sympy.solvers import solve
from sympy import Symbol, sqrt

a = Symbol('a')
x = Symbol('x')

solve(sqrt(a - sqrt(a+x)) - x, x)
[1/2 - sqrt(4*a + 1)/2,
 -sqrt(4*a - 3)/2 - 1/2,
 sqrt(4*a - 3)/2 - 1/2,
 sqrt(4*a + 1)/2 + 1/2]