I'm trying to use sympy to solve a polynomial equation, the coefficients of which have uncertainties. So for the uncertainties I'm trying to use the uncertainties module. Is there any way of doing the following:
x=ufloat(10,0.2) #the xs are coefficients
x1=ufloat(8,0.01)
x3=ufloat(25,2)
L=Symbol("L")
eqn=(x*(L**2))+(x1*(L*1))+(x3*(L**0))
solve(eqn,L) #ideally this should give the value of L with it's propagated uncertainty
without it throwing the error:
TypeError: unsupported operand type(s) for *: 'Variable' and 'Pow'