Problem statement
Python 3.6.4 |Anaconda custom (64-bit)| (default, Dec 21 2017, 15:39:08)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from sympy import *
In [2]: a,b = symbols('a,b')
In [3]: r = (1/(a+b) + 1/(a-b))/(1/(a+b) - 1/(a-b))
In [4]: r.subs(b,a)
Out[4]: 1
In [6]: import sympy
In [7]: sympy.__version__
Out[7]: '1.1.1'If b is substituted by a, r is undefined. It is possible to calculate the limitr.limit(b,a) # -1
But whenever a subexpression of r is undefined, r itself is undefined.
The environment starts at commit
5c1644ff85e1 (sympy/sympy 1.1), dependencies installed and tests runnable from the first minute. You are graded by hidden tests taken from the fix that was actually merged upstream.