sympy/sympy — pull request #968 by Krastanov (2012-01-13 22:55:32+00:00)
Title: Creating symbolic nsolve expression.

When the equation in nsolve contains too many free symbols the nsolve is
not evaluated but it's placed in a lambda within an implemented_funtion.
That implemented_function is called on the free symbols and the resulting
expression is returned.

Examples
========
>>> r = nsolve(tanh(y*x)-x, x, 1, imp_function='root_of_equ')
>>> r
root_of_equ(y)
>>> r.evalf(subs={y : 0.9})
0
>>> r.evalf(subs={y : 1.1})
0.502940574944642

Problems
========
evalf() does not play well with sympy.mpmath.matrices.matrices.matrix.
The tests for this are commented out.
An issue was created for the problem: issue 2994

In [14]: r2.evalf(subs={y : 1.2})
Out[14]: root2(y) # not as expected
In [15]: r2._imp_(1.2)
Out[15]: # as expected
[ 1.2]
[-1.2]
In [16]: type(_)
Out[16]: sympy.mpmath.matrices.matrices.matrix