answered 2 years ago
Try :
sage: f=function("f") sage: import sympy sage: Res = [u._sage_() for u in sympy.dsolve(*map(sympy.sympify, (f(x).diff(x)^2+1, f(x))))] ; Res [f(x) == C1 - I*x, f(x) == C1 + I*x]
HTH,