sympy/sympy — pull request #1813 by smichr (2013-02-21 16:29:57+00:00)
Title: 3545: try unrad sooner

The test that was added used to hang while simplification occured;
a very long solution was also obtained. Without unrad'ing the equation
was f(q) + g(m) where f(q) was

-4*sqrt(m**2 + m**2/(4*q**2) - 2*m*q - m/(2*q) + q**2 + 1/4)

and g(m) was

sqrt(16*m**4 - 16*m**3 + 8*m**2 + 8*m*sqrt(4*m**4 - 4*m**2 + 8*m + 1) +
24*m + 4*sqrt(4*m**4 - 4*m**2 + 8*m + 1) + 4)

Trying to solve this for q gave solutions whose op count was 2920 and
unless check and simplify were off, seemed to hang the process. Otherwise it took about 2 seconds to obtain the (long) answer.

A much shorter result is obtained by removing *all* radicals but it takes about 9 seconds.