← JP Morgan Interview Insights

JP Morgan·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Quant Engineer interview at JP Morgan with a classic math puzzle that looks deceptively simple but trips you up if you haven't seen it before.

Questions Asked (1)

Q1

Given x = sqrt(2 + sqrt(2 + sqrt(2 + ...))), an infinitely nested radical, what is the value of x?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The trick is recognizing that the nested part is just x again, so you get x = sqrt(2 + x), square both sides, and solve the quadratic.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize that the infinite radical satisfies the equation x = sqrt(2 + x). Square both sides to get x^2 = 2 + x, then solve the quadratic x^2 - x - 2 = 0 to find x = 2 or x = -1. Since x is a square root, it must be non-negative, so x = 2.

Pro tip: After finding the solution, briefly verify convergence by showing the sequence of partial radicals is increasing and bounded above by 2, which demonstrates rigor and prevents overlooking extraneous roots.

1. Identify the self-similar structure

Observe that the expression inside the outer square root is 2 plus the same infinite radical, so the entire expression equals sqrt(2 + x).

2. Set up the equation

Write x = sqrt(2 + x) to capture the infinite nesting.

3. Solve algebraically

Square both sides to obtain x^2 = 2 + x, rearrange to x^2 - x - 2 = 0, and factor to (x - 2)(x + 1) = 0, giving x = 2 or x = -1.

4. Apply domain constraints

Since x is defined as a square root, it must be non-negative, so discard x = -1 and conclude x = 2.

5. Verify convergence

Show that the sequence of partial radicals converges to 2 by proving it is increasing and bounded above by 2, ensuring the solution is valid.

Key Points to Mention

  • Self-similarity of the infinite radical
  • Equation setup: x = sqrt(2 + x)
  • Squaring both sides and solving the quadratic
  • Domain restriction: square root yields non-negative values
  • Convergence check: monotone increasing and bounded above
  • Extraneous root elimination

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.