After a working with SyMpy library I receive an expression (in yprime variable).
from sympy import *
x = Symbol('x')
y = 1 - (0.1 * coeff1) / (x + 2) - sin(x) * (2 * x + coeff1)
yprime = y.diff(x)
Then I try to use yprime in calculations, but Python interpret it as a text: -(2*x + 1.0)*cos(x) - 2*sin(x) + 0.1/(x + 2)**2
How may I calculate -(2*x + 1.0)*cos(x) - 2*sin(x) + 0.1/(x + 2)**2 ?
After some manipulations according to mtadd:
from sympy import *
x, coeff1 = symbols('x coeff1')
y = 1 - (0.1 * coeff1) / (x + 2) - sin(x) * (2 * x + coeff1)
yprime = y.diff(x).evalf(subs={x:0,coeff1:1})
I receive a digital result, but still it's unable to operate with further logic. It says:
TypeError: can't convert expression to float